diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2c90a795010..01274f4e238 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -19,6 +19,7 @@ "packages/google-cloud-billing": "3.1.3", "packages/google-cloud-billing-budgets": "4.1.2", "packages/google-cloud-certificatemanager": "0.6.2", + "packages/google-cloud-contactcenterinsights": "2.1.2", "packages/google-cloud-channel": "2.2.0", "packages/google-cloud-contentwarehouse": "0.1.2", "packages/google-cloud-datafusion": "2.1.2", diff --git a/packages/google-cloud-contactcenterinsights/.OwlBot.yaml b/packages/google-cloud-contactcenterinsights/.OwlBot.yaml new file mode 100644 index 00000000000..770d5b8c7ab --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.OwlBot.yaml @@ -0,0 +1,20 @@ +# 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 +# +# 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-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/contactcenterinsights/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-contactcenterinsights/$1 diff --git a/packages/google-cloud-contactcenterinsights/.eslintignore b/packages/google-cloud-contactcenterinsights/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-contactcenterinsights/.eslintrc.json b/packages/google-cloud-contactcenterinsights/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-contactcenterinsights/.gitattributes b/packages/google-cloud-contactcenterinsights/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-contactcenterinsights/.gitignore b/packages/google-cloud-contactcenterinsights/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.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/packages/google-cloud-contactcenterinsights/.jsdoc.js b/packages/google-cloud-contactcenterinsights/.jsdoc.js new file mode 100644 index 00000000000..176aa3b31d0 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2022 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 2022 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/contact-center-insights', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-contactcenterinsights/.mocharc.js b/packages/google-cloud-contactcenterinsights/.mocharc.js new file mode 100644 index 00000000000..cdb7b752160 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2022 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-contactcenterinsights/.nycrc b/packages/google-cloud-contactcenterinsights/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.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 +} diff --git a/packages/google-cloud-contactcenterinsights/.prettierignore b/packages/google-cloud-contactcenterinsights/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-contactcenterinsights/.prettierrc.js b/packages/google-cloud-contactcenterinsights/.prettierrc.js new file mode 100644 index 00000000000..d546a4ad546 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2022 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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-contactcenterinsights/.repo-metadata.json b/packages/google-cloud-contactcenterinsights/.repo-metadata.json new file mode 100644 index 00000000000..5db4eac43e5 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "contactcenterinsights", + "name_pretty": "Contact Center AI Insights API", + "product_documentation": "https://cloud.google.com/solutions/contact-center", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/contact-center-insights/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "stable", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/contact-center-insights", + "api_id": "contactcenterinsights.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "codeowner_team": "@googleapis/api-contact-center-insights", + "api_shortname": "contactcenterinsights", + "library_type": "GAPIC_AUTO" +} diff --git a/packages/google-cloud-contactcenterinsights/CHANGELOG.md b/packages/google-cloud-contactcenterinsights/CHANGELOG.md new file mode 100644 index 00000000000..c8cfbc47e3a --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/CHANGELOG.md @@ -0,0 +1,175 @@ +# Changelog + +## [2.1.2](https://github.com/googleapis/nodejs-contact-center-insights/compare/v2.1.1...v2.1.2) (2022-11-11) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#162](https://github.com/googleapis/nodejs-contact-center-insights/issues/162)) ([06d86b1](https://github.com/googleapis/nodejs-contact-center-insights/commit/06d86b138f000bcd5a3d0f909bff35c9d791420d)) +* Preserve default values in x-goog-request-params header ([#143](https://github.com/googleapis/nodejs-contact-center-insights/issues/143)) ([2ad9483](https://github.com/googleapis/nodejs-contact-center-insights/commit/2ad948341bab9ad17955c2186d9f72a82d22bc98)) +* Regenerated protos JS and TS definitions ([#165](https://github.com/googleapis/nodejs-contact-center-insights/issues/165)) ([7761efb](https://github.com/googleapis/nodejs-contact-center-insights/commit/7761efb115713545cb9f0a44983b207ca6ccedb0)) + +## [2.1.1](https://github.com/googleapis/nodejs-contact-center-insights/compare/v2.1.0...v2.1.1) (2022-09-01) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#137](https://github.com/googleapis/nodejs-contact-center-insights/issues/137)) ([c8d6ba2](https://github.com/googleapis/nodejs-contact-center-insights/commit/c8d6ba2cc240282a36ef6290aa88d0386f6aca21)) +* Change import long to require ([#138](https://github.com/googleapis/nodejs-contact-center-insights/issues/138)) ([79afe96](https://github.com/googleapis/nodejs-contact-center-insights/commit/79afe96953727b9443d677ec89458394c643eced)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-contact-center-insights/issues/1553)) ([#141](https://github.com/googleapis/nodejs-contact-center-insights/issues/141)) ([65dd78d](https://github.com/googleapis/nodejs-contact-center-insights/commit/65dd78d2c1b3e9cca5e241e20774f6764c487963)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-contact-center-insights/issues/1546)) ([#140](https://github.com/googleapis/nodejs-contact-center-insights/issues/140)) ([d0e4fd5](https://github.com/googleapis/nodejs-contact-center-insights/commit/d0e4fd5223896f029a1a5dd21fc71aab812a7122)) + +## [2.1.0](https://github.com/googleapis/nodejs-contact-center-insights/compare/v2.0.1...v2.1.0) (2022-07-05) + + +### Features + +* add LRO to API list ([3676403](https://github.com/googleapis/nodejs-contact-center-insights/commit/36764038e82fdb7a383fa697c8764ee7ccb19853)) + +## [2.0.1](https://github.com/googleapis/nodejs-contact-center-insights/compare/v2.0.0...v2.0.1) (2022-06-07) + + +### Bug Fixes + +* **deps:** update dependency @google-cloud/bigquery to v6 ([#127](https://github.com/googleapis/nodejs-contact-center-insights/issues/127)) ([9220f45](https://github.com/googleapis/nodejs-contact-center-insights/commit/9220f45cad762190ac63c2ae4470fc030d0e7f1b)) +* **deps:** update dependency @google-cloud/pubsub to v3 ([#126](https://github.com/googleapis/nodejs-contact-center-insights/issues/126)) ([646b35d](https://github.com/googleapis/nodejs-contact-center-insights/commit/646b35d2bcbb730d5e9c57c43d805c48f86efd44)) + +## [2.0.0](https://github.com/googleapis/nodejs-contact-center-insights/compare/v1.11.0...v2.0.0) (2022-05-12) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#122) + +### Build System + +* update library to use Node 12 ([#122](https://github.com/googleapis/nodejs-contact-center-insights/issues/122)) ([e5e62df](https://github.com/googleapis/nodejs-contact-center-insights/commit/e5e62dfe5f3fe1cc7a5de02f8a997f84e496f4da)) + +## [1.11.0](https://github.com/googleapis/nodejs-contact-center-insights/compare/v1.10.0...v1.11.0) (2022-03-23) + + +### Features + +* promote to stable ([#106](https://github.com/googleapis/nodejs-contact-center-insights/issues/106)) ([0c3b5f9](https://github.com/googleapis/nodejs-contact-center-insights/commit/0c3b5f9c1b0e94a2a6b06aef2b3b209293160773)), closes [#7](https://github.com/googleapis/nodejs-contact-center-insights/issues/7) + +## [1.10.0](https://github.com/googleapis/nodejs-contact-center-insights/compare/v1.9.0...v1.10.0) (2022-01-20) + + +### Features + +* new API for the View resource ([#89](https://github.com/googleapis/nodejs-contact-center-insights/issues/89)) ([8aa89e5](https://github.com/googleapis/nodejs-contact-center-insights/commit/8aa89e539651b0fc3ae573be3cdbe95f7c6bb8d3)) + +## [1.9.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.8.0...v1.9.0) (2021-12-03) + + +### Features + +* Add WriteDisposition to BigQuery Export API ([#80](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/80)) ([3f19a63](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/3f19a63fc121ab3ba94661755f62a3f9ae855913)) +* remove feature flag disable_issue_modeling ([#78](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/78)) ([594fc6d](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/594fc6d150cca28f8d4b2230a705b56cd65d156d)) + +## [1.8.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.7.0...v1.8.0) (2021-11-08) + + +### Features + +* Add ability to update phrase matchers feat: Add issue model stats to time series feat: Add display name to issue model stats ([#74](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/74)) ([2b9db34](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/2b9db341f3d999762a5f7a79ff179854eb8fbd05)) + +## [1.7.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.6.0...v1.7.0) (2021-10-01) + + +### Features + +* deprecate issue_matches docs: if conversation medium is unspecified, it will default to PHONE_CALL ([#68](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/68)) ([44c03e9](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/44c03e9540e6eaea24f0ad02a0479042e623ef53)) + +## [1.6.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.5.0...v1.6.0) (2021-09-28) + + +### Features + +* add metadata from dialogflow related to transcript segment, sentiment data for transcript segment ([#64](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/64)) ([982dbab](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/982dbabf513655e59c52cc05c41f172f06495c1e)) + +## [1.5.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.4.0...v1.5.0) (2021-09-20) + + +### Features + +* filter is used to filter conversations used for issue model training feat: update_time is used to indicate when the phrase matcher was updated ([#55](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/55)) ([08f13b4](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/08f13b4c54d18a6ea6f0f7192a75ef73583f26e8)) + +## [1.4.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.3.0...v1.4.0) (2021-08-27) + + +### Features + +* display_name is the display name for the assigned issue ([#39](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/39)) ([69697c8](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/69697c87771b20feb648293ad2cef1a67dd96ce2)) + +## [1.3.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.2.1...v1.3.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#35](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/35)) ([3389497](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/3389497d25bf515b64b8df9e926ce9170c98f8a0)) + +### [1.2.1](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.2.0...v1.2.1) (2021-08-17) + + +### Bug Fixes + +* **build:** migrate to using main branch ([#28](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/28)) ([137533f](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/137533f0f3ce60dc0cb9edc4c690063c853ade0b)) +* **deps:** google-gax v2.24.1 ([#30](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/30)) ([e3ac1ff](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/e3ac1ff60bf3c4921ef9a9f103e236c7d513cdab)) + +## [1.2.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.1.0...v1.2.0) (2021-08-11) + + +### Features + +* add new issue model API methods ([b73f2e9](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/b73f2e93ddb572519685190643c1f02174813658)) +* support Dialogflow and user-specified participant IDs ([b73f2e9](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/b73f2e93ddb572519685190643c1f02174813658)) + +## [1.1.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.0.2...v1.1.0) (2021-07-30) + + +### Features + +* update CCAI Insights protos. change nesting of Conversation.Transcript.Participant to ConversationParticipant and remove AnnotationBoundary.time_offset ([#19](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/19)) ([7501a27](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/7501a276f8159fb7fdc21aad1a19d108fde61c8a)) + +### [1.0.2](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.0.1...v1.0.2) (2021-07-22) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator ([412f847](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/412f8476941e3e78c9e1bb3f1395ce7acfd3e2a8)) + +### [1.0.1](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.0.0...v1.0.1) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#11](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/11)) ([27ad1af](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/27ad1af2a8daed27b3f391003c64ad57239cbe52)) + +## 1.0.0 (2021-07-01) + + +### Features + +* add initial samples ([#2](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/2)) ([5e1fb71](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/5e1fb71f5d062bae414791b9d314c8c73b09b290)) +* initial generation of templated files ([17259ab](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/17259ab8f027237f58bfbbe989916898375e2001)) +* initial stub of library ([d6b9355](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/d6b9355d0a070e06bda7d88e5887201380a5fb30)) + + +### Bug Fixes + +* **deps:** require google-gax v2.17.0 ([#6](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/6)) ([ad2fa0d](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/ad2fa0d1faab922e489c7c7cfc5efa1439609d60)) + +## 1.0.0 (2021-07-01) + + +### Features + +* add initial samples ([#2](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/2)) ([5e1fb71](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/5e1fb71f5d062bae414791b9d314c8c73b09b290)) +* initial generation of templated files ([17259ab](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/17259ab8f027237f58bfbbe989916898375e2001)) +* initial stub of library ([d6b9355](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/d6b9355d0a070e06bda7d88e5887201380a5fb30)) + + +### Bug Fixes + +* **deps:** require google-gax v2.17.0 ([#6](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/6)) ([ad2fa0d](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/ad2fa0d1faab922e489c7c7cfc5efa1439609d60)) diff --git a/packages/google-cloud-contactcenterinsights/CODE_OF_CONDUCT.md b/packages/google-cloud-contactcenterinsights/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-contactcenterinsights/CONTRIBUTING.md b/packages/google-cloud-contactcenterinsights/CONTRIBUTING.md new file mode 100644 index 00000000000..8363288fd73 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Contact Center AI Insights API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[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=contactcenterinsights.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-contactcenterinsights/LICENSE b/packages/google-cloud-contactcenterinsights/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/packages/google-cloud-contactcenterinsights/README.md b/packages/google-cloud-contactcenterinsights/README.md new file mode 100644 index 00000000000..b8683873c39 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/README.md @@ -0,0 +1,195 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Contact Center AI Insights API: Node.js Client](https://github.com/googleapis/google-cloud-node) + +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/contact-center-insights.svg)](https://www.npmjs.org/package/@google-cloud/contact-center-insights) + + + + +contactcenterinsights client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-contactcenterinsights/CHANGELOG.md). + +* [Contact Center AI Insights API Node.js Client API Reference][client-docs] +* [Contact Center AI Insights API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-contactcenterinsights](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-contactcenterinsights) + +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) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [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 Contact Center AI Insights API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/contact-center-insights +``` + + +### Using the client library + +```javascript +// Imports the Google Cloud client library + +const { + ContactCenterInsightsClient, +} = require('@google-cloud/contact-center-insights'); + +// TODO(developer): replace with your prefered project ID. +// const projectId = 'my-project' + +const client = new ContactCenterInsightsClient(); + +//TODO(library generator): write the actual function you will be testing +async function listConversations() { + const conversations = await client.listConversations({ + parent: `projects/${projectId}/locations/${location}`, + }); + console.info(conversations); +} +listConversations(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Contact_center_insights.calculate_issue_model_stats | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js,samples/README.md) | +| Contact_center_insights.calculate_stats | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js,samples/README.md) | +| Contact_center_insights.create_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js,samples/README.md) | +| Contact_center_insights.create_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js,samples/README.md) | +| Contact_center_insights.create_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js,samples/README.md) | +| Contact_center_insights.create_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.js,samples/README.md) | +| Contact_center_insights.create_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js,samples/README.md) | +| Contact_center_insights.delete_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js,samples/README.md) | +| Contact_center_insights.delete_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js,samples/README.md) | +| Contact_center_insights.delete_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js,samples/README.md) | +| Contact_center_insights.delete_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js,samples/README.md) | +| Contact_center_insights.delete_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js,samples/README.md) | +| Contact_center_insights.deploy_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js,samples/README.md) | +| Contact_center_insights.export_insights_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js,samples/README.md) | +| Contact_center_insights.get_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js,samples/README.md) | +| Contact_center_insights.get_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js,samples/README.md) | +| Contact_center_insights.get_issue | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js,samples/README.md) | +| Contact_center_insights.get_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js,samples/README.md) | +| Contact_center_insights.get_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js,samples/README.md) | +| Contact_center_insights.get_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js,samples/README.md) | +| Contact_center_insights.get_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js,samples/README.md) | +| Contact_center_insights.list_analyses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js,samples/README.md) | +| Contact_center_insights.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js,samples/README.md) | +| Contact_center_insights.list_issue_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js,samples/README.md) | +| Contact_center_insights.list_issues | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.js,samples/README.md) | +| Contact_center_insights.list_phrase_matchers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.js,samples/README.md) | +| Contact_center_insights.list_views | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js,samples/README.md) | +| Contact_center_insights.undeploy_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js,samples/README.md) | +| Contact_center_insights.update_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js,samples/README.md) | +| Contact_center_insights.update_issue | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js,samples/README.md) | +| Contact_center_insights.update_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.js,samples/README.md) | +| Contact_center_insights.update_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.js,samples/README.md) | +| Contact_center_insights.update_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js,samples/README.md) | +| Contact_center_insights.update_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/test/quickstart.js,samples/README.md) | + + + +The [Contact Center AI Insights API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +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/contact-center-insights@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. + + + + + + +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`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/contact-center-insights/latest +[product-docs]: https://cloud.google.com/solutions/contact-center +[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=contactcenterinsights.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-contactcenterinsights/linkinator.config.json b/packages/google-cloud-contactcenterinsights/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-contactcenterinsights/package.json b/packages/google-cloud-contactcenterinsights/package.json new file mode 100644 index 00000000000..05c1596a0ad --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/package.json @@ -0,0 +1,71 @@ +{ + "name": "@google-cloud/contact-center-insights", + "version": "2.1.2", + "description": "contactcenterinsights client for Node.js", + "repository": { + "type": "git", + "directory": "packages/google-cloud-contactcenterinsights", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, + "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 contactcenterinsights", + "contactcenterinsights", + "contactcenterinsights service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "npm run compile && c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^3.5.2" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.7.2", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "mocha": "^9.2.2", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^14.0.0", + "ts-loader": "^9.1.2", + "typescript": "^4.6.4", + "webpack": "^5.36.2", + "webpack-cli": "^4.7.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-contactcenterinsights" +} diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto new file mode 100644 index 00000000000..c5956b93f16 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto @@ -0,0 +1,1094 @@ +// Copyright 2022 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.cloud.contactcenterinsights.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/contactcenterinsights/v1/resources.proto"; +import "google/longrunning/operations.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"; + +option csharp_namespace = "Google.Cloud.ContactCenterInsights.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1;contactcenterinsights"; +option java_multiple_files = true; +option java_outer_classname = "ContactCenterInsightsProto"; +option java_package = "com.google.cloud.contactcenterinsights.v1"; +option php_namespace = "Google\\Cloud\\ContactCenterInsights\\V1"; +option ruby_package = "Google::Cloud::ContactCenterInsights::V1"; + +// An API that lets users analyze and explore their business conversation data. +service ContactCenterInsights { + option (google.api.default_host) = "contactcenterinsights.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a conversation. + rpc CreateConversation(CreateConversationRequest) returns (Conversation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/conversations" + body: "conversation" + }; + option (google.api.method_signature) = "parent,conversation,conversation_id"; + } + + // Updates a conversation. + rpc UpdateConversation(UpdateConversationRequest) returns (Conversation) { + option (google.api.http) = { + patch: "/v1/{conversation.name=projects/*/locations/*/conversations/*}" + body: "conversation" + }; + option (google.api.method_signature) = "conversation,update_mask"; + } + + // Gets a conversation. + rpc GetConversation(GetConversationRequest) returns (Conversation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/conversations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists conversations. + rpc ListConversations(ListConversationsRequest) returns (ListConversationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/conversations" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a conversation. + rpc DeleteConversation(DeleteConversationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/conversations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an analysis. The long running operation is done when the analysis + // has completed. + rpc CreateAnalysis(CreateAnalysisRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/conversations/*}/analyses" + body: "analysis" + }; + option (google.api.method_signature) = "parent,analysis"; + option (google.longrunning.operation_info) = { + response_type: "Analysis" + metadata_type: "CreateAnalysisOperationMetadata" + }; + } + + // Gets an analysis. + rpc GetAnalysis(GetAnalysisRequest) returns (Analysis) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/conversations/*/analyses/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists analyses. + rpc ListAnalyses(ListAnalysesRequest) returns (ListAnalysesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/conversations/*}/analyses" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes an analysis. + rpc DeleteAnalysis(DeleteAnalysisRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/conversations/*/analyses/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Export insights data to a destination defined in the request body. + rpc ExportInsightsData(ExportInsightsDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/insightsdata:export" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "ExportInsightsDataResponse" + metadata_type: "ExportInsightsDataMetadata" + }; + } + + // Creates an issue model. + rpc CreateIssueModel(CreateIssueModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/issueModels" + body: "issue_model" + }; + option (google.api.method_signature) = "parent,issue_model"; + option (google.longrunning.operation_info) = { + response_type: "IssueModel" + metadata_type: "CreateIssueModelMetadata" + }; + } + + // Updates an issue model. + rpc UpdateIssueModel(UpdateIssueModelRequest) returns (IssueModel) { + option (google.api.http) = { + patch: "/v1/{issue_model.name=projects/*/locations/*/issueModels/*}" + body: "issue_model" + }; + option (google.api.method_signature) = "issue_model,update_mask"; + } + + // Gets an issue model. + rpc GetIssueModel(GetIssueModelRequest) returns (IssueModel) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/issueModels/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists issue models. + rpc ListIssueModels(ListIssueModelsRequest) returns (ListIssueModelsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/issueModels" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes an issue model. + rpc DeleteIssueModel(DeleteIssueModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/issueModels/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteIssueModelMetadata" + }; + } + + // Deploys an issue model. Returns an error if a model is already deployed. + // An issue model can only be used in analysis after it has been deployed. + rpc DeployIssueModel(DeployIssueModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/issueModels/*}:deploy" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "DeployIssueModelResponse" + metadata_type: "DeployIssueModelMetadata" + }; + } + + // Undeploys an issue model. + // An issue model can not be used in analysis after it has been undeployed. + rpc UndeployIssueModel(UndeployIssueModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/issueModels/*}:undeploy" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "UndeployIssueModelResponse" + metadata_type: "UndeployIssueModelMetadata" + }; + } + + // Gets an issue. + rpc GetIssue(GetIssueRequest) returns (Issue) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/issueModels/*/issues/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists issues. + rpc ListIssues(ListIssuesRequest) returns (ListIssuesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/issueModels/*}/issues" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates an issue. + rpc UpdateIssue(UpdateIssueRequest) returns (Issue) { + option (google.api.http) = { + patch: "/v1/{issue.name=projects/*/locations/*/issueModels/*/issues/*}" + body: "issue" + }; + option (google.api.method_signature) = "issue,update_mask"; + } + + // Gets an issue model's statistics. + rpc CalculateIssueModelStats(CalculateIssueModelStatsRequest) returns (CalculateIssueModelStatsResponse) { + option (google.api.http) = { + get: "/v1/{issue_model=projects/*/locations/*/issueModels/*}:calculateIssueModelStats" + }; + option (google.api.method_signature) = "issue_model"; + } + + // Creates a phrase matcher. + rpc CreatePhraseMatcher(CreatePhraseMatcherRequest) returns (PhraseMatcher) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/phraseMatchers" + body: "phrase_matcher" + }; + option (google.api.method_signature) = "parent,phrase_matcher"; + } + + // Gets a phrase matcher. + rpc GetPhraseMatcher(GetPhraseMatcherRequest) returns (PhraseMatcher) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/phraseMatchers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists phrase matchers. + rpc ListPhraseMatchers(ListPhraseMatchersRequest) returns (ListPhraseMatchersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/phraseMatchers" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a phrase matcher. + rpc DeletePhraseMatcher(DeletePhraseMatcherRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/phraseMatchers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a phrase matcher. + rpc UpdatePhraseMatcher(UpdatePhraseMatcherRequest) returns (PhraseMatcher) { + option (google.api.http) = { + patch: "/v1/{phrase_matcher.name=projects/*/locations/*/phraseMatchers/*}" + body: "phrase_matcher" + }; + option (google.api.method_signature) = "phrase_matcher,update_mask"; + } + + // Gets conversation statistics. + rpc CalculateStats(CalculateStatsRequest) returns (CalculateStatsResponse) { + option (google.api.http) = { + get: "/v1/{location=projects/*/locations/*}/conversations:calculateStats" + }; + option (google.api.method_signature) = "location"; + } + + // Gets project-level settings. + rpc GetSettings(GetSettingsRequest) returns (Settings) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/settings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates project-level settings. + rpc UpdateSettings(UpdateSettingsRequest) returns (Settings) { + option (google.api.http) = { + patch: "/v1/{settings.name=projects/*/locations/*/settings}" + body: "settings" + }; + option (google.api.method_signature) = "settings,update_mask"; + } + + // Creates a view. + rpc CreateView(CreateViewRequest) returns (View) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/views" + body: "view" + }; + option (google.api.method_signature) = "parent,view"; + } + + // Gets a view. + rpc GetView(GetViewRequest) returns (View) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/views/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists views. + rpc ListViews(ListViewsRequest) returns (ListViewsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/views" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a view. + rpc UpdateView(UpdateViewRequest) returns (View) { + option (google.api.http) = { + patch: "/v1/{view.name=projects/*/locations/*/views/*}" + body: "view" + }; + option (google.api.method_signature) = "view,update_mask"; + } + + // Deletes a view. + rpc DeleteView(DeleteViewRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/views/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Represents the options for viewing a conversation. +enum ConversationView { + // The conversation view is not specified. + // + // * Defaults to `FULL` in `GetConversationRequest`. + // * Defaults to `BASIC` in `ListConversationsRequest`. + CONVERSATION_VIEW_UNSPECIFIED = 0; + + // Populates all fields in the conversation. + FULL = 2; + + // Populates all fields in the conversation except the transcript. + BASIC = 1; +} + +// The request for calculating conversation statistics. +message CalculateStatsRequest { + // Required. The location of the conversations. + string location = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // A filter to reduce results to a specific subset. This field is useful for + // getting statistics about conversations with specific properties. + string filter = 2; +} + +// The response for calculating conversation statistics. +message CalculateStatsResponse { + // A time series representing conversations over time. + message TimeSeries { + // A single interval in a time series. + message Interval { + // The start time of this interval. + google.protobuf.Timestamp start_time = 1; + + // The number of conversations created in this interval. + int32 conversation_count = 2; + } + + // The duration of each interval. + google.protobuf.Duration interval_duration = 1; + + // An ordered list of intervals from earliest to latest, where each interval + // represents the number of conversations that transpired during the time + // window. + repeated Interval points = 2; + } + + // The average duration of all conversations. The average is calculated using + // only conversations that have a time duration. + google.protobuf.Duration average_duration = 1; + + // The average number of turns per conversation. + int32 average_turn_count = 2; + + // The total number of conversations. + int32 conversation_count = 3; + + // A map associating each smart highlighter display name with its respective + // number of matches in the set of conversations. + map smart_highlighter_matches = 4; + + // A map associating each custom highlighter resource name with its respective + // number of matches in the set of conversations. + map custom_highlighter_matches = 5; + + // A map associating each issue resource name with its respective number of + // matches in the set of conversations. Key has the format: + // `projects//locations//issueModels//issues/` + // Deprecated, use `issue_matches_stats` field instead. + map issue_matches = 6 [deprecated = true]; + + // A map associating each issue resource name with its respective number of + // matches in the set of conversations. Key has the format: + // `projects//locations//issueModels//issues/` + map issue_matches_stats = 8; + + // A time series representing the count of conversations created over time + // that match that requested filter criteria. + TimeSeries conversation_count_time_series = 7; +} + +// Metadata for a create analysis operation. +message CreateAnalysisOperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Conversation that this Analysis Operation belongs to. + string conversation = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Conversation" + } + ]; +} + +// Request to create a conversation. +message CreateConversationRequest { + // Required. The parent resource of the conversation. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The conversation resource to create. + Conversation conversation = 2 [(google.api.field_behavior) = REQUIRED]; + + // A unique ID for the new conversation. This ID will become the final + // component of the conversation's resource name. If no ID is specified, a + // server-generated ID will be used. + // + // This value should be 4-64 characters and must match the regular + // expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + string conversation_id = 3; +} + +// Request to list conversations. +message ListConversationsRequest { + // Required. The parent resource of the conversation. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of conversations to return in the response. A valid page + // size ranges from 0 to 1,000 inclusive. If the page size is zero or + // unspecified, a default page size of 100 will be chosen. Note that a call + // might return fewer results than the requested page size. + int32 page_size = 2; + + // The value returned by the last `ListConversationsResponse`. This value + // indicates that this is a continuation of a prior `ListConversations` call + // and that the system should return the next page of data. + string page_token = 3; + + // A filter to reduce results to a specific subset. Useful for querying + // conversations with specific properties. + string filter = 4; + + // The level of details of the conversation. Default is `BASIC`. + ConversationView view = 5; +} + +// The response of listing conversations. +message ListConversationsResponse { + // The conversations that match the request. + repeated Conversation conversations = 1; + + // A token which can be sent as `page_token` to retrieve the next page. If + // this field is set, it means there is another page available. If it is not + // set, it means no other pages are available. + string next_page_token = 2; +} + +// The request to get a conversation. +message GetConversationRequest { + // Required. The name of the conversation to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Conversation" + } + ]; + + // The level of details of the conversation. Default is `FULL`. + ConversationView view = 2; +} + +// The request to update a conversation. +message UpdateConversationRequest { + // Required. The new values for the conversation. + Conversation conversation = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request to delete a conversation. +message DeleteConversationRequest { + // Required. The name of the conversation to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Conversation" + } + ]; + + // If set to true, all of this conversation's analyses will also be deleted. + // Otherwise, the request will only succeed if the conversation has no + // analyses. + bool force = 2; +} + +// The request to create an analysis. +message CreateAnalysisRequest { + // Required. The parent resource of the analysis. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Conversation" + } + ]; + + // Required. The analysis to create. + Analysis analysis = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request to list analyses. +message ListAnalysesRequest { + // Required. The parent resource of the analyses. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Conversation" + } + ]; + + // The maximum number of analyses to return in the response. If this + // value is zero, the service will select a default size. A call might return + // fewer objects than requested. A non-empty `next_page_token` in the response + // indicates that more data is available. + int32 page_size = 2; + + // The value returned by the last `ListAnalysesResponse`; indicates + // that this is a continuation of a prior `ListAnalyses` call and + // the system should return the next page of data. + string page_token = 3; + + // A filter to reduce results to a specific subset. Useful for querying + // conversations with specific properties. + string filter = 4; +} + +// The response to list analyses. +message ListAnalysesResponse { + // The analyses that match the request. + repeated Analysis analyses = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request to get an analysis. +message GetAnalysisRequest { + // Required. The name of the analysis to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Analysis" + } + ]; +} + +// The request to delete an analysis. +message DeleteAnalysisRequest { + // Required. The name of the analysis to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Analysis" + } + ]; +} + +// The request to export insights. +message ExportInsightsDataRequest { + // A BigQuery Table Reference. + message BigQueryDestination { + // A project ID or number. If specified, then export will attempt to + // write data to this project instead of the resource project. Otherwise, + // the resource project will be used. + string project_id = 3; + + // Required. The name of the BigQuery dataset that the snapshot result should be + // exported to. If this dataset does not exist, the export call returns an + // INVALID_ARGUMENT error. + string dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // The BigQuery table name to which the insights data should be written. + // If this table does not exist, the export call returns an INVALID_ARGUMENT + // error. + string table = 2; + } + + // Specifies the action that occurs if the destination table already exists. + enum WriteDisposition { + // Write disposition is not specified. Defaults to WRITE_TRUNCATE. + WRITE_DISPOSITION_UNSPECIFIED = 0; + + // If the table already exists, BigQuery will overwrite the table data and + // use the schema from the load. + WRITE_TRUNCATE = 1; + + // If the table already exists, BigQuery will append data to the table. + WRITE_APPEND = 2; + } + + // Exporter destination. + oneof destination { + // Specified if sink is a BigQuery table. + BigQueryDestination big_query_destination = 2; + } + + // Required. The parent resource to export data from. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // A filter to reduce results to a specific subset. Useful for exporting + // conversations with specific properties. + string filter = 3; + + // A fully qualified KMS key name for BigQuery tables protected by CMEK. + // Format: + // projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} + string kms_key = 4; + + // Options for what to do if the destination table already exists. + WriteDisposition write_disposition = 5; +} + +// Metadata for an export insights operation. +message ExportInsightsDataMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The original request for export. + ExportInsightsDataRequest request = 3; + + // Partial errors during export operation that might cause the operation + // output to be incomplete. + repeated google.rpc.Status partial_errors = 4; +} + +// Response for an export insights operation. +message ExportInsightsDataResponse { + +} + +// The request to create an issue model. +message CreateIssueModelRequest { + // Required. The parent resource of the issue model. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The issue model to create. + IssueModel issue_model = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata for creating an issue model. +message CreateIssueModelMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The original request for creation. + CreateIssueModelRequest request = 3; +} + +// The request to update an issue model. +message UpdateIssueModelRequest { + // Required. The new values for the issue model. + IssueModel issue_model = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request to list issue models. +message ListIssueModelsRequest { + // Required. The parent resource of the issue model. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; +} + +// The response of listing issue models. +message ListIssueModelsResponse { + // The issue models that match the request. + repeated IssueModel issue_models = 1; +} + +// The request to get an issue model. +message GetIssueModelRequest { + // Required. The name of the issue model to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + } + ]; +} + +// The request to delete an issue model. +message DeleteIssueModelRequest { + // Required. The name of the issue model to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + } + ]; +} + +// Metadata for deleting an issue model. +message DeleteIssueModelMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The original request for deletion. + DeleteIssueModelRequest request = 3; +} + +// The request to deploy an issue model. +message DeployIssueModelRequest { + // Required. The issue model to deploy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + } + ]; +} + +// The response to deploy an issue model. +message DeployIssueModelResponse { + +} + +// Metadata for deploying an issue model. +message DeployIssueModelMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The original request for deployment. + DeployIssueModelRequest request = 3; +} + +// The request to undeploy an issue model. +message UndeployIssueModelRequest { + // Required. The issue model to undeploy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + } + ]; +} + +// The response to undeploy an issue model. +message UndeployIssueModelResponse { + +} + +// Metadata for undeploying an issue model. +message UndeployIssueModelMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The original request for undeployment. + UndeployIssueModelRequest request = 3; +} + +// The request to get an issue. +message GetIssueRequest { + // Required. The name of the issue to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Issue" + } + ]; +} + +// Request to list issues. +message ListIssuesRequest { + // Required. The parent resource of the issue. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + } + ]; +} + +// The response of listing issues. +message ListIssuesResponse { + // The issues that match the request. + repeated Issue issues = 1; +} + +// The request to update an issue. +message UpdateIssueRequest { + // Required. The new values for the issue. + Issue issue = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request to get statistics of an issue model. +message CalculateIssueModelStatsRequest { + // Required. The resource name of the issue model to query against. + string issue_model = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + } + ]; +} + +// Response of querying an issue model's statistics. +message CalculateIssueModelStatsResponse { + // The latest label statistics for the queried issue model. Includes results + // on both training data and data labeled after deployment. + IssueModelLabelStats current_stats = 4; +} + +// Request to create a phrase matcher. +message CreatePhraseMatcherRequest { + // Required. The parent resource of the phrase matcher. Required. The location to create + // a phrase matcher for. + // Format: `projects//locations/` or + // `projects//locations/` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The phrase matcher resource to create. + PhraseMatcher phrase_matcher = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to list phrase matchers. +message ListPhraseMatchersRequest { + // Required. The parent resource of the phrase matcher. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of phrase matchers to return in the response. If this + // value is zero, the service will select a default size. A call might return + // fewer objects than requested. A non-empty `next_page_token` in the response + // indicates that more data is available. + int32 page_size = 2; + + // The value returned by the last `ListPhraseMatchersResponse`. This value + // indicates that this is a continuation of a prior `ListPhraseMatchers` call + // and that the system should return the next page of data. + string page_token = 3; + + // A filter to reduce results to a specific subset. Useful for querying + // phrase matchers with specific properties. + string filter = 4; +} + +// The response of listing phrase matchers. +message ListPhraseMatchersResponse { + // The phrase matchers that match the request. + repeated PhraseMatcher phrase_matchers = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request to get a a phrase matcher. +message GetPhraseMatcherRequest { + // Required. The name of the phrase matcher to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/PhraseMatcher" + } + ]; +} + +// The request to delete a phrase matcher. +message DeletePhraseMatcherRequest { + // Required. The name of the phrase matcher to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/PhraseMatcher" + } + ]; +} + +// The request to update a phrase matcher. +message UpdatePhraseMatcherRequest { + // Required. The new values for the phrase matcher. + PhraseMatcher phrase_matcher = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request to get project-level settings. +message GetSettingsRequest { + // Required. The name of the settings resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Settings" + } + ]; +} + +// The request to update project-level settings. +message UpdateSettingsRequest { + // Required. The new settings values. + Settings settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request to create a view. +message CreateViewRequest { + // Required. The parent resource of the view. Required. The location to create + // a view for. + // Format: `projects//locations/` or + // `projects//locations/` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The view resource to create. + View view = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request to get a view. +message GetViewRequest { + // Required. The name of the view to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/View" + } + ]; +} + +// The request to list views. +message ListViewsRequest { + // Required. The parent resource of the views. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of views to return in the response. If this + // value is zero, the service will select a default size. A call may return + // fewer objects than requested. A non-empty `next_page_token` in the response + // indicates that more data is available. + int32 page_size = 2; + + // The value returned by the last `ListViewsResponse`; indicates + // that this is a continuation of a prior `ListViews` call and + // the system should return the next page of data. + string page_token = 3; +} + +// The response of listing views. +message ListViewsResponse { + // The views that match the request. + repeated View views = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request to update a view. +message UpdateViewRequest { + // Required. The new view. + View view = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request to delete a view. +message DeleteViewRequest { + // Required. The name of the view to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/View" + } + ]; +} diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto new file mode 100644 index 00000000000..bac8515aab5 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto @@ -0,0 +1,1116 @@ +// Copyright 2022 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.cloud.contactcenterinsights.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ContactCenterInsights.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1;contactcenterinsights"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.contactcenterinsights.v1"; +option php_namespace = "Google\\Cloud\\ContactCenterInsights\\V1"; +option ruby_package = "Google::Cloud::ContactCenterInsights::V1"; +option (google.api.resource_definition) = { + type: "dialogflow.googleapis.com/Participant" + pattern: "projects/{project}/conversations/{conversation}/participants/{participant}" + pattern: "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}" +}; + +// The conversation resource. +message Conversation { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/Conversation" + pattern: "projects/{project}/locations/{location}/conversations/{conversation}" + }; + + // Call-specific metadata. + message CallMetadata { + // The audio channel that contains the customer. + int32 customer_channel = 1; + + // The audio channel that contains the agent. + int32 agent_channel = 2; + } + + // A message representing the transcript of a conversation. + message Transcript { + // A segment of a full transcript. + message TranscriptSegment { + // Word-level info for words in a transcript. + message WordInfo { + // Time offset of the start of this word relative to the beginning of + // the total conversation. + google.protobuf.Duration start_offset = 1; + + // Time offset of the end of this word relative to the beginning of the + // total conversation. + google.protobuf.Duration end_offset = 2; + + // The word itself. Includes punctuation marks that surround the word. + string word = 3; + + // A confidence estimate between 0.0 and 1.0 of the fidelity of this + // word. A default value of 0.0 indicates that the value is unset. + float confidence = 4; + } + + // Metadata from Dialogflow relating to the current transcript segment. + message DialogflowSegmentMetadata { + // Whether the transcript segment was covered under the configured smart + // reply allowlist in Agent Assist. + bool smart_reply_allowlist_covered = 1; + } + + // The time that the message occurred, if provided. + google.protobuf.Timestamp message_time = 6; + + // The text of this segment. + string text = 1; + + // A confidence estimate between 0.0 and 1.0 of the fidelity of this + // segment. A default value of 0.0 indicates that the value is unset. + float confidence = 2; + + // A list of the word-specific information for each word in the segment. + repeated WordInfo words = 3; + + // The language code of this segment as a + // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + // Example: "en-US". + string language_code = 4; + + // For conversations derived from multi-channel audio, this is the channel + // number corresponding to the audio from that channel. For + // audioChannelCount = N, its output values can range from '1' to 'N'. A + // channel tag of 0 indicates that the audio is mono. + int32 channel_tag = 5; + + // The participant of this segment. + ConversationParticipant segment_participant = 9; + + // CCAI metadata relating to the current transcript segment. + DialogflowSegmentMetadata dialogflow_segment_metadata = 10; + + // The sentiment for this transcript segment. + SentimentData sentiment = 11; + } + + // A list of sequential transcript segments that comprise the conversation. + repeated TranscriptSegment transcript_segments = 1; + } + + // Possible media for the conversation. + enum Medium { + // Default value, if unspecified will default to PHONE_CALL. + MEDIUM_UNSPECIFIED = 0; + + // The format for conversations that took place over the phone. + PHONE_CALL = 1; + + // The format for conversations that took place over chat. + CHAT = 2; + } + + // Metadata that applies to the conversation. + oneof metadata { + // Call-specific metadata. + CallMetadata call_metadata = 7; + } + + // A time to live expiration setting, can be either a specified timestamp or a + // duration from the time that the conversation creation request was received. + // Conversations with an expiration set will be removed up to 24 hours after + // the specified time. + oneof expiration { + // The time at which this conversation should expire. After this time, the + // conversation data and any associated analyses will be deleted. + google.protobuf.Timestamp expire_time = 15; + + // Input only. The TTL for this resource. If specified, then this TTL will + // be used to calculate the expire time. + google.protobuf.Duration ttl = 16 [(google.api.field_behavior) = INPUT_ONLY]; + } + + // Immutable. The resource name of the conversation. + // Format: + // projects/{project}/locations/{location}/conversations/{conversation} + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The source of the audio and transcription for the conversation. + ConversationDataSource data_source = 2; + + // Output only. The time at which the conversation was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The most recent time at which the conversation was updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The time at which the conversation started. + google.protobuf.Timestamp start_time = 17; + + // A user-specified language code for the conversation. + string language_code = 14; + + // An opaque, user-specified string representing the human agent who handled + // the conversation. + string agent_id = 5; + + // A map for the user to specify any custom fields. A maximum of 20 labels per + // conversation is allowed, with a maximum of 256 characters per entry. + map labels = 6; + + // Output only. The conversation transcript. + Transcript transcript = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The conversation medium, if unspecified will default to PHONE_CALL. + Medium medium = 9 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The duration of the conversation. + google.protobuf.Duration duration = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of turns in the conversation. + int32 turn_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The conversation's latest analysis, if one exists. + Analysis latest_analysis = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The annotations that were generated during the customer and agent + // interaction. + repeated RuntimeAnnotation runtime_annotations = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. All the matched Dialogflow intents in the call. The key corresponds to a + // Dialogflow intent, format: + // projects/{project}/agent/{agent}/intents/{intent} + map dialogflow_intents = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Obfuscated user ID which the customer sent to us. + string obfuscated_user_id = 21; +} + +// The analysis resource. +message Analysis { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/Analysis" + pattern: "projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}" + }; + + // Immutable. The resource name of the analysis. + // Format: + // projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time at which the analysis was requested. + google.protobuf.Timestamp request_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the analysis was created, which occurs when the + // long-running operation completes. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of the analysis, which is populated when the analysis + // finishes. + AnalysisResult analysis_result = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The conversation source, which is a combination of transcript and audio. +message ConversationDataSource { + // The source of the conversation. + oneof source { + // A Cloud Storage location specification for the audio and transcript. + GcsSource gcs_source = 1; + + // The source when the conversation comes from Dialogflow. + DialogflowSource dialogflow_source = 3; + } +} + +// A Cloud Storage source of conversation data. +message GcsSource { + // Cloud Storage URI that points to a file that contains the conversation + // audio. + string audio_uri = 1; + + // Immutable. Cloud Storage URI that points to a file that contains the conversation + // transcript. + string transcript_uri = 2 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A Dialogflow source of conversation data. +message DialogflowSource { + // Output only. The name of the Dialogflow conversation that this conversation + // resource is derived from. Format: + // projects/{project}/locations/{location}/conversations/{conversation} + string dialogflow_conversation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Cloud Storage URI that points to a file that contains the conversation + // audio. + string audio_uri = 3; +} + +// The result of an analysis. +message AnalysisResult { + // Call-specific metadata created during analysis. + message CallAnalysisMetadata { + // A list of call annotations that apply to this call. + repeated CallAnnotation annotations = 2; + + // All the entities in the call. + map entities = 3; + + // Overall conversation-level sentiment for each channel of the call. + repeated ConversationLevelSentiment sentiments = 4; + + // All the matched intents in the call. + map intents = 6; + + // All the matched phrase matchers in the call. + map phrase_matchers = 7; + + // Overall conversation-level issue modeling result. + IssueModelResult issue_model_result = 8; + } + + // Metadata discovered during analysis. + oneof metadata { + // Call-specific metadata created by the analysis. + CallAnalysisMetadata call_analysis_metadata = 2; + } + + // The time at which the analysis ended. + google.protobuf.Timestamp end_time = 1; +} + +// Issue Modeling result on a conversation. +message IssueModelResult { + // Issue model that generates the result. + // Format: projects/{project}/locations/{location}/issueModels/{issue_model} + string issue_model = 1 [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + }]; + + // All the matched issues. + repeated IssueAssignment issues = 2; +} + +// One channel of conversation-level sentiment data. +message ConversationLevelSentiment { + // The channel of the audio that the data applies to. + int32 channel_tag = 1; + + // Data specifying sentiment. + SentimentData sentiment_data = 2; +} + +// Information about the issue. +message IssueAssignment { + // Resource name of the assigned issue. + string issue = 1; + + // Score indicating the likelihood of the issue assignment. + // currently bounded on [0,1]. + double score = 2; + + // Immutable. Display name of the assigned issue. This field is set at time of analyis + // and immutable since then. + string display_name = 3 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A piece of metadata that applies to a window of a call. +message CallAnnotation { + // The data in the annotation. + oneof data { + // Data specifying an interruption. + InterruptionData interruption_data = 10; + + // Data specifying sentiment. + SentimentData sentiment_data = 11; + + // Data specifying silence. + SilenceData silence_data = 12; + + // Data specifying a hold. + HoldData hold_data = 13; + + // Data specifying an entity mention. + EntityMentionData entity_mention_data = 15; + + // Data specifying an intent match. + IntentMatchData intent_match_data = 16; + + // Data specifying a phrase match. + PhraseMatchData phrase_match_data = 17; + } + + // The channel of the audio where the annotation occurs. For single-channel + // audio, this field is not populated. + int32 channel_tag = 1; + + // The boundary in the conversation where the annotation starts, inclusive. + AnnotationBoundary annotation_start_boundary = 4; + + // The boundary in the conversation where the annotation ends, inclusive. + AnnotationBoundary annotation_end_boundary = 5; +} + +// A point in a conversation that marks the start or the end of an annotation. +message AnnotationBoundary { + // A detailed boundary, which describes a more specific point. + oneof detailed_boundary { + // The word index of this boundary with respect to the first word in the + // transcript piece. This index starts at zero. + int32 word_index = 3; + } + + // The index in the sequence of transcribed pieces of the conversation where + // the boundary is located. This index starts at zero. + int32 transcript_index = 1; +} + +// The data for an entity annotation. +// Represents a phrase in the conversation that is a known entity, such +// as a person, an organization, or location. +message Entity { + // The type of the entity. For most entity types, the associated metadata is a + // Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table + // below lists the associated fields for entities that have different + // metadata. + enum Type { + // Unspecified. + TYPE_UNSPECIFIED = 0; + + // Person. + PERSON = 1; + + // Location. + LOCATION = 2; + + // Organization. + ORGANIZATION = 3; + + // Event. + EVENT = 4; + + // Artwork. + WORK_OF_ART = 5; + + // Consumer product. + CONSUMER_GOOD = 6; + + // Other types of entities. + OTHER = 7; + + // Phone number. + // + // The metadata lists the phone number (formatted according to local + // convention), plus whichever additional elements appear in the text: + // + // * `number` - The actual number, broken down into sections according to + // local convention. + // * `national_prefix` - Country code, if detected. + // * `area_code` - Region or area code, if detected. + // * `extension` - Phone extension (to be dialed after connection), if + // detected. + PHONE_NUMBER = 9; + + // Address. + // + // The metadata identifies the street number and locality plus whichever + // additional elements appear in the text: + // + // * `street_number` - Street number. + // * `locality` - City or town. + // * `street_name` - Street/route name, if detected. + // * `postal_code` - Postal code, if detected. + // * `country` - Country, if detected. + // * `broad_region` - Administrative area, such as the state, if detected. + // * `narrow_region` - Smaller administrative area, such as county, if + // detected. + // * `sublocality` - Used in Asian addresses to demark a district within a + // city, if detected. + ADDRESS = 10; + + // Date. + // + // The metadata identifies the components of the date: + // + // * `year` - Four digit year, if detected. + // * `month` - Two digit month number, if detected. + // * `day` - Two digit day number, if detected. + DATE = 11; + + // Number. + // + // The metadata is the number itself. + NUMBER = 12; + + // Price. + // + // The metadata identifies the `value` and `currency`. + PRICE = 13; + } + + // The representative name for the entity. + string display_name = 1; + + // The entity type. + Type type = 2; + + // Metadata associated with the entity. + // + // For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + // and Knowledge Graph MID (`mid`), if they are available. For the metadata + // associated with other entity types, see the Type table below. + map metadata = 3; + + // The salience score associated with the entity in the [0, 1.0] range. + // + // The salience score for an entity provides information about the + // importance or centrality of that entity to the entire document text. + // Scores closer to 0 are less salient, while scores closer to 1.0 are highly + // salient. + float salience = 4; + + // The aggregate sentiment expressed for this entity in the conversation. + SentimentData sentiment = 5; +} + +// The data for an intent. +// Represents a detected intent in the conversation, for example MAKES_PROMISE. +message Intent { + // The unique identifier of the intent. + string id = 1; + + // The human-readable name of the intent. + string display_name = 2; +} + +// The data for a matched phrase matcher. +// Represents information identifying a phrase matcher for a given match. +message PhraseMatchData { + // The unique identifier (the resource name) of the phrase matcher. + string phrase_matcher = 1; + + // The human-readable name of the phrase matcher. + string display_name = 2; +} + +// The data for a Dialogflow intent. +// Represents a detected intent in the conversation, e.g. MAKES_PROMISE. +message DialogflowIntent { + // The human-readable name of the intent. + string display_name = 1; +} + +// The data for an interruption annotation. +message InterruptionData { + +} + +// The data for a silence annotation. +message SilenceData { + +} + +// The data for a hold annotation. +message HoldData { + +} + +// The data for an entity mention annotation. +// This represents a mention of an `Entity` in the conversation. +message EntityMentionData { + // The supported types of mentions. + enum MentionType { + // Unspecified. + MENTION_TYPE_UNSPECIFIED = 0; + + // Proper noun. + PROPER = 1; + + // Common noun (or noun compound). + COMMON = 2; + } + + // The key of this entity in conversation entities. + // Can be used to retrieve the exact `Entity` this mention is attached to. + string entity_unique_id = 1; + + // The type of the entity mention. + MentionType type = 2; + + // Sentiment expressed for this mention of the entity. + SentimentData sentiment = 3; +} + +// The data for an intent match. +// Represents an intent match for a text segment in the conversation. A text +// segment can be part of a sentence, a complete sentence, or an utterance +// with multiple sentences. +message IntentMatchData { + // The id of the matched intent. + // Can be used to retrieve the corresponding intent information. + string intent_unique_id = 1; +} + +// The data for a sentiment annotation. +message SentimentData { + // A non-negative number from 0 to infinity which represents the abolute + // magnitude of sentiment regardless of score. + float magnitude = 1; + + // The sentiment score between -1.0 (negative) and 1.0 (positive). + float score = 2; +} + +// The issue model resource. +message IssueModel { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + pattern: "projects/{project}/locations/{location}/issueModels/{issue_model}" + }; + + // Configs for the input data used to create the issue model. + message InputDataConfig { + // Medium of conversations used in training data. This field is being + // deprecated. To specify the medium to be used in training a new issue + // model, set the `medium` field on `filter`. + Conversation.Medium medium = 1 [deprecated = true]; + + // Output only. Number of conversations used in training. Output only. + int64 training_conversations_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A filter to reduce the conversations used for training the model to a + // specific subset. + string filter = 3; + } + + // State of the model. + enum State { + // Unspecified. + STATE_UNSPECIFIED = 0; + + // Model is not deployed but is ready to deploy. + UNDEPLOYED = 1; + + // Model is being deployed. + DEPLOYING = 2; + + // Model is deployed and is ready to be used. A model can only be used in + // analysis if it's in this state. + DEPLOYED = 3; + + // Model is being undeployed. + UNDEPLOYING = 4; + + // Model is being deleted. + DELETING = 5; + } + + // Immutable. The resource name of the issue model. + // Format: + // projects/{project}/locations/{location}/issueModels/{issue_model} + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The representative name for the issue model. + string display_name = 2; + + // Output only. The time at which this issue model was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The most recent time at which the issue model was updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the model. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Configs for the input data that used to create the issue model. + InputDataConfig input_data_config = 6; + + // Output only. Immutable. The issue model's label statistics on its training data. + IssueModelLabelStats training_stats = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// The issue resource. +message Issue { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/Issue" + pattern: "projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}" + }; + + // Immutable. The resource name of the issue. + // Format: + // projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The representative name for the issue. + string display_name = 2; + + // Output only. The time at which this issue was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The most recent time that this issue was updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Aggregated statistics about an issue model. +message IssueModelLabelStats { + // Aggregated statistics about an issue. + message IssueStats { + // Issue resource. + // Format: + // projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} + string issue = 1; + + // Number of conversations attached to the issue at this point in time. + int64 labeled_conversations_count = 2; + + // Display name of the issue. + string display_name = 3; + } + + // Number of conversations the issue model has analyzed at this point in time. + int64 analyzed_conversations_count = 1; + + // Number of analyzed conversations for which no issue was applicable at this + // point in time. + int64 unclassified_conversations_count = 2; + + // Statistics on each issue. Key is the issue's resource name. + map issue_stats = 3; +} + +// The phrase matcher resource. +message PhraseMatcher { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/PhraseMatcher" + pattern: "projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}" + }; + + // Specifies how to combine each phrase match rule group to determine whether + // there is a match. + enum PhraseMatcherType { + // Unspecified. + PHRASE_MATCHER_TYPE_UNSPECIFIED = 0; + + // Must meet all phrase match rule groups or there is no match. + ALL_OF = 1; + + // If any of the phrase match rule groups are met, there is a match. + ANY_OF = 2; + } + + // The resource name of the phrase matcher. + // Format: + // projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + string name = 1; + + // Output only. Immutable. The revision ID of the phrase matcher. + // A new revision is committed whenever the matcher is changed, except when it + // is activated or deactivated. A server generated random ID will be used. + // Example: locations/global/phraseMatchers/my-first-matcher@1234567 + string revision_id = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // The customized version tag to use for the phrase matcher. If not specified, + // it will default to `revision_id`. + string version_tag = 3; + + // Output only. The timestamp of when the revision was created. It is also the create time + // when a new matcher is added. + google.protobuf.Timestamp revision_create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The human-readable name of the phrase matcher. + string display_name = 5; + + // Required. The type of this phrase matcher. + PhraseMatcherType type = 6 [(google.api.field_behavior) = REQUIRED]; + + // Applies the phrase matcher only when it is active. + bool active = 7; + + // A list of phase match rule groups that are included in this matcher. + repeated PhraseMatchRuleGroup phrase_match_rule_groups = 8; + + // Output only. The most recent time at which the activation status was updated. + google.protobuf.Timestamp activation_update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The role whose utterances the phrase matcher should be matched + // against. If the role is ROLE_UNSPECIFIED it will be matched against any + // utterances in the transcript. + ConversationParticipant.Role role_match = 10; + + // Output only. The most recent time at which the phrase matcher was updated. + google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A message representing a rule in the phrase matcher. +message PhraseMatchRuleGroup { + // Specifies how to combine each phrase match rule for whether there is a + // match. + enum PhraseMatchRuleGroupType { + // Unspecified. + PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0; + + // Must meet all phrase match rules or there is no match. + ALL_OF = 1; + + // If any of the phrase match rules are met, there is a match. + ANY_OF = 2; + } + + // Required. The type of this phrase match rule group. + PhraseMatchRuleGroupType type = 1 [(google.api.field_behavior) = REQUIRED]; + + // A list of phase match rules that are included in this group. + repeated PhraseMatchRule phrase_match_rules = 2; +} + +// The data for a phrase match rule. +message PhraseMatchRule { + // Required. The phrase to be matched. + string query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Specifies whether the phrase must be missing from the transcript segment or + // present in the transcript segment. + bool negated = 2; + + // Provides additional information about the rule that specifies how to apply + // the rule. + PhraseMatchRuleConfig config = 3; +} + +// Configuration information of a phrase match rule. +message PhraseMatchRuleConfig { + // The configuration of the phrase match rule. + oneof config { + // The configuration for the exact match rule. + ExactMatchConfig exact_match_config = 1; + } +} + +// Exact match configuration. +message ExactMatchConfig { + // Whether to consider case sensitivity when performing an exact match. + bool case_sensitive = 1; +} + +// The settings resource. +message Settings { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/Settings" + pattern: "projects/{project}/locations/{location}/settings" + }; + + // Default configuration when creating Analyses in Insights. + message AnalysisConfig { + // Percentage of conversations created using Dialogflow runtime integration + // to analyze automatically, between [0, 100]. + double runtime_integration_analysis_percentage = 1; + } + + // Immutable. The resource name of the settings resource. + // Format: + // projects/{project}/locations/{location}/settings + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time at which the settings was created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the settings were last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A language code to be applied to each transcript segment unless the segment + // already specifies a language code. Language code defaults to "en-US" if it + // is neither specified on the segment nor here. + string language_code = 4; + + // The default TTL for newly-created conversations. If a conversation has a + // specified expiration, that value will be used instead. Changing this + // value will not change the expiration of existing conversations. + // Conversations with no expire time persist until they are deleted. + google.protobuf.Duration conversation_ttl = 5; + + // A map that maps a notification trigger to a Pub/Sub topic. Each time a + // specified trigger occurs, Insights will notify the corresponding Pub/Sub + // topic. + // + // Keys are notification triggers. Supported keys are: + // + // * "all-triggers": Notify each time any of the supported triggers occurs. + // * "create-analysis": Notify each time an analysis is created. + // * "create-conversation": Notify each time a conversation is created. + // * "export-insights-data": Notify each time an export is complete. + // * "update-conversation": Notify each time a conversation is updated via + // UpdateConversation. + // + // Values are Pub/Sub topics. The format of each Pub/Sub topic is: + // projects/{project}/topics/{topic} + map pubsub_notification_settings = 6; + + // Default analysis settings. + AnalysisConfig analysis_config = 7; +} + +// An annotation that was generated during the customer and agent interaction. +message RuntimeAnnotation { + // The data in the annotation. + oneof data { + // Agent Assist Article Suggestion data. + ArticleSuggestionData article_suggestion = 6; + + // Agent Assist FAQ answer data. + FaqAnswerData faq_answer = 7; + + // Agent Assist Smart Reply data. + SmartReplyData smart_reply = 8; + + // Agent Assist Smart Compose suggestion data. + SmartComposeSuggestionData smart_compose_suggestion = 9; + + // Dialogflow interaction data. + DialogflowInteractionData dialogflow_interaction = 10; + } + + // The unique identifier of the annotation. + // Format: + // projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} + string annotation_id = 1; + + // The time at which this annotation was created. + google.protobuf.Timestamp create_time = 2; + + // The boundary in the conversation where the annotation starts, inclusive. + AnnotationBoundary start_boundary = 3; + + // The boundary in the conversation where the annotation ends, inclusive. + AnnotationBoundary end_boundary = 4; + + // The feedback that the customer has about the answer in `data`. + AnswerFeedback answer_feedback = 5; +} + +// The feedback that the customer has about a certain answer in the +// conversation. +message AnswerFeedback { + // The correctness level of an answer. + enum CorrectnessLevel { + // Correctness level unspecified. + CORRECTNESS_LEVEL_UNSPECIFIED = 0; + + // Answer is totally wrong. + NOT_CORRECT = 1; + + // Answer is partially correct. + PARTIALLY_CORRECT = 2; + + // Answer is fully correct. + FULLY_CORRECT = 3; + } + + // The correctness level of an answer. + CorrectnessLevel correctness_level = 1; + + // Indicates whether an answer or item was clicked by the human agent. + bool clicked = 2; + + // Indicates whether an answer or item was displayed to the human agent in the + // agent desktop UI. + bool displayed = 3; +} + +// Agent Assist Article Suggestion data. +message ArticleSuggestionData { + // Article title. + string title = 1; + + // Article URI. + string uri = 2; + + // The system's confidence score that this article is a good match for this + // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + // certain). + float confidence_score = 3; + + // Map that contains metadata about the Article Suggestion and the document + // that it originates from. + map metadata = 4; + + // The name of the answer record. + // Format: + // projects/{project}/locations/{location}/answerRecords/{answer_record} + string query_record = 5; + + // The knowledge document that this answer was extracted from. + // Format: + // projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} + string source = 6; +} + +// Agent Assist frequently-asked-question answer data. +message FaqAnswerData { + // The piece of text from the `source` knowledge base document. + string answer = 1; + + // The system's confidence score that this answer is a good match for this + // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + // certain). + float confidence_score = 2; + + // The corresponding FAQ question. + string question = 3; + + // Map that contains metadata about the FAQ answer and the document that + // it originates from. + map metadata = 4; + + // The name of the answer record. + // Format: + // projects/{project}/locations/{location}/answerRecords/{answer_record} + string query_record = 5; + + // The knowledge document that this answer was extracted from. + // Format: + // projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. + string source = 6; +} + +// Agent Assist Smart Reply data. +message SmartReplyData { + // The content of the reply. + string reply = 1; + + // The system's confidence score that this reply is a good match for this + // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + // certain). + double confidence_score = 2; + + // Map that contains metadata about the Smart Reply and the document from + // which it originates. + map metadata = 3; + + // The name of the answer record. + // Format: + // projects/{project}/locations/{location}/answerRecords/{answer_record} + string query_record = 4; +} + +// Agent Assist Smart Compose suggestion data. +message SmartComposeSuggestionData { + // The content of the suggestion. + string suggestion = 1; + + // The system's confidence score that this suggestion is a good match for this + // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + // certain). + double confidence_score = 2; + + // Map that contains metadata about the Smart Compose suggestion and the + // document from which it originates. + map metadata = 3; + + // The name of the answer record. + // Format: + // projects/{project}/locations/{location}/answerRecords/{answer_record} + string query_record = 4; +} + +// Dialogflow interaction data. +message DialogflowInteractionData { + // The Dialogflow intent resource path. Format: + // projects/{project}/agent/{agent}/intents/{intent} + string dialogflow_intent_id = 1; + + // The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 + // (completely certain). + float confidence = 2; +} + +// The call participant speaking for a given utterance. +message ConversationParticipant { + // The role of the participant. + enum Role { + // Participant's role is not set. + ROLE_UNSPECIFIED = 0; + + // Participant is a human agent. + HUMAN_AGENT = 1; + + // Participant is an automated agent. + AUTOMATED_AGENT = 2; + + // Participant is an end user who conversed with the contact center. + END_USER = 3; + + // Participant is either a human or automated agent. + ANY_AGENT = 4; + } + + oneof participant { + // The name of the participant provided by Dialogflow. Format: + // projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + string dialogflow_participant_name = 5 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Participant" + }]; + + // A user-specified ID representing the participant. + string user_id = 6; + } + + // Deprecated. Use `dialogflow_participant_name` instead. + // The name of the Dialogflow participant. Format: + // projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} + string dialogflow_participant = 1 [deprecated = true]; + + // Obfuscated user ID from Dialogflow. + string obfuscated_external_user_id = 3; + + // The role of the participant. + Role role = 2; +} + +// The View resource. +message View { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/View" + pattern: "projects/{project}/locations/{location}/views/{view}" + }; + + // Immutable. The resource name of the view. + // Format: + // projects/{project}/locations/{location}/views/{view} + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The human-readable display name of the view. + string display_name = 2; + + // Output only. The time at which this view was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The most recent time at which the view was updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // String with specific view properties. + string value = 5; +} diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts new file mode 100644 index 00000000000..c54fe68d054 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts @@ -0,0 +1,17515 @@ +// Copyright 2022 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 cloud. */ + namespace cloud { + + /** Namespace contactcenterinsights. */ + namespace contactcenterinsights { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a ContactCenterInsights */ + class ContactCenterInsights extends $protobuf.rpc.Service { + + /** + * Constructs a new ContactCenterInsights 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 ContactCenterInsights 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): ContactCenterInsights; + + /** + * Calls CreateConversation. + * @param request CreateConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation + */ + public createConversation(request: google.cloud.contactcenterinsights.v1.ICreateConversationRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateConversationCallback): void; + + /** + * Calls CreateConversation. + * @param request CreateConversationRequest message or plain object + * @returns Promise + */ + public createConversation(request: google.cloud.contactcenterinsights.v1.ICreateConversationRequest): Promise; + + /** + * Calls UpdateConversation. + * @param request UpdateConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation + */ + public updateConversation(request: google.cloud.contactcenterinsights.v1.IUpdateConversationRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateConversationCallback): void; + + /** + * Calls UpdateConversation. + * @param request UpdateConversationRequest message or plain object + * @returns Promise + */ + public updateConversation(request: google.cloud.contactcenterinsights.v1.IUpdateConversationRequest): Promise; + + /** + * Calls GetConversation. + * @param request GetConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Conversation + */ + public getConversation(request: google.cloud.contactcenterinsights.v1.IGetConversationRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetConversationCallback): void; + + /** + * Calls GetConversation. + * @param request GetConversationRequest message or plain object + * @returns Promise + */ + public getConversation(request: google.cloud.contactcenterinsights.v1.IGetConversationRequest): Promise; + + /** + * Calls ListConversations. + * @param request ListConversationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversationsResponse + */ + public listConversations(request: google.cloud.contactcenterinsights.v1.IListConversationsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListConversationsCallback): void; + + /** + * Calls ListConversations. + * @param request ListConversationsRequest message or plain object + * @returns Promise + */ + public listConversations(request: google.cloud.contactcenterinsights.v1.IListConversationsRequest): Promise; + + /** + * Calls DeleteConversation. + * @param request DeleteConversationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteConversation(request: google.cloud.contactcenterinsights.v1.IDeleteConversationRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteConversationCallback): void; + + /** + * Calls DeleteConversation. + * @param request DeleteConversationRequest message or plain object + * @returns Promise + */ + public deleteConversation(request: google.cloud.contactcenterinsights.v1.IDeleteConversationRequest): Promise; + + /** + * Calls CreateAnalysis. + * @param request CreateAnalysisRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAnalysis(request: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateAnalysisCallback): void; + + /** + * Calls CreateAnalysis. + * @param request CreateAnalysisRequest message or plain object + * @returns Promise + */ + public createAnalysis(request: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest): Promise; + + /** + * Calls GetAnalysis. + * @param request GetAnalysisRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Analysis + */ + public getAnalysis(request: google.cloud.contactcenterinsights.v1.IGetAnalysisRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetAnalysisCallback): void; + + /** + * Calls GetAnalysis. + * @param request GetAnalysisRequest message or plain object + * @returns Promise + */ + public getAnalysis(request: google.cloud.contactcenterinsights.v1.IGetAnalysisRequest): Promise; + + /** + * Calls ListAnalyses. + * @param request ListAnalysesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAnalysesResponse + */ + public listAnalyses(request: google.cloud.contactcenterinsights.v1.IListAnalysesRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAnalysesCallback): void; + + /** + * Calls ListAnalyses. + * @param request ListAnalysesRequest message or plain object + * @returns Promise + */ + public listAnalyses(request: google.cloud.contactcenterinsights.v1.IListAnalysesRequest): Promise; + + /** + * Calls DeleteAnalysis. + * @param request DeleteAnalysisRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAnalysis(request: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteAnalysisCallback): void; + + /** + * Calls DeleteAnalysis. + * @param request DeleteAnalysisRequest message or plain object + * @returns Promise + */ + public deleteAnalysis(request: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest): Promise; + + /** + * Calls ExportInsightsData. + * @param request ExportInsightsDataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportInsightsData(request: google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportInsightsDataCallback): void; + + /** + * Calls ExportInsightsData. + * @param request ExportInsightsDataRequest message or plain object + * @returns Promise + */ + public exportInsightsData(request: google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest): Promise; + + /** + * Calls CreateIssueModel. + * @param request CreateIssueModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createIssueModel(request: google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateIssueModelCallback): void; + + /** + * Calls CreateIssueModel. + * @param request CreateIssueModelRequest message or plain object + * @returns Promise + */ + public createIssueModel(request: google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest): Promise; + + /** + * Calls UpdateIssueModel. + * @param request UpdateIssueModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IssueModel + */ + public updateIssueModel(request: google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssueModelCallback): void; + + /** + * Calls UpdateIssueModel. + * @param request UpdateIssueModelRequest message or plain object + * @returns Promise + */ + public updateIssueModel(request: google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest): Promise; + + /** + * Calls GetIssueModel. + * @param request GetIssueModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and IssueModel + */ + public getIssueModel(request: google.cloud.contactcenterinsights.v1.IGetIssueModelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssueModelCallback): void; + + /** + * Calls GetIssueModel. + * @param request GetIssueModelRequest message or plain object + * @returns Promise + */ + public getIssueModel(request: google.cloud.contactcenterinsights.v1.IGetIssueModelRequest): Promise; + + /** + * Calls ListIssueModels. + * @param request ListIssueModelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListIssueModelsResponse + */ + public listIssueModels(request: google.cloud.contactcenterinsights.v1.IListIssueModelsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssueModelsCallback): void; + + /** + * Calls ListIssueModels. + * @param request ListIssueModelsRequest message or plain object + * @returns Promise + */ + public listIssueModels(request: google.cloud.contactcenterinsights.v1.IListIssueModelsRequest): Promise; + + /** + * Calls DeleteIssueModel. + * @param request DeleteIssueModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteIssueModel(request: google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssueModelCallback): void; + + /** + * Calls DeleteIssueModel. + * @param request DeleteIssueModelRequest message or plain object + * @returns Promise + */ + public deleteIssueModel(request: google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest): Promise; + + /** + * Calls DeployIssueModel. + * @param request DeployIssueModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deployIssueModel(request: google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeployIssueModelCallback): void; + + /** + * Calls DeployIssueModel. + * @param request DeployIssueModelRequest message or plain object + * @returns Promise + */ + public deployIssueModel(request: google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest): Promise; + + /** + * Calls UndeployIssueModel. + * @param request UndeployIssueModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public undeployIssueModel(request: google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UndeployIssueModelCallback): void; + + /** + * Calls UndeployIssueModel. + * @param request UndeployIssueModelRequest message or plain object + * @returns Promise + */ + public undeployIssueModel(request: google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest): Promise; + + /** + * Calls GetIssue. + * @param request GetIssueRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Issue + */ + public getIssue(request: google.cloud.contactcenterinsights.v1.IGetIssueRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssueCallback): void; + + /** + * Calls GetIssue. + * @param request GetIssueRequest message or plain object + * @returns Promise + */ + public getIssue(request: google.cloud.contactcenterinsights.v1.IGetIssueRequest): Promise; + + /** + * Calls ListIssues. + * @param request ListIssuesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListIssuesResponse + */ + public listIssues(request: google.cloud.contactcenterinsights.v1.IListIssuesRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssuesCallback): void; + + /** + * Calls ListIssues. + * @param request ListIssuesRequest message or plain object + * @returns Promise + */ + public listIssues(request: google.cloud.contactcenterinsights.v1.IListIssuesRequest): Promise; + + /** + * Calls UpdateIssue. + * @param request UpdateIssueRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Issue + */ + public updateIssue(request: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssueCallback): void; + + /** + * Calls UpdateIssue. + * @param request UpdateIssueRequest message or plain object + * @returns Promise + */ + public updateIssue(request: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest): Promise; + + /** + * Calls CalculateIssueModelStats. + * @param request CalculateIssueModelStatsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CalculateIssueModelStatsResponse + */ + public calculateIssueModelStats(request: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateIssueModelStatsCallback): void; + + /** + * Calls CalculateIssueModelStats. + * @param request CalculateIssueModelStatsRequest message or plain object + * @returns Promise + */ + public calculateIssueModelStats(request: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest): Promise; + + /** + * Calls CreatePhraseMatcher. + * @param request CreatePhraseMatcherRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PhraseMatcher + */ + public createPhraseMatcher(request: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreatePhraseMatcherCallback): void; + + /** + * Calls CreatePhraseMatcher. + * @param request CreatePhraseMatcherRequest message or plain object + * @returns Promise + */ + public createPhraseMatcher(request: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest): Promise; + + /** + * Calls GetPhraseMatcher. + * @param request GetPhraseMatcherRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PhraseMatcher + */ + public getPhraseMatcher(request: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetPhraseMatcherCallback): void; + + /** + * Calls GetPhraseMatcher. + * @param request GetPhraseMatcherRequest message or plain object + * @returns Promise + */ + public getPhraseMatcher(request: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest): Promise; + + /** + * Calls ListPhraseMatchers. + * @param request ListPhraseMatchersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPhraseMatchersResponse + */ + public listPhraseMatchers(request: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListPhraseMatchersCallback): void; + + /** + * Calls ListPhraseMatchers. + * @param request ListPhraseMatchersRequest message or plain object + * @returns Promise + */ + public listPhraseMatchers(request: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest): Promise; + + /** + * Calls DeletePhraseMatcher. + * @param request DeletePhraseMatcherRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deletePhraseMatcher(request: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeletePhraseMatcherCallback): void; + + /** + * Calls DeletePhraseMatcher. + * @param request DeletePhraseMatcherRequest message or plain object + * @returns Promise + */ + public deletePhraseMatcher(request: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest): Promise; + + /** + * Calls UpdatePhraseMatcher. + * @param request UpdatePhraseMatcherRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PhraseMatcher + */ + public updatePhraseMatcher(request: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdatePhraseMatcherCallback): void; + + /** + * Calls UpdatePhraseMatcher. + * @param request UpdatePhraseMatcherRequest message or plain object + * @returns Promise + */ + public updatePhraseMatcher(request: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest): Promise; + + /** + * Calls CalculateStats. + * @param request CalculateStatsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CalculateStatsResponse + */ + public calculateStats(request: google.cloud.contactcenterinsights.v1.ICalculateStatsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateStatsCallback): void; + + /** + * Calls CalculateStats. + * @param request CalculateStatsRequest message or plain object + * @returns Promise + */ + public calculateStats(request: google.cloud.contactcenterinsights.v1.ICalculateStatsRequest): Promise; + + /** + * Calls GetSettings. + * @param request GetSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Settings + */ + public getSettings(request: google.cloud.contactcenterinsights.v1.IGetSettingsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetSettingsCallback): void; + + /** + * Calls GetSettings. + * @param request GetSettingsRequest message or plain object + * @returns Promise + */ + public getSettings(request: google.cloud.contactcenterinsights.v1.IGetSettingsRequest): Promise; + + /** + * Calls UpdateSettings. + * @param request UpdateSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Settings + */ + public updateSettings(request: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateSettingsCallback): void; + + /** + * Calls UpdateSettings. + * @param request UpdateSettingsRequest message or plain object + * @returns Promise + */ + public updateSettings(request: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest): Promise; + + /** + * Calls CreateView. + * @param request CreateViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and View + */ + public createView(request: google.cloud.contactcenterinsights.v1.ICreateViewRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateViewCallback): void; + + /** + * Calls CreateView. + * @param request CreateViewRequest message or plain object + * @returns Promise + */ + public createView(request: google.cloud.contactcenterinsights.v1.ICreateViewRequest): Promise; + + /** + * Calls GetView. + * @param request GetViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and View + */ + public getView(request: google.cloud.contactcenterinsights.v1.IGetViewRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetViewCallback): void; + + /** + * Calls GetView. + * @param request GetViewRequest message or plain object + * @returns Promise + */ + public getView(request: google.cloud.contactcenterinsights.v1.IGetViewRequest): Promise; + + /** + * Calls ListViews. + * @param request ListViewsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListViewsResponse + */ + public listViews(request: google.cloud.contactcenterinsights.v1.IListViewsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListViewsCallback): void; + + /** + * Calls ListViews. + * @param request ListViewsRequest message or plain object + * @returns Promise + */ + public listViews(request: google.cloud.contactcenterinsights.v1.IListViewsRequest): Promise; + + /** + * Calls UpdateView. + * @param request UpdateViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and View + */ + public updateView(request: google.cloud.contactcenterinsights.v1.IUpdateViewRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateViewCallback): void; + + /** + * Calls UpdateView. + * @param request UpdateViewRequest message or plain object + * @returns Promise + */ + public updateView(request: google.cloud.contactcenterinsights.v1.IUpdateViewRequest): Promise; + + /** + * Calls DeleteView. + * @param request DeleteViewRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteView(request: google.cloud.contactcenterinsights.v1.IDeleteViewRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteViewCallback): void; + + /** + * Calls DeleteView. + * @param request DeleteViewRequest message or plain object + * @returns Promise + */ + public deleteView(request: google.cloud.contactcenterinsights.v1.IDeleteViewRequest): Promise; + } + + namespace ContactCenterInsights { + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type CreateConversationCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type UpdateConversationCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getConversation}. + * @param error Error, if any + * @param [response] Conversation + */ + type GetConversationCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Conversation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listConversations}. + * @param error Error, if any + * @param [response] ListConversationsResponse + */ + type ListConversationsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListConversationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteConversation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteConversationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createAnalysis}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAnalysisCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getAnalysis}. + * @param error Error, if any + * @param [response] Analysis + */ + type GetAnalysisCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Analysis) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listAnalyses}. + * @param error Error, if any + * @param [response] ListAnalysesResponse + */ + type ListAnalysesCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListAnalysesResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteAnalysis}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAnalysisCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|exportInsightsData}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportInsightsDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createIssueModel}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateIssueModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateIssueModel}. + * @param error Error, if any + * @param [response] IssueModel + */ + type UpdateIssueModelCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.IssueModel) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getIssueModel}. + * @param error Error, if any + * @param [response] IssueModel + */ + type GetIssueModelCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.IssueModel) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listIssueModels}. + * @param error Error, if any + * @param [response] ListIssueModelsResponse + */ + type ListIssueModelsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListIssueModelsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteIssueModel}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteIssueModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deployIssueModel}. + * @param error Error, if any + * @param [response] Operation + */ + type DeployIssueModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|undeployIssueModel}. + * @param error Error, if any + * @param [response] Operation + */ + type UndeployIssueModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getIssue}. + * @param error Error, if any + * @param [response] Issue + */ + type GetIssueCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Issue) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listIssues}. + * @param error Error, if any + * @param [response] ListIssuesResponse + */ + type ListIssuesCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListIssuesResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateIssue}. + * @param error Error, if any + * @param [response] Issue + */ + type UpdateIssueCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Issue) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|calculateIssueModelStats}. + * @param error Error, if any + * @param [response] CalculateIssueModelStatsResponse + */ + type CalculateIssueModelStatsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createPhraseMatcher}. + * @param error Error, if any + * @param [response] PhraseMatcher + */ + type CreatePhraseMatcherCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.PhraseMatcher) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getPhraseMatcher}. + * @param error Error, if any + * @param [response] PhraseMatcher + */ + type GetPhraseMatcherCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.PhraseMatcher) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listPhraseMatchers}. + * @param error Error, if any + * @param [response] ListPhraseMatchersResponse + */ + type ListPhraseMatchersCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deletePhraseMatcher}. + * @param error Error, if any + * @param [response] Empty + */ + type DeletePhraseMatcherCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updatePhraseMatcher}. + * @param error Error, if any + * @param [response] PhraseMatcher + */ + type UpdatePhraseMatcherCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.PhraseMatcher) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|calculateStats}. + * @param error Error, if any + * @param [response] CalculateStatsResponse + */ + type CalculateStatsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.CalculateStatsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getSettings}. + * @param error Error, if any + * @param [response] Settings + */ + type GetSettingsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Settings) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateSettings}. + * @param error Error, if any + * @param [response] Settings + */ + type UpdateSettingsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Settings) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createView}. + * @param error Error, if any + * @param [response] View + */ + type CreateViewCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.View) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getView}. + * @param error Error, if any + * @param [response] View + */ + type GetViewCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.View) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listViews}. + * @param error Error, if any + * @param [response] ListViewsResponse + */ + type ListViewsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListViewsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateView}. + * @param error Error, if any + * @param [response] View + */ + type UpdateViewCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.View) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteView}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + } + + /** ConversationView enum. */ + enum ConversationView { + CONVERSATION_VIEW_UNSPECIFIED = 0, + FULL = 2, + BASIC = 1 + } + + /** Properties of a CalculateStatsRequest. */ + interface ICalculateStatsRequest { + + /** CalculateStatsRequest location */ + location?: (string|null); + + /** CalculateStatsRequest filter */ + filter?: (string|null); + } + + /** Represents a CalculateStatsRequest. */ + class CalculateStatsRequest implements ICalculateStatsRequest { + + /** + * Constructs a new CalculateStatsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICalculateStatsRequest); + + /** CalculateStatsRequest location. */ + public location: string; + + /** CalculateStatsRequest filter. */ + public filter: string; + + /** + * Creates a new CalculateStatsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateStatsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICalculateStatsRequest): google.cloud.contactcenterinsights.v1.CalculateStatsRequest; + + /** + * Encodes the specified CalculateStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsRequest.verify|verify} messages. + * @param message CalculateStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICalculateStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsRequest.verify|verify} messages. + * @param message CalculateStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICalculateStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateStatsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateStatsRequest; + + /** + * Decodes a CalculateStatsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateStatsRequest; + + /** + * Verifies a CalculateStatsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CalculateStatsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateStatsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateStatsRequest; + + /** + * Creates a plain object from a CalculateStatsRequest message. Also converts values to other types if specified. + * @param message CalculateStatsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateStatsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateStatsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateStatsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CalculateStatsResponse. */ + interface ICalculateStatsResponse { + + /** CalculateStatsResponse averageDuration */ + averageDuration?: (google.protobuf.IDuration|null); + + /** CalculateStatsResponse averageTurnCount */ + averageTurnCount?: (number|null); + + /** CalculateStatsResponse conversationCount */ + conversationCount?: (number|null); + + /** CalculateStatsResponse smartHighlighterMatches */ + smartHighlighterMatches?: ({ [k: string]: number }|null); + + /** CalculateStatsResponse customHighlighterMatches */ + customHighlighterMatches?: ({ [k: string]: number }|null); + + /** CalculateStatsResponse issueMatches */ + issueMatches?: ({ [k: string]: number }|null); + + /** CalculateStatsResponse issueMatchesStats */ + issueMatchesStats?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats }|null); + + /** CalculateStatsResponse conversationCountTimeSeries */ + conversationCountTimeSeries?: (google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries|null); + } + + /** Represents a CalculateStatsResponse. */ + class CalculateStatsResponse implements ICalculateStatsResponse { + + /** + * Constructs a new CalculateStatsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICalculateStatsResponse); + + /** CalculateStatsResponse averageDuration. */ + public averageDuration?: (google.protobuf.IDuration|null); + + /** CalculateStatsResponse averageTurnCount. */ + public averageTurnCount: number; + + /** CalculateStatsResponse conversationCount. */ + public conversationCount: number; + + /** CalculateStatsResponse smartHighlighterMatches. */ + public smartHighlighterMatches: { [k: string]: number }; + + /** CalculateStatsResponse customHighlighterMatches. */ + public customHighlighterMatches: { [k: string]: number }; + + /** CalculateStatsResponse issueMatches. */ + public issueMatches: { [k: string]: number }; + + /** CalculateStatsResponse issueMatchesStats. */ + public issueMatchesStats: { [k: string]: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats }; + + /** CalculateStatsResponse conversationCountTimeSeries. */ + public conversationCountTimeSeries?: (google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries|null); + + /** + * Creates a new CalculateStatsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateStatsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICalculateStatsResponse): google.cloud.contactcenterinsights.v1.CalculateStatsResponse; + + /** + * Encodes the specified CalculateStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.verify|verify} messages. + * @param message CalculateStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICalculateStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.verify|verify} messages. + * @param message CalculateStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICalculateStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateStatsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateStatsResponse; + + /** + * Decodes a CalculateStatsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateStatsResponse; + + /** + * Verifies a CalculateStatsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CalculateStatsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateStatsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateStatsResponse; + + /** + * Creates a plain object from a CalculateStatsResponse message. Also converts values to other types if specified. + * @param message CalculateStatsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateStatsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateStatsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateStatsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CalculateStatsResponse { + + /** Properties of a TimeSeries. */ + interface ITimeSeries { + + /** TimeSeries intervalDuration */ + intervalDuration?: (google.protobuf.IDuration|null); + + /** TimeSeries points */ + points?: (google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval[]|null); + } + + /** Represents a TimeSeries. */ + class TimeSeries implements ITimeSeries { + + /** + * Constructs a new TimeSeries. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries); + + /** TimeSeries intervalDuration. */ + public intervalDuration?: (google.protobuf.IDuration|null); + + /** TimeSeries points. */ + public points: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval[]; + + /** + * Creates a new TimeSeries instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeries instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries): google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries; + + /** + * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries; + + /** + * Verifies a TimeSeries message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeries + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @param message TimeSeries + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeries to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeries + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TimeSeries { + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Interval conversationCount */ + conversationCount?: (number|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval); + + /** Interval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Interval conversationCount. */ + public conversationCount: number; + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval): google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval; + + /** + * Verifies an Interval message. + * @param message Plain 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 Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a CreateAnalysisOperationMetadata. */ + interface ICreateAnalysisOperationMetadata { + + /** CreateAnalysisOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CreateAnalysisOperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** CreateAnalysisOperationMetadata conversation */ + conversation?: (string|null); + } + + /** Represents a CreateAnalysisOperationMetadata. */ + class CreateAnalysisOperationMetadata implements ICreateAnalysisOperationMetadata { + + /** + * Constructs a new CreateAnalysisOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata); + + /** CreateAnalysisOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CreateAnalysisOperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** CreateAnalysisOperationMetadata conversation. */ + public conversation: string; + + /** + * Creates a new CreateAnalysisOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAnalysisOperationMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata): google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata; + + /** + * Encodes the specified CreateAnalysisOperationMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata.verify|verify} messages. + * @param message CreateAnalysisOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAnalysisOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata.verify|verify} messages. + * @param message CreateAnalysisOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAnalysisOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAnalysisOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata; + + /** + * Decodes a CreateAnalysisOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAnalysisOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata; + + /** + * Verifies a CreateAnalysisOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAnalysisOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAnalysisOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata; + + /** + * Creates a plain object from a CreateAnalysisOperationMetadata message. Also converts values to other types if specified. + * @param message CreateAnalysisOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAnalysisOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAnalysisOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConversationRequest. */ + interface ICreateConversationRequest { + + /** CreateConversationRequest parent */ + parent?: (string|null); + + /** CreateConversationRequest conversation */ + conversation?: (google.cloud.contactcenterinsights.v1.IConversation|null); + + /** CreateConversationRequest conversationId */ + conversationId?: (string|null); + } + + /** Represents a CreateConversationRequest. */ + class CreateConversationRequest implements ICreateConversationRequest { + + /** + * Constructs a new CreateConversationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateConversationRequest); + + /** CreateConversationRequest parent. */ + public parent: string; + + /** CreateConversationRequest conversation. */ + public conversation?: (google.cloud.contactcenterinsights.v1.IConversation|null); + + /** CreateConversationRequest conversationId. */ + public conversationId: string; + + /** + * Creates a new CreateConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConversationRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateConversationRequest): google.cloud.contactcenterinsights.v1.CreateConversationRequest; + + /** + * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateConversationRequest.verify|verify} messages. + * @param message CreateConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateConversationRequest.verify|verify} messages. + * @param message CreateConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateConversationRequest; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateConversationRequest; + + /** + * Verifies a CreateConversationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConversationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateConversationRequest; + + /** + * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. + * @param message CreateConversationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConversationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConversationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversationsRequest. */ + interface IListConversationsRequest { + + /** ListConversationsRequest parent */ + parent?: (string|null); + + /** ListConversationsRequest pageSize */ + pageSize?: (number|null); + + /** ListConversationsRequest pageToken */ + pageToken?: (string|null); + + /** ListConversationsRequest filter */ + filter?: (string|null); + + /** ListConversationsRequest view */ + view?: (google.cloud.contactcenterinsights.v1.ConversationView|keyof typeof google.cloud.contactcenterinsights.v1.ConversationView|null); + } + + /** Represents a ListConversationsRequest. */ + class ListConversationsRequest implements IListConversationsRequest { + + /** + * Constructs a new ListConversationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListConversationsRequest); + + /** ListConversationsRequest parent. */ + public parent: string; + + /** ListConversationsRequest pageSize. */ + public pageSize: number; + + /** ListConversationsRequest pageToken. */ + public pageToken: string; + + /** ListConversationsRequest filter. */ + public filter: string; + + /** ListConversationsRequest view. */ + public view: (google.cloud.contactcenterinsights.v1.ConversationView|keyof typeof google.cloud.contactcenterinsights.v1.ConversationView); + + /** + * Creates a new ListConversationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversationsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListConversationsRequest): google.cloud.contactcenterinsights.v1.ListConversationsRequest; + + /** + * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListConversationsRequest.verify|verify} messages. + * @param message ListConversationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListConversationsRequest.verify|verify} messages. + * @param message ListConversationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListConversationsRequest; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListConversationsRequest; + + /** + * Verifies a ListConversationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListConversationsRequest; + + /** + * Creates a plain object from a ListConversationsRequest message. Also converts values to other types if specified. + * @param message ListConversationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListConversationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversationsResponse. */ + interface IListConversationsResponse { + + /** ListConversationsResponse conversations */ + conversations?: (google.cloud.contactcenterinsights.v1.IConversation[]|null); + + /** ListConversationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListConversationsResponse. */ + class ListConversationsResponse implements IListConversationsResponse { + + /** + * Constructs a new ListConversationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListConversationsResponse); + + /** ListConversationsResponse conversations. */ + public conversations: google.cloud.contactcenterinsights.v1.IConversation[]; + + /** ListConversationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListConversationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversationsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListConversationsResponse): google.cloud.contactcenterinsights.v1.ListConversationsResponse; + + /** + * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListConversationsResponse.verify|verify} messages. + * @param message ListConversationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListConversationsResponse.verify|verify} messages. + * @param message ListConversationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListConversationsResponse; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListConversationsResponse; + + /** + * Verifies a ListConversationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListConversationsResponse; + + /** + * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. + * @param message ListConversationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListConversationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConversationRequest. */ + interface IGetConversationRequest { + + /** GetConversationRequest name */ + name?: (string|null); + + /** GetConversationRequest view */ + view?: (google.cloud.contactcenterinsights.v1.ConversationView|keyof typeof google.cloud.contactcenterinsights.v1.ConversationView|null); + } + + /** Represents a GetConversationRequest. */ + class GetConversationRequest implements IGetConversationRequest { + + /** + * Constructs a new GetConversationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetConversationRequest); + + /** GetConversationRequest name. */ + public name: string; + + /** GetConversationRequest view. */ + public view: (google.cloud.contactcenterinsights.v1.ConversationView|keyof typeof google.cloud.contactcenterinsights.v1.ConversationView); + + /** + * Creates a new GetConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConversationRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetConversationRequest): google.cloud.contactcenterinsights.v1.GetConversationRequest; + + /** + * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetConversationRequest.verify|verify} messages. + * @param message GetConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetConversationRequest.verify|verify} messages. + * @param message GetConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetConversationRequest; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetConversationRequest; + + /** + * Verifies a GetConversationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConversationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetConversationRequest; + + /** + * Creates a plain object from a GetConversationRequest message. Also converts values to other types if specified. + * @param message GetConversationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConversationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConversationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConversationRequest. */ + interface IUpdateConversationRequest { + + /** UpdateConversationRequest conversation */ + conversation?: (google.cloud.contactcenterinsights.v1.IConversation|null); + + /** UpdateConversationRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateConversationRequest. */ + class UpdateConversationRequest implements IUpdateConversationRequest { + + /** + * Constructs a new UpdateConversationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateConversationRequest); + + /** UpdateConversationRequest conversation. */ + public conversation?: (google.cloud.contactcenterinsights.v1.IConversation|null); + + /** UpdateConversationRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConversationRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateConversationRequest): google.cloud.contactcenterinsights.v1.UpdateConversationRequest; + + /** + * Encodes the specified UpdateConversationRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateConversationRequest.verify|verify} messages. + * @param message UpdateConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateConversationRequest.verify|verify} messages. + * @param message UpdateConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateConversationRequest; + + /** + * Decodes an UpdateConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateConversationRequest; + + /** + * Verifies an UpdateConversationRequest message. + * @param message Plain 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 UpdateConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConversationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateConversationRequest; + + /** + * Creates a plain object from an UpdateConversationRequest message. Also converts values to other types if specified. + * @param message UpdateConversationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConversationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConversationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConversationRequest. */ + interface IDeleteConversationRequest { + + /** DeleteConversationRequest name */ + name?: (string|null); + + /** DeleteConversationRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteConversationRequest. */ + class DeleteConversationRequest implements IDeleteConversationRequest { + + /** + * Constructs a new DeleteConversationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteConversationRequest); + + /** DeleteConversationRequest name. */ + public name: string; + + /** DeleteConversationRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteConversationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConversationRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteConversationRequest): google.cloud.contactcenterinsights.v1.DeleteConversationRequest; + + /** + * Encodes the specified DeleteConversationRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteConversationRequest.verify|verify} messages. + * @param message DeleteConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConversationRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteConversationRequest.verify|verify} messages. + * @param message DeleteConversationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteConversationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConversationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteConversationRequest; + + /** + * Decodes a DeleteConversationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteConversationRequest; + + /** + * Verifies a DeleteConversationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConversationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConversationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteConversationRequest; + + /** + * Creates a plain object from a DeleteConversationRequest message. Also converts values to other types if specified. + * @param message DeleteConversationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteConversationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConversationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConversationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAnalysisRequest. */ + interface ICreateAnalysisRequest { + + /** CreateAnalysisRequest parent */ + parent?: (string|null); + + /** CreateAnalysisRequest analysis */ + analysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + } + + /** Represents a CreateAnalysisRequest. */ + class CreateAnalysisRequest implements ICreateAnalysisRequest { + + /** + * Constructs a new CreateAnalysisRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest); + + /** CreateAnalysisRequest parent. */ + public parent: string; + + /** CreateAnalysisRequest analysis. */ + public analysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + + /** + * Creates a new CreateAnalysisRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAnalysisRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + + /** + * Encodes the specified CreateAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * @param message CreateAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * @param message CreateAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAnalysisRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + + /** + * Decodes a CreateAnalysisRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + + /** + * Verifies a CreateAnalysisRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAnalysisRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + + /** + * Creates a plain object from a CreateAnalysisRequest message. Also converts values to other types if specified. + * @param message CreateAnalysisRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateAnalysisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAnalysisRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAnalysisRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAnalysesRequest. */ + interface IListAnalysesRequest { + + /** ListAnalysesRequest parent */ + parent?: (string|null); + + /** ListAnalysesRequest pageSize */ + pageSize?: (number|null); + + /** ListAnalysesRequest pageToken */ + pageToken?: (string|null); + + /** ListAnalysesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListAnalysesRequest. */ + class ListAnalysesRequest implements IListAnalysesRequest { + + /** + * Constructs a new ListAnalysesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListAnalysesRequest); + + /** ListAnalysesRequest parent. */ + public parent: string; + + /** ListAnalysesRequest pageSize. */ + public pageSize: number; + + /** ListAnalysesRequest pageToken. */ + public pageToken: string; + + /** ListAnalysesRequest filter. */ + public filter: string; + + /** + * Creates a new ListAnalysesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAnalysesRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListAnalysesRequest): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + + /** + * Encodes the specified ListAnalysesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * @param message ListAnalysesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListAnalysesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAnalysesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * @param message ListAnalysesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListAnalysesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAnalysesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAnalysesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + + /** + * Decodes a ListAnalysesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAnalysesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + + /** + * Verifies a ListAnalysesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAnalysesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAnalysesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + + /** + * Creates a plain object from a ListAnalysesRequest message. Also converts values to other types if specified. + * @param message ListAnalysesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListAnalysesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAnalysesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAnalysesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAnalysesResponse. */ + interface IListAnalysesResponse { + + /** ListAnalysesResponse analyses */ + analyses?: (google.cloud.contactcenterinsights.v1.IAnalysis[]|null); + + /** ListAnalysesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAnalysesResponse. */ + class ListAnalysesResponse implements IListAnalysesResponse { + + /** + * Constructs a new ListAnalysesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListAnalysesResponse); + + /** ListAnalysesResponse analyses. */ + public analyses: google.cloud.contactcenterinsights.v1.IAnalysis[]; + + /** ListAnalysesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAnalysesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAnalysesResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListAnalysesResponse): google.cloud.contactcenterinsights.v1.ListAnalysesResponse; + + /** + * Encodes the specified ListAnalysesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesResponse.verify|verify} messages. + * @param message ListAnalysesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListAnalysesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAnalysesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesResponse.verify|verify} messages. + * @param message ListAnalysesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListAnalysesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAnalysesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAnalysesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListAnalysesResponse; + + /** + * Decodes a ListAnalysesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAnalysesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListAnalysesResponse; + + /** + * Verifies a ListAnalysesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAnalysesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAnalysesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListAnalysesResponse; + + /** + * Creates a plain object from a ListAnalysesResponse message. Also converts values to other types if specified. + * @param message ListAnalysesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListAnalysesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAnalysesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAnalysesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAnalysisRequest. */ + interface IGetAnalysisRequest { + + /** GetAnalysisRequest name */ + name?: (string|null); + } + + /** Represents a GetAnalysisRequest. */ + class GetAnalysisRequest implements IGetAnalysisRequest { + + /** + * Constructs a new GetAnalysisRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetAnalysisRequest); + + /** GetAnalysisRequest name. */ + public name: string; + + /** + * Creates a new GetAnalysisRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAnalysisRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetAnalysisRequest): google.cloud.contactcenterinsights.v1.GetAnalysisRequest; + + /** + * Encodes the specified GetAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRequest.verify|verify} messages. + * @param message GetAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRequest.verify|verify} messages. + * @param message GetAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAnalysisRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetAnalysisRequest; + + /** + * Decodes a GetAnalysisRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetAnalysisRequest; + + /** + * Verifies a GetAnalysisRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAnalysisRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetAnalysisRequest; + + /** + * Creates a plain object from a GetAnalysisRequest message. Also converts values to other types if specified. + * @param message GetAnalysisRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetAnalysisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAnalysisRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAnalysisRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAnalysisRequest. */ + interface IDeleteAnalysisRequest { + + /** DeleteAnalysisRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAnalysisRequest. */ + class DeleteAnalysisRequest implements IDeleteAnalysisRequest { + + /** + * Constructs a new DeleteAnalysisRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest); + + /** DeleteAnalysisRequest name. */ + public name: string; + + /** + * Creates a new DeleteAnalysisRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAnalysisRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + + /** + * Encodes the specified DeleteAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. + * @param message DeleteAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. + * @param message DeleteAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAnalysisRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + + /** + * Decodes a DeleteAnalysisRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + + /** + * Verifies a DeleteAnalysisRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAnalysisRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + + /** + * Creates a plain object from a DeleteAnalysisRequest message. Also converts values to other types if specified. + * @param message DeleteAnalysisRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAnalysisRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAnalysisRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportInsightsDataRequest. */ + interface IExportInsightsDataRequest { + + /** ExportInsightsDataRequest bigQueryDestination */ + bigQueryDestination?: (google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination|null); + + /** ExportInsightsDataRequest parent */ + parent?: (string|null); + + /** ExportInsightsDataRequest filter */ + filter?: (string|null); + + /** ExportInsightsDataRequest kmsKey */ + kmsKey?: (string|null); + + /** ExportInsightsDataRequest writeDisposition */ + writeDisposition?: (google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition|keyof typeof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition|null); + } + + /** Represents an ExportInsightsDataRequest. */ + class ExportInsightsDataRequest implements IExportInsightsDataRequest { + + /** + * Constructs a new ExportInsightsDataRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest); + + /** ExportInsightsDataRequest bigQueryDestination. */ + public bigQueryDestination?: (google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination|null); + + /** ExportInsightsDataRequest parent. */ + public parent: string; + + /** ExportInsightsDataRequest filter. */ + public filter: string; + + /** ExportInsightsDataRequest kmsKey. */ + public kmsKey: string; + + /** ExportInsightsDataRequest writeDisposition. */ + public writeDisposition: (google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition|keyof typeof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition); + + /** ExportInsightsDataRequest destination. */ + public destination?: "bigQueryDestination"; + + /** + * Creates a new ExportInsightsDataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportInsightsDataRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest): google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest; + + /** + * Encodes the specified ExportInsightsDataRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.verify|verify} messages. + * @param message ExportInsightsDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportInsightsDataRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.verify|verify} messages. + * @param message ExportInsightsDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportInsightsDataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportInsightsDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest; + + /** + * Decodes an ExportInsightsDataRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportInsightsDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest; + + /** + * Verifies an ExportInsightsDataRequest message. + * @param message Plain 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 ExportInsightsDataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportInsightsDataRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest; + + /** + * Creates a plain object from an ExportInsightsDataRequest message. Also converts values to other types if specified. + * @param message ExportInsightsDataRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportInsightsDataRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportInsightsDataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExportInsightsDataRequest { + + /** Properties of a BigQueryDestination. */ + interface IBigQueryDestination { + + /** BigQueryDestination projectId */ + projectId?: (string|null); + + /** BigQueryDestination dataset */ + dataset?: (string|null); + + /** BigQueryDestination table */ + table?: (string|null); + } + + /** Represents a BigQueryDestination. */ + class BigQueryDestination implements IBigQueryDestination { + + /** + * Constructs a new BigQueryDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination); + + /** BigQueryDestination projectId. */ + public projectId: string; + + /** BigQueryDestination dataset. */ + public dataset: string; + + /** BigQueryDestination table. */ + public table: string; + + /** + * Creates a new BigQueryDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryDestination instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination): google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination; + + /** + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination.verify|verify} messages. + * @param message BigQueryDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination; + + /** + * Verifies a BigQueryDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination; + + /** + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * @param message BigQueryDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** WriteDisposition enum. */ + enum WriteDisposition { + WRITE_DISPOSITION_UNSPECIFIED = 0, + WRITE_TRUNCATE = 1, + WRITE_APPEND = 2 + } + } + + /** Properties of an ExportInsightsDataMetadata. */ + interface IExportInsightsDataMetadata { + + /** ExportInsightsDataMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ExportInsightsDataMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** ExportInsightsDataMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest|null); + + /** ExportInsightsDataMetadata partialErrors */ + partialErrors?: (google.rpc.IStatus[]|null); + } + + /** Represents an ExportInsightsDataMetadata. */ + class ExportInsightsDataMetadata implements IExportInsightsDataMetadata { + + /** + * Constructs a new ExportInsightsDataMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata); + + /** ExportInsightsDataMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ExportInsightsDataMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** ExportInsightsDataMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest|null); + + /** ExportInsightsDataMetadata partialErrors. */ + public partialErrors: google.rpc.IStatus[]; + + /** + * Creates a new ExportInsightsDataMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportInsightsDataMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata): google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata; + + /** + * Encodes the specified ExportInsightsDataMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata.verify|verify} messages. + * @param message ExportInsightsDataMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportInsightsDataMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata.verify|verify} messages. + * @param message ExportInsightsDataMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportInsightsDataMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportInsightsDataMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata; + + /** + * Decodes an ExportInsightsDataMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportInsightsDataMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata; + + /** + * Verifies an ExportInsightsDataMetadata message. + * @param message Plain 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 ExportInsightsDataMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportInsightsDataMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata; + + /** + * Creates a plain object from an ExportInsightsDataMetadata message. Also converts values to other types if specified. + * @param message ExportInsightsDataMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportInsightsDataMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportInsightsDataMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExportInsightsDataResponse. */ + interface IExportInsightsDataResponse { + } + + /** Represents an ExportInsightsDataResponse. */ + class ExportInsightsDataResponse implements IExportInsightsDataResponse { + + /** + * Constructs a new ExportInsightsDataResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse); + + /** + * Creates a new ExportInsightsDataResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExportInsightsDataResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse): google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse; + + /** + * Encodes the specified ExportInsightsDataResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse.verify|verify} messages. + * @param message ExportInsightsDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExportInsightsDataResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse.verify|verify} messages. + * @param message ExportInsightsDataResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExportInsightsDataResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExportInsightsDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse; + + /** + * Decodes an ExportInsightsDataResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExportInsightsDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse; + + /** + * Verifies an ExportInsightsDataResponse message. + * @param message Plain 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 ExportInsightsDataResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportInsightsDataResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse; + + /** + * Creates a plain object from an ExportInsightsDataResponse message. Also converts values to other types if specified. + * @param message ExportInsightsDataResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExportInsightsDataResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExportInsightsDataResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateIssueModelRequest. */ + interface ICreateIssueModelRequest { + + /** CreateIssueModelRequest parent */ + parent?: (string|null); + + /** CreateIssueModelRequest issueModel */ + issueModel?: (google.cloud.contactcenterinsights.v1.IIssueModel|null); + } + + /** Represents a CreateIssueModelRequest. */ + class CreateIssueModelRequest implements ICreateIssueModelRequest { + + /** + * Constructs a new CreateIssueModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest); + + /** CreateIssueModelRequest parent. */ + public parent: string; + + /** CreateIssueModelRequest issueModel. */ + public issueModel?: (google.cloud.contactcenterinsights.v1.IIssueModel|null); + + /** + * Creates a new CreateIssueModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateIssueModelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest): google.cloud.contactcenterinsights.v1.CreateIssueModelRequest; + + /** + * Encodes the specified CreateIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.verify|verify} messages. + * @param message CreateIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.verify|verify} messages. + * @param message CreateIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateIssueModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateIssueModelRequest; + + /** + * Decodes a CreateIssueModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateIssueModelRequest; + + /** + * Verifies a CreateIssueModelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateIssueModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateIssueModelRequest; + + /** + * Creates a plain object from a CreateIssueModelRequest message. Also converts values to other types if specified. + * @param message CreateIssueModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateIssueModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateIssueModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateIssueModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateIssueModelMetadata. */ + interface ICreateIssueModelMetadata { + + /** CreateIssueModelMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CreateIssueModelMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** CreateIssueModelMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest|null); + } + + /** Represents a CreateIssueModelMetadata. */ + class CreateIssueModelMetadata implements ICreateIssueModelMetadata { + + /** + * Constructs a new CreateIssueModelMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata); + + /** CreateIssueModelMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CreateIssueModelMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** CreateIssueModelMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest|null); + + /** + * Creates a new CreateIssueModelMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateIssueModelMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata): google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata; + + /** + * Encodes the specified CreateIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata.verify|verify} messages. + * @param message CreateIssueModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata.verify|verify} messages. + * @param message CreateIssueModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateIssueModelMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata; + + /** + * Decodes a CreateIssueModelMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata; + + /** + * Verifies a CreateIssueModelMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateIssueModelMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateIssueModelMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata; + + /** + * Creates a plain object from a CreateIssueModelMetadata message. Also converts values to other types if specified. + * @param message CreateIssueModelMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateIssueModelMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateIssueModelMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateIssueModelRequest. */ + interface IUpdateIssueModelRequest { + + /** UpdateIssueModelRequest issueModel */ + issueModel?: (google.cloud.contactcenterinsights.v1.IIssueModel|null); + + /** UpdateIssueModelRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateIssueModelRequest. */ + class UpdateIssueModelRequest implements IUpdateIssueModelRequest { + + /** + * Constructs a new UpdateIssueModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest); + + /** UpdateIssueModelRequest issueModel. */ + public issueModel?: (google.cloud.contactcenterinsights.v1.IIssueModel|null); + + /** UpdateIssueModelRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateIssueModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateIssueModelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest): google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest; + + /** + * Encodes the specified UpdateIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest.verify|verify} messages. + * @param message UpdateIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest.verify|verify} messages. + * @param message UpdateIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateIssueModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest; + + /** + * Decodes an UpdateIssueModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest; + + /** + * Verifies an UpdateIssueModelRequest message. + * @param message Plain 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 UpdateIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateIssueModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest; + + /** + * Creates a plain object from an UpdateIssueModelRequest message. Also converts values to other types if specified. + * @param message UpdateIssueModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateIssueModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateIssueModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListIssueModelsRequest. */ + interface IListIssueModelsRequest { + + /** ListIssueModelsRequest parent */ + parent?: (string|null); + } + + /** Represents a ListIssueModelsRequest. */ + class ListIssueModelsRequest implements IListIssueModelsRequest { + + /** + * Constructs a new ListIssueModelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListIssueModelsRequest); + + /** ListIssueModelsRequest parent. */ + public parent: string; + + /** + * Creates a new ListIssueModelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListIssueModelsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListIssueModelsRequest): google.cloud.contactcenterinsights.v1.ListIssueModelsRequest; + + /** + * Encodes the specified ListIssueModelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssueModelsRequest.verify|verify} messages. + * @param message ListIssueModelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListIssueModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListIssueModelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssueModelsRequest.verify|verify} messages. + * @param message ListIssueModelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListIssueModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListIssueModelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListIssueModelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListIssueModelsRequest; + + /** + * Decodes a ListIssueModelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListIssueModelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListIssueModelsRequest; + + /** + * Verifies a ListIssueModelsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListIssueModelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListIssueModelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListIssueModelsRequest; + + /** + * Creates a plain object from a ListIssueModelsRequest message. Also converts values to other types if specified. + * @param message ListIssueModelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListIssueModelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListIssueModelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListIssueModelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListIssueModelsResponse. */ + interface IListIssueModelsResponse { + + /** ListIssueModelsResponse issueModels */ + issueModels?: (google.cloud.contactcenterinsights.v1.IIssueModel[]|null); + } + + /** Represents a ListIssueModelsResponse. */ + class ListIssueModelsResponse implements IListIssueModelsResponse { + + /** + * Constructs a new ListIssueModelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListIssueModelsResponse); + + /** ListIssueModelsResponse issueModels. */ + public issueModels: google.cloud.contactcenterinsights.v1.IIssueModel[]; + + /** + * Creates a new ListIssueModelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListIssueModelsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListIssueModelsResponse): google.cloud.contactcenterinsights.v1.ListIssueModelsResponse; + + /** + * Encodes the specified ListIssueModelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssueModelsResponse.verify|verify} messages. + * @param message ListIssueModelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListIssueModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListIssueModelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssueModelsResponse.verify|verify} messages. + * @param message ListIssueModelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListIssueModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListIssueModelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListIssueModelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListIssueModelsResponse; + + /** + * Decodes a ListIssueModelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListIssueModelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListIssueModelsResponse; + + /** + * Verifies a ListIssueModelsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListIssueModelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListIssueModelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListIssueModelsResponse; + + /** + * Creates a plain object from a ListIssueModelsResponse message. Also converts values to other types if specified. + * @param message ListIssueModelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListIssueModelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListIssueModelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListIssueModelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetIssueModelRequest. */ + interface IGetIssueModelRequest { + + /** GetIssueModelRequest name */ + name?: (string|null); + } + + /** Represents a GetIssueModelRequest. */ + class GetIssueModelRequest implements IGetIssueModelRequest { + + /** + * Constructs a new GetIssueModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetIssueModelRequest); + + /** GetIssueModelRequest name. */ + public name: string; + + /** + * Creates a new GetIssueModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIssueModelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetIssueModelRequest): google.cloud.contactcenterinsights.v1.GetIssueModelRequest; + + /** + * Encodes the specified GetIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueModelRequest.verify|verify} messages. + * @param message GetIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueModelRequest.verify|verify} messages. + * @param message GetIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetIssueModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetIssueModelRequest; + + /** + * Decodes a GetIssueModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetIssueModelRequest; + + /** + * Verifies a GetIssueModelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIssueModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetIssueModelRequest; + + /** + * Creates a plain object from a GetIssueModelRequest message. Also converts values to other types if specified. + * @param message GetIssueModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetIssueModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetIssueModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetIssueModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteIssueModelRequest. */ + interface IDeleteIssueModelRequest { + + /** DeleteIssueModelRequest name */ + name?: (string|null); + } + + /** Represents a DeleteIssueModelRequest. */ + class DeleteIssueModelRequest implements IDeleteIssueModelRequest { + + /** + * Constructs a new DeleteIssueModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest); + + /** DeleteIssueModelRequest name. */ + public name: string; + + /** + * Creates a new DeleteIssueModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteIssueModelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest): google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest; + + /** + * Encodes the specified DeleteIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest.verify|verify} messages. + * @param message DeleteIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest.verify|verify} messages. + * @param message DeleteIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteIssueModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest; + + /** + * Decodes a DeleteIssueModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest; + + /** + * Verifies a DeleteIssueModelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteIssueModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest; + + /** + * Creates a plain object from a DeleteIssueModelRequest message. Also converts values to other types if specified. + * @param message DeleteIssueModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteIssueModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteIssueModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteIssueModelMetadata. */ + interface IDeleteIssueModelMetadata { + + /** DeleteIssueModelMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DeleteIssueModelMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** DeleteIssueModelMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest|null); + } + + /** Represents a DeleteIssueModelMetadata. */ + class DeleteIssueModelMetadata implements IDeleteIssueModelMetadata { + + /** + * Constructs a new DeleteIssueModelMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata); + + /** DeleteIssueModelMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DeleteIssueModelMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** DeleteIssueModelMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest|null); + + /** + * Creates a new DeleteIssueModelMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteIssueModelMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata): google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata; + + /** + * Encodes the specified DeleteIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata.verify|verify} messages. + * @param message DeleteIssueModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata.verify|verify} messages. + * @param message DeleteIssueModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteIssueModelMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata; + + /** + * Decodes a DeleteIssueModelMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata; + + /** + * Verifies a DeleteIssueModelMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteIssueModelMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteIssueModelMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata; + + /** + * Creates a plain object from a DeleteIssueModelMetadata message. Also converts values to other types if specified. + * @param message DeleteIssueModelMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteIssueModelMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteIssueModelMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeployIssueModelRequest. */ + interface IDeployIssueModelRequest { + + /** DeployIssueModelRequest name */ + name?: (string|null); + } + + /** Represents a DeployIssueModelRequest. */ + class DeployIssueModelRequest implements IDeployIssueModelRequest { + + /** + * Constructs a new DeployIssueModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest); + + /** DeployIssueModelRequest name. */ + public name: string; + + /** + * Creates a new DeployIssueModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployIssueModelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest): google.cloud.contactcenterinsights.v1.DeployIssueModelRequest; + + /** + * Encodes the specified DeployIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelRequest.verify|verify} messages. + * @param message DeployIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelRequest.verify|verify} messages. + * @param message DeployIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployIssueModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeployIssueModelRequest; + + /** + * Decodes a DeployIssueModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeployIssueModelRequest; + + /** + * Verifies a DeployIssueModelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeployIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployIssueModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeployIssueModelRequest; + + /** + * Creates a plain object from a DeployIssueModelRequest message. Also converts values to other types if specified. + * @param message DeployIssueModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeployIssueModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployIssueModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployIssueModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeployIssueModelResponse. */ + interface IDeployIssueModelResponse { + } + + /** Represents a DeployIssueModelResponse. */ + class DeployIssueModelResponse implements IDeployIssueModelResponse { + + /** + * Constructs a new DeployIssueModelResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse); + + /** + * Creates a new DeployIssueModelResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployIssueModelResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse): google.cloud.contactcenterinsights.v1.DeployIssueModelResponse; + + /** + * Encodes the specified DeployIssueModelResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelResponse.verify|verify} messages. + * @param message DeployIssueModelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployIssueModelResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelResponse.verify|verify} messages. + * @param message DeployIssueModelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployIssueModelResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployIssueModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeployIssueModelResponse; + + /** + * Decodes a DeployIssueModelResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployIssueModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeployIssueModelResponse; + + /** + * Verifies a DeployIssueModelResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeployIssueModelResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployIssueModelResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeployIssueModelResponse; + + /** + * Creates a plain object from a DeployIssueModelResponse message. Also converts values to other types if specified. + * @param message DeployIssueModelResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeployIssueModelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployIssueModelResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployIssueModelResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeployIssueModelMetadata. */ + interface IDeployIssueModelMetadata { + + /** DeployIssueModelMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DeployIssueModelMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** DeployIssueModelMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest|null); + } + + /** Represents a DeployIssueModelMetadata. */ + class DeployIssueModelMetadata implements IDeployIssueModelMetadata { + + /** + * Constructs a new DeployIssueModelMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata); + + /** DeployIssueModelMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DeployIssueModelMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** DeployIssueModelMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest|null); + + /** + * Creates a new DeployIssueModelMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployIssueModelMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata): google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata; + + /** + * Encodes the specified DeployIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata.verify|verify} messages. + * @param message DeployIssueModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata.verify|verify} messages. + * @param message DeployIssueModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployIssueModelMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata; + + /** + * Decodes a DeployIssueModelMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata; + + /** + * Verifies a DeployIssueModelMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeployIssueModelMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployIssueModelMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata; + + /** + * Creates a plain object from a DeployIssueModelMetadata message. Also converts values to other types if specified. + * @param message DeployIssueModelMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployIssueModelMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployIssueModelMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UndeployIssueModelRequest. */ + interface IUndeployIssueModelRequest { + + /** UndeployIssueModelRequest name */ + name?: (string|null); + } + + /** Represents an UndeployIssueModelRequest. */ + class UndeployIssueModelRequest implements IUndeployIssueModelRequest { + + /** + * Constructs a new UndeployIssueModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest); + + /** UndeployIssueModelRequest name. */ + public name: string; + + /** + * Creates a new UndeployIssueModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeployIssueModelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest): google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest; + + /** + * Encodes the specified UndeployIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest.verify|verify} messages. + * @param message UndeployIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeployIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest.verify|verify} messages. + * @param message UndeployIssueModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeployIssueModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeployIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest; + + /** + * Decodes an UndeployIssueModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeployIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest; + + /** + * Verifies an UndeployIssueModelRequest message. + * @param message Plain 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 UndeployIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeployIssueModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest; + + /** + * Creates a plain object from an UndeployIssueModelRequest message. Also converts values to other types if specified. + * @param message UndeployIssueModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeployIssueModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeployIssueModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UndeployIssueModelResponse. */ + interface IUndeployIssueModelResponse { + } + + /** Represents an UndeployIssueModelResponse. */ + class UndeployIssueModelResponse implements IUndeployIssueModelResponse { + + /** + * Constructs a new UndeployIssueModelResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse); + + /** + * Creates a new UndeployIssueModelResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeployIssueModelResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse): google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse; + + /** + * Encodes the specified UndeployIssueModelResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse.verify|verify} messages. + * @param message UndeployIssueModelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeployIssueModelResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse.verify|verify} messages. + * @param message UndeployIssueModelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeployIssueModelResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeployIssueModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse; + + /** + * Decodes an UndeployIssueModelResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeployIssueModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse; + + /** + * Verifies an UndeployIssueModelResponse message. + * @param message Plain 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 UndeployIssueModelResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeployIssueModelResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse; + + /** + * Creates a plain object from an UndeployIssueModelResponse message. Also converts values to other types if specified. + * @param message UndeployIssueModelResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeployIssueModelResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeployIssueModelResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UndeployIssueModelMetadata. */ + interface IUndeployIssueModelMetadata { + + /** UndeployIssueModelMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** UndeployIssueModelMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** UndeployIssueModelMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest|null); + } + + /** Represents an UndeployIssueModelMetadata. */ + class UndeployIssueModelMetadata implements IUndeployIssueModelMetadata { + + /** + * Constructs a new UndeployIssueModelMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata); + + /** UndeployIssueModelMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** UndeployIssueModelMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** UndeployIssueModelMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest|null); + + /** + * Creates a new UndeployIssueModelMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeployIssueModelMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata): google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata; + + /** + * Encodes the specified UndeployIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata.verify|verify} messages. + * @param message UndeployIssueModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeployIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata.verify|verify} messages. + * @param message UndeployIssueModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeployIssueModelMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeployIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata; + + /** + * Decodes an UndeployIssueModelMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeployIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata; + + /** + * Verifies an UndeployIssueModelMetadata message. + * @param message Plain 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 UndeployIssueModelMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeployIssueModelMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata; + + /** + * Creates a plain object from an UndeployIssueModelMetadata message. Also converts values to other types if specified. + * @param message UndeployIssueModelMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeployIssueModelMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeployIssueModelMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetIssueRequest. */ + interface IGetIssueRequest { + + /** GetIssueRequest name */ + name?: (string|null); + } + + /** Represents a GetIssueRequest. */ + class GetIssueRequest implements IGetIssueRequest { + + /** + * Constructs a new GetIssueRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetIssueRequest); + + /** GetIssueRequest name. */ + public name: string; + + /** + * Creates a new GetIssueRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIssueRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetIssueRequest): google.cloud.contactcenterinsights.v1.GetIssueRequest; + + /** + * Encodes the specified GetIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * @param message GetIssueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * @param message GetIssueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetIssueRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetIssueRequest; + + /** + * Decodes a GetIssueRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetIssueRequest; + + /** + * Verifies a GetIssueRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetIssueRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIssueRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetIssueRequest; + + /** + * Creates a plain object from a GetIssueRequest message. Also converts values to other types if specified. + * @param message GetIssueRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetIssueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetIssueRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetIssueRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListIssuesRequest. */ + interface IListIssuesRequest { + + /** ListIssuesRequest parent */ + parent?: (string|null); + } + + /** Represents a ListIssuesRequest. */ + class ListIssuesRequest implements IListIssuesRequest { + + /** + * Constructs a new ListIssuesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListIssuesRequest); + + /** ListIssuesRequest parent. */ + public parent: string; + + /** + * Creates a new ListIssuesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListIssuesRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListIssuesRequest): google.cloud.contactcenterinsights.v1.ListIssuesRequest; + + /** + * Encodes the specified ListIssuesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * @param message ListIssuesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListIssuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListIssuesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * @param message ListIssuesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListIssuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListIssuesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListIssuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListIssuesRequest; + + /** + * Decodes a ListIssuesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListIssuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListIssuesRequest; + + /** + * Verifies a ListIssuesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListIssuesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListIssuesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListIssuesRequest; + + /** + * Creates a plain object from a ListIssuesRequest message. Also converts values to other types if specified. + * @param message ListIssuesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListIssuesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListIssuesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListIssuesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListIssuesResponse. */ + interface IListIssuesResponse { + + /** ListIssuesResponse issues */ + issues?: (google.cloud.contactcenterinsights.v1.IIssue[]|null); + } + + /** Represents a ListIssuesResponse. */ + class ListIssuesResponse implements IListIssuesResponse { + + /** + * Constructs a new ListIssuesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListIssuesResponse); + + /** ListIssuesResponse issues. */ + public issues: google.cloud.contactcenterinsights.v1.IIssue[]; + + /** + * Creates a new ListIssuesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListIssuesResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListIssuesResponse): google.cloud.contactcenterinsights.v1.ListIssuesResponse; + + /** + * Encodes the specified ListIssuesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * @param message ListIssuesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListIssuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListIssuesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * @param message ListIssuesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListIssuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListIssuesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListIssuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListIssuesResponse; + + /** + * Decodes a ListIssuesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListIssuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListIssuesResponse; + + /** + * Verifies a ListIssuesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListIssuesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListIssuesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListIssuesResponse; + + /** + * Creates a plain object from a ListIssuesResponse message. Also converts values to other types if specified. + * @param message ListIssuesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListIssuesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListIssuesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListIssuesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateIssueRequest. */ + interface IUpdateIssueRequest { + + /** UpdateIssueRequest issue */ + issue?: (google.cloud.contactcenterinsights.v1.IIssue|null); + + /** UpdateIssueRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateIssueRequest. */ + class UpdateIssueRequest implements IUpdateIssueRequest { + + /** + * Constructs a new UpdateIssueRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest); + + /** UpdateIssueRequest issue. */ + public issue?: (google.cloud.contactcenterinsights.v1.IIssue|null); + + /** UpdateIssueRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateIssueRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateIssueRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; + + /** + * Encodes the specified UpdateIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * @param message UpdateIssueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * @param message UpdateIssueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateIssueRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; + + /** + * Decodes an UpdateIssueRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; + + /** + * Verifies an UpdateIssueRequest message. + * @param message Plain 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 UpdateIssueRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateIssueRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; + + /** + * Creates a plain object from an UpdateIssueRequest message. Also converts values to other types if specified. + * @param message UpdateIssueRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateIssueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateIssueRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateIssueRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CalculateIssueModelStatsRequest. */ + interface ICalculateIssueModelStatsRequest { + + /** CalculateIssueModelStatsRequest issueModel */ + issueModel?: (string|null); + } + + /** Represents a CalculateIssueModelStatsRequest. */ + class CalculateIssueModelStatsRequest implements ICalculateIssueModelStatsRequest { + + /** + * Constructs a new CalculateIssueModelStatsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest); + + /** CalculateIssueModelStatsRequest issueModel. */ + public issueModel: string; + + /** + * Creates a new CalculateIssueModelStatsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateIssueModelStatsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + + /** + * Encodes the specified CalculateIssueModelStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * @param message CalculateIssueModelStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateIssueModelStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * @param message CalculateIssueModelStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateIssueModelStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + + /** + * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateIssueModelStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + + /** + * Verifies a CalculateIssueModelStatsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CalculateIssueModelStatsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateIssueModelStatsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + + /** + * Creates a plain object from a CalculateIssueModelStatsRequest message. Also converts values to other types if specified. + * @param message CalculateIssueModelStatsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateIssueModelStatsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateIssueModelStatsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CalculateIssueModelStatsResponse. */ + interface ICalculateIssueModelStatsResponse { + + /** CalculateIssueModelStatsResponse currentStats */ + currentStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + } + + /** Represents a CalculateIssueModelStatsResponse. */ + class CalculateIssueModelStatsResponse implements ICalculateIssueModelStatsResponse { + + /** + * Constructs a new CalculateIssueModelStatsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse); + + /** CalculateIssueModelStatsResponse currentStats. */ + public currentStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + + /** + * Creates a new CalculateIssueModelStatsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateIssueModelStatsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + + /** + * Encodes the specified CalculateIssueModelStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * @param message CalculateIssueModelStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateIssueModelStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * @param message CalculateIssueModelStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateIssueModelStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + + /** + * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateIssueModelStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + + /** + * Verifies a CalculateIssueModelStatsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CalculateIssueModelStatsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateIssueModelStatsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + + /** + * Creates a plain object from a CalculateIssueModelStatsResponse message. Also converts values to other types if specified. + * @param message CalculateIssueModelStatsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateIssueModelStatsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateIssueModelStatsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePhraseMatcherRequest. */ + interface ICreatePhraseMatcherRequest { + + /** CreatePhraseMatcherRequest parent */ + parent?: (string|null); + + /** CreatePhraseMatcherRequest phraseMatcher */ + phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); + } + + /** Represents a CreatePhraseMatcherRequest. */ + class CreatePhraseMatcherRequest implements ICreatePhraseMatcherRequest { + + /** + * Constructs a new CreatePhraseMatcherRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest); + + /** CreatePhraseMatcherRequest parent. */ + public parent: string; + + /** CreatePhraseMatcherRequest phraseMatcher. */ + public phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); + + /** + * Creates a new CreatePhraseMatcherRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePhraseMatcherRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + + /** + * Encodes the specified CreatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * @param message CreatePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * @param message CreatePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + + /** + * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + + /** + * Verifies a CreatePhraseMatcherRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePhraseMatcherRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + + /** + * Creates a plain object from a CreatePhraseMatcherRequest message. Also converts values to other types if specified. + * @param message CreatePhraseMatcherRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePhraseMatcherRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePhraseMatcherRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPhraseMatchersRequest. */ + interface IListPhraseMatchersRequest { + + /** ListPhraseMatchersRequest parent */ + parent?: (string|null); + + /** ListPhraseMatchersRequest pageSize */ + pageSize?: (number|null); + + /** ListPhraseMatchersRequest pageToken */ + pageToken?: (string|null); + + /** ListPhraseMatchersRequest filter */ + filter?: (string|null); + } + + /** Represents a ListPhraseMatchersRequest. */ + class ListPhraseMatchersRequest implements IListPhraseMatchersRequest { + + /** + * Constructs a new ListPhraseMatchersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest); + + /** ListPhraseMatchersRequest parent. */ + public parent: string; + + /** ListPhraseMatchersRequest pageSize. */ + public pageSize: number; + + /** ListPhraseMatchersRequest pageToken. */ + public pageToken: string; + + /** ListPhraseMatchersRequest filter. */ + public filter: string; + + /** + * Creates a new ListPhraseMatchersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPhraseMatchersRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + + /** + * Encodes the specified ListPhraseMatchersRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * @param message ListPhraseMatchersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPhraseMatchersRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * @param message ListPhraseMatchersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPhraseMatchersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + + /** + * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPhraseMatchersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + + /** + * Verifies a ListPhraseMatchersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPhraseMatchersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPhraseMatchersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + + /** + * Creates a plain object from a ListPhraseMatchersRequest message. Also converts values to other types if specified. + * @param message ListPhraseMatchersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPhraseMatchersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPhraseMatchersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPhraseMatchersResponse. */ + interface IListPhraseMatchersResponse { + + /** ListPhraseMatchersResponse phraseMatchers */ + phraseMatchers?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher[]|null); + + /** ListPhraseMatchersResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPhraseMatchersResponse. */ + class ListPhraseMatchersResponse implements IListPhraseMatchersResponse { + + /** + * Constructs a new ListPhraseMatchersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse); + + /** ListPhraseMatchersResponse phraseMatchers. */ + public phraseMatchers: google.cloud.contactcenterinsights.v1.IPhraseMatcher[]; + + /** ListPhraseMatchersResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPhraseMatchersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPhraseMatchersResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + + /** + * Encodes the specified ListPhraseMatchersResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * @param message ListPhraseMatchersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPhraseMatchersResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * @param message ListPhraseMatchersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPhraseMatchersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + + /** + * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPhraseMatchersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + + /** + * Verifies a ListPhraseMatchersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPhraseMatchersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPhraseMatchersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + + /** + * Creates a plain object from a ListPhraseMatchersResponse message. Also converts values to other types if specified. + * @param message ListPhraseMatchersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPhraseMatchersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPhraseMatchersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPhraseMatcherRequest. */ + interface IGetPhraseMatcherRequest { + + /** GetPhraseMatcherRequest name */ + name?: (string|null); + } + + /** Represents a GetPhraseMatcherRequest. */ + class GetPhraseMatcherRequest implements IGetPhraseMatcherRequest { + + /** + * Constructs a new GetPhraseMatcherRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest); + + /** GetPhraseMatcherRequest name. */ + public name: string; + + /** + * Creates a new GetPhraseMatcherRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPhraseMatcherRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + + /** + * Encodes the specified GetPhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. + * @param message GetPhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. + * @param message GetPhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + + /** + * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + + /** + * Verifies a GetPhraseMatcherRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPhraseMatcherRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + + /** + * Creates a plain object from a GetPhraseMatcherRequest message. Also converts values to other types if specified. + * @param message GetPhraseMatcherRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPhraseMatcherRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPhraseMatcherRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePhraseMatcherRequest. */ + interface IDeletePhraseMatcherRequest { + + /** DeletePhraseMatcherRequest name */ + name?: (string|null); + } + + /** Represents a DeletePhraseMatcherRequest. */ + class DeletePhraseMatcherRequest implements IDeletePhraseMatcherRequest { + + /** + * Constructs a new DeletePhraseMatcherRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest); + + /** DeletePhraseMatcherRequest name. */ + public name: string; + + /** + * Creates a new DeletePhraseMatcherRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePhraseMatcherRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + + /** + * Encodes the specified DeletePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. + * @param message DeletePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. + * @param message DeletePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + + /** + * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + + /** + * Verifies a DeletePhraseMatcherRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePhraseMatcherRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + + /** + * Creates a plain object from a DeletePhraseMatcherRequest message. Also converts values to other types if specified. + * @param message DeletePhraseMatcherRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePhraseMatcherRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePhraseMatcherRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePhraseMatcherRequest. */ + interface IUpdatePhraseMatcherRequest { + + /** UpdatePhraseMatcherRequest phraseMatcher */ + phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); + + /** UpdatePhraseMatcherRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePhraseMatcherRequest. */ + class UpdatePhraseMatcherRequest implements IUpdatePhraseMatcherRequest { + + /** + * Constructs a new UpdatePhraseMatcherRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest); + + /** UpdatePhraseMatcherRequest phraseMatcher. */ + public phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); + + /** UpdatePhraseMatcherRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePhraseMatcherRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePhraseMatcherRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + + /** + * Encodes the specified UpdatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. + * @param message UpdatePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. + * @param message UpdatePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + + /** + * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + + /** + * Verifies an UpdatePhraseMatcherRequest message. + * @param message Plain 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 UpdatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePhraseMatcherRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + + /** + * Creates a plain object from an UpdatePhraseMatcherRequest message. Also converts values to other types if specified. + * @param message UpdatePhraseMatcherRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePhraseMatcherRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePhraseMatcherRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSettingsRequest. */ + interface IGetSettingsRequest { + + /** GetSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetSettingsRequest. */ + class GetSettingsRequest implements IGetSettingsRequest { + + /** + * Constructs a new GetSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetSettingsRequest); + + /** GetSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSettingsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetSettingsRequest): google.cloud.contactcenterinsights.v1.GetSettingsRequest; + + /** + * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. + * @param message GetSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. + * @param message GetSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetSettingsRequest; + + /** + * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetSettingsRequest; + + /** + * Verifies a GetSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetSettingsRequest; + + /** + * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. + * @param message GetSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSettingsRequest. */ + interface IUpdateSettingsRequest { + + /** UpdateSettingsRequest settings */ + settings?: (google.cloud.contactcenterinsights.v1.ISettings|null); + + /** UpdateSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateSettingsRequest. */ + class UpdateSettingsRequest implements IUpdateSettingsRequest { + + /** + * Constructs a new UpdateSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest); + + /** UpdateSettingsRequest settings. */ + public settings?: (google.cloud.contactcenterinsights.v1.ISettings|null); + + /** UpdateSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSettingsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; + + /** + * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. + * @param message UpdateSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. + * @param message UpdateSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; + + /** + * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; + + /** + * Verifies an UpdateSettingsRequest message. + * @param message Plain 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 UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; + + /** + * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateViewRequest. */ + interface ICreateViewRequest { + + /** CreateViewRequest parent */ + parent?: (string|null); + + /** CreateViewRequest view */ + view?: (google.cloud.contactcenterinsights.v1.IView|null); + } + + /** Represents a CreateViewRequest. */ + class CreateViewRequest implements ICreateViewRequest { + + /** + * Constructs a new CreateViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateViewRequest); + + /** CreateViewRequest parent. */ + public parent: string; + + /** CreateViewRequest view. */ + public view?: (google.cloud.contactcenterinsights.v1.IView|null); + + /** + * Creates a new CreateViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateViewRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateViewRequest): google.cloud.contactcenterinsights.v1.CreateViewRequest; + + /** + * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateViewRequest; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateViewRequest; + + /** + * Verifies a CreateViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateViewRequest; + + /** + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * @param message CreateViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetViewRequest. */ + interface IGetViewRequest { + + /** GetViewRequest name */ + name?: (string|null); + } + + /** Represents a GetViewRequest. */ + class GetViewRequest implements IGetViewRequest { + + /** + * Constructs a new GetViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetViewRequest); + + /** GetViewRequest name. */ + public name: string; + + /** + * Creates a new GetViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetViewRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetViewRequest): google.cloud.contactcenterinsights.v1.GetViewRequest; + + /** + * Encodes the specified GetViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. + * @param message GetViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. + * @param message GetViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetViewRequest; + + /** + * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetViewRequest; + + /** + * Verifies a GetViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetViewRequest; + + /** + * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. + * @param message GetViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListViewsRequest. */ + interface IListViewsRequest { + + /** ListViewsRequest parent */ + parent?: (string|null); + + /** ListViewsRequest pageSize */ + pageSize?: (number|null); + + /** ListViewsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListViewsRequest. */ + class ListViewsRequest implements IListViewsRequest { + + /** + * Constructs a new ListViewsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListViewsRequest); + + /** ListViewsRequest parent. */ + public parent: string; + + /** ListViewsRequest pageSize. */ + public pageSize: number; + + /** ListViewsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListViewsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListViewsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListViewsRequest): google.cloud.contactcenterinsights.v1.ListViewsRequest; + + /** + * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListViewsRequest; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListViewsRequest; + + /** + * Verifies a ListViewsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListViewsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListViewsRequest; + + /** + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @param message ListViewsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListViewsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListViewsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListViewsResponse. */ + interface IListViewsResponse { + + /** ListViewsResponse views */ + views?: (google.cloud.contactcenterinsights.v1.IView[]|null); + + /** ListViewsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListViewsResponse. */ + class ListViewsResponse implements IListViewsResponse { + + /** + * Constructs a new ListViewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListViewsResponse); + + /** ListViewsResponse views. */ + public views: google.cloud.contactcenterinsights.v1.IView[]; + + /** ListViewsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListViewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListViewsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListViewsResponse): google.cloud.contactcenterinsights.v1.ListViewsResponse; + + /** + * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListViewsResponse; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListViewsResponse; + + /** + * Verifies a ListViewsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListViewsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListViewsResponse; + + /** + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * @param message ListViewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListViewsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListViewsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateViewRequest. */ + interface IUpdateViewRequest { + + /** UpdateViewRequest view */ + view?: (google.cloud.contactcenterinsights.v1.IView|null); + + /** UpdateViewRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateViewRequest. */ + class UpdateViewRequest implements IUpdateViewRequest { + + /** + * Constructs a new UpdateViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateViewRequest); + + /** UpdateViewRequest view. */ + public view?: (google.cloud.contactcenterinsights.v1.IView|null); + + /** UpdateViewRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateViewRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateViewRequest): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + + /** + * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * @param message UpdateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * @param message UpdateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + + /** + * Verifies an UpdateViewRequest message. + * @param message Plain 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 UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + + /** + * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. + * @param message UpdateViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteViewRequest. */ + interface IDeleteViewRequest { + + /** DeleteViewRequest name */ + name?: (string|null); + } + + /** Represents a DeleteViewRequest. */ + class DeleteViewRequest implements IDeleteViewRequest { + + /** + * Constructs a new DeleteViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteViewRequest); + + /** DeleteViewRequest name. */ + public name: string; + + /** + * Creates a new DeleteViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteViewRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteViewRequest): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + + /** + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + + /** + * Verifies a DeleteViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + + /** + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * @param message DeleteViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteViewRequest + * @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 callMetadata */ + callMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null); + + /** Conversation expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Conversation ttl */ + ttl?: (google.protobuf.IDuration|null); + + /** Conversation name */ + name?: (string|null); + + /** Conversation dataSource */ + dataSource?: (google.cloud.contactcenterinsights.v1.IConversationDataSource|null); + + /** Conversation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Conversation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Conversation startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Conversation languageCode */ + languageCode?: (string|null); + + /** Conversation agentId */ + agentId?: (string|null); + + /** Conversation labels */ + labels?: ({ [k: string]: string }|null); + + /** Conversation transcript */ + transcript?: (google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null); + + /** Conversation medium */ + medium?: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium|null); + + /** Conversation duration */ + duration?: (google.protobuf.IDuration|null); + + /** Conversation turnCount */ + turnCount?: (number|null); + + /** Conversation latestAnalysis */ + latestAnalysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + + /** Conversation runtimeAnnotations */ + runtimeAnnotations?: (google.cloud.contactcenterinsights.v1.IRuntimeAnnotation[]|null); + + /** Conversation dialogflowIntents */ + dialogflowIntents?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IDialogflowIntent }|null); + + /** Conversation obfuscatedUserId */ + obfuscatedUserId?: (string|null); + } + + /** Represents a Conversation. */ + class Conversation implements IConversation { + + /** + * Constructs a new Conversation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversation); + + /** Conversation callMetadata. */ + public callMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null); + + /** Conversation expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Conversation ttl. */ + public ttl?: (google.protobuf.IDuration|null); + + /** Conversation name. */ + public name: string; + + /** Conversation dataSource. */ + public dataSource?: (google.cloud.contactcenterinsights.v1.IConversationDataSource|null); + + /** Conversation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Conversation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Conversation startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Conversation languageCode. */ + public languageCode: string; + + /** Conversation agentId. */ + public agentId: string; + + /** Conversation labels. */ + public labels: { [k: string]: string }; + + /** Conversation transcript. */ + public transcript?: (google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null); + + /** Conversation medium. */ + public medium: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium); + + /** Conversation duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** Conversation turnCount. */ + public turnCount: number; + + /** Conversation latestAnalysis. */ + public latestAnalysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + + /** Conversation runtimeAnnotations. */ + public runtimeAnnotations: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation[]; + + /** Conversation dialogflowIntents. */ + public dialogflowIntents: { [k: string]: google.cloud.contactcenterinsights.v1.IDialogflowIntent }; + + /** Conversation obfuscatedUserId. */ + public obfuscatedUserId: string; + + /** Conversation metadata. */ + public metadata?: "callMetadata"; + + /** Conversation expiration. */ + public expiration?: ("expireTime"|"ttl"); + + /** + * Creates a new Conversation instance using the specified properties. + * @param [properties] Properties to set + * @returns Conversation instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversation): google.cloud.contactcenterinsights.v1.Conversation; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.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; + } + + namespace Conversation { + + /** Properties of a CallMetadata. */ + interface ICallMetadata { + + /** CallMetadata customerChannel */ + customerChannel?: (number|null); + + /** CallMetadata agentChannel */ + agentChannel?: (number|null); + } + + /** Represents a CallMetadata. */ + class CallMetadata implements ICallMetadata { + + /** + * Constructs a new CallMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata); + + /** CallMetadata customerChannel. */ + public customerChannel: number; + + /** CallMetadata agentChannel. */ + public agentChannel: number; + + /** + * Creates a new CallMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CallMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + + /** + * Encodes the specified CallMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. + * @param message CallMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. + * @param message CallMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + + /** + * Decodes a CallMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + + /** + * Verifies a CallMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CallMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + + /** + * Creates a plain object from a CallMetadata message. Also converts values to other types if specified. + * @param message CallMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.CallMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Transcript. */ + interface ITranscript { + + /** Transcript transcriptSegments */ + transcriptSegments?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment[]|null); + } + + /** Represents a Transcript. */ + class Transcript implements ITranscript { + + /** + * Constructs a new Transcript. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.ITranscript); + + /** Transcript transcriptSegments. */ + public transcriptSegments: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment[]; + + /** + * Creates a new Transcript instance using the specified properties. + * @param [properties] Properties to set + * @returns Transcript instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.ITranscript): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + + /** + * Encodes the specified Transcript message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. + * @param message Transcript message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.ITranscript, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Transcript message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. + * @param message Transcript message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.ITranscript, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Transcript message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Transcript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + + /** + * Decodes a Transcript message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Transcript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + + /** + * Verifies a Transcript message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Transcript message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Transcript + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + + /** + * Creates a plain object from a Transcript message. Also converts values to other types if specified. + * @param message Transcript + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Transcript to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Transcript + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Transcript { + + /** Properties of a TranscriptSegment. */ + interface ITranscriptSegment { + + /** TranscriptSegment messageTime */ + messageTime?: (google.protobuf.ITimestamp|null); + + /** TranscriptSegment text */ + text?: (string|null); + + /** TranscriptSegment confidence */ + confidence?: (number|null); + + /** TranscriptSegment words */ + words?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo[]|null); + + /** TranscriptSegment languageCode */ + languageCode?: (string|null); + + /** TranscriptSegment channelTag */ + channelTag?: (number|null); + + /** TranscriptSegment segmentParticipant */ + segmentParticipant?: (google.cloud.contactcenterinsights.v1.IConversationParticipant|null); + + /** TranscriptSegment dialogflowSegmentMetadata */ + dialogflowSegmentMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null); + + /** TranscriptSegment sentiment */ + sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + } + + /** Represents a TranscriptSegment. */ + class TranscriptSegment implements ITranscriptSegment { + + /** + * Constructs a new TranscriptSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment); + + /** TranscriptSegment messageTime. */ + public messageTime?: (google.protobuf.ITimestamp|null); + + /** TranscriptSegment text. */ + public text: string; + + /** TranscriptSegment confidence. */ + public confidence: number; + + /** TranscriptSegment words. */ + public words: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo[]; + + /** TranscriptSegment languageCode. */ + public languageCode: string; + + /** TranscriptSegment channelTag. */ + public channelTag: number; + + /** TranscriptSegment segmentParticipant. */ + public segmentParticipant?: (google.cloud.contactcenterinsights.v1.IConversationParticipant|null); + + /** TranscriptSegment dialogflowSegmentMetadata. */ + public dialogflowSegmentMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null); + + /** TranscriptSegment sentiment. */ + public sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + + /** + * Creates a new TranscriptSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns TranscriptSegment instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + + /** + * Encodes the specified TranscriptSegment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. + * @param message TranscriptSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranscriptSegment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. + * @param message TranscriptSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranscriptSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranscriptSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + + /** + * Decodes a TranscriptSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranscriptSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + + /** + * Verifies a TranscriptSegment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TranscriptSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranscriptSegment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + + /** + * Creates a plain object from a TranscriptSegment message. Also converts values to other types if specified. + * @param message TranscriptSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranscriptSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranscriptSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TranscriptSegment { + + /** Properties of a WordInfo. */ + interface IWordInfo { + + /** WordInfo startOffset */ + startOffset?: (google.protobuf.IDuration|null); + + /** WordInfo endOffset */ + endOffset?: (google.protobuf.IDuration|null); + + /** WordInfo word */ + word?: (string|null); + + /** WordInfo confidence */ + confidence?: (number|null); + } + + /** Represents a WordInfo. */ + class WordInfo implements IWordInfo { + + /** + * Constructs a new WordInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo); + + /** WordInfo startOffset. */ + public startOffset?: (google.protobuf.IDuration|null); + + /** WordInfo endOffset. */ + public endOffset?: (google.protobuf.IDuration|null); + + /** WordInfo word. */ + public word: string; + + /** WordInfo confidence. */ + public confidence: number; + + /** + * Creates a new WordInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns WordInfo instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + + /** + * Encodes the specified WordInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. + * @param message WordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WordInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. + * @param message WordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WordInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + + /** + * Decodes a WordInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + + /** + * Verifies a WordInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WordInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WordInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + + /** + * Creates a plain object from a WordInfo message. Also converts values to other types if specified. + * @param message WordInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WordInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WordInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DialogflowSegmentMetadata. */ + interface IDialogflowSegmentMetadata { + + /** DialogflowSegmentMetadata smartReplyAllowlistCovered */ + smartReplyAllowlistCovered?: (boolean|null); + } + + /** Represents a DialogflowSegmentMetadata. */ + class DialogflowSegmentMetadata implements IDialogflowSegmentMetadata { + + /** + * Constructs a new DialogflowSegmentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata); + + /** DialogflowSegmentMetadata smartReplyAllowlistCovered. */ + public smartReplyAllowlistCovered: boolean; + + /** + * Creates a new DialogflowSegmentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DialogflowSegmentMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + + /** + * Encodes the specified DialogflowSegmentMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. + * @param message DialogflowSegmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DialogflowSegmentMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. + * @param message DialogflowSegmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DialogflowSegmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + + /** + * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DialogflowSegmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + + /** + * Verifies a DialogflowSegmentMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DialogflowSegmentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DialogflowSegmentMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + + /** + * Creates a plain object from a DialogflowSegmentMetadata message. Also converts values to other types if specified. + * @param message DialogflowSegmentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DialogflowSegmentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DialogflowSegmentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Medium enum. */ + enum Medium { + MEDIUM_UNSPECIFIED = 0, + PHONE_CALL = 1, + CHAT = 2 + } + } + + /** Properties of an Analysis. */ + interface IAnalysis { + + /** Analysis name */ + name?: (string|null); + + /** Analysis requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** Analysis createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Analysis analysisResult */ + analysisResult?: (google.cloud.contactcenterinsights.v1.IAnalysisResult|null); + } + + /** Represents an Analysis. */ + class Analysis implements IAnalysis { + + /** + * Constructs a new Analysis. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnalysis); + + /** Analysis name. */ + public name: string; + + /** Analysis requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** Analysis createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Analysis analysisResult. */ + public analysisResult?: (google.cloud.contactcenterinsights.v1.IAnalysisResult|null); + + /** + * Creates a new Analysis instance using the specified properties. + * @param [properties] Properties to set + * @returns Analysis instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnalysis): google.cloud.contactcenterinsights.v1.Analysis; + + /** + * Encodes the specified Analysis message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * @param message Analysis message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IAnalysis, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Analysis message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * @param message Analysis message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnalysis, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Analysis message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Analysis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Analysis; + + /** + * Decodes an Analysis message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Analysis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Analysis; + + /** + * Verifies an Analysis message. + * @param message Plain 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 Analysis message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Analysis + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Analysis; + + /** + * Creates a plain object from an Analysis message. Also converts values to other types if specified. + * @param message Analysis + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Analysis, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Analysis to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Analysis + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationDataSource. */ + interface IConversationDataSource { + + /** ConversationDataSource gcsSource */ + gcsSource?: (google.cloud.contactcenterinsights.v1.IGcsSource|null); + + /** ConversationDataSource dialogflowSource */ + dialogflowSource?: (google.cloud.contactcenterinsights.v1.IDialogflowSource|null); + } + + /** Represents a ConversationDataSource. */ + class ConversationDataSource implements IConversationDataSource { + + /** + * Constructs a new ConversationDataSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationDataSource); + + /** ConversationDataSource gcsSource. */ + public gcsSource?: (google.cloud.contactcenterinsights.v1.IGcsSource|null); + + /** ConversationDataSource dialogflowSource. */ + public dialogflowSource?: (google.cloud.contactcenterinsights.v1.IDialogflowSource|null); + + /** ConversationDataSource source. */ + public source?: ("gcsSource"|"dialogflowSource"); + + /** + * Creates a new ConversationDataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationDataSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationDataSource): google.cloud.contactcenterinsights.v1.ConversationDataSource; + + /** + * Encodes the specified ConversationDataSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * @param message ConversationDataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationDataSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * @param message ConversationDataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationDataSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationDataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationDataSource; + + /** + * Decodes a ConversationDataSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationDataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationDataSource; + + /** + * Verifies a ConversationDataSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationDataSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationDataSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationDataSource; + + /** + * Creates a plain object from a ConversationDataSource message. Also converts values to other types if specified. + * @param message ConversationDataSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationDataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationDataSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationDataSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcsSource. */ + interface IGcsSource { + + /** GcsSource audioUri */ + audioUri?: (string|null); + + /** GcsSource transcriptUri */ + transcriptUri?: (string|null); + } + + /** Represents a GcsSource. */ + class GcsSource implements IGcsSource { + + /** + * Constructs a new GcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGcsSource); + + /** GcsSource audioUri. */ + public audioUri: string; + + /** GcsSource transcriptUri. */ + public transcriptUri: string; + + /** + * Creates a new GcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGcsSource): google.cloud.contactcenterinsights.v1.GcsSource; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GcsSource; + + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GcsSource; + + /** + * Verifies a GcsSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GcsSource; + + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @param message GcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DialogflowSource. */ + interface IDialogflowSource { + + /** DialogflowSource dialogflowConversation */ + dialogflowConversation?: (string|null); + + /** DialogflowSource audioUri */ + audioUri?: (string|null); + } + + /** Represents a DialogflowSource. */ + class DialogflowSource implements IDialogflowSource { + + /** + * Constructs a new DialogflowSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDialogflowSource); + + /** DialogflowSource dialogflowConversation. */ + public dialogflowConversation: string; + + /** DialogflowSource audioUri. */ + public audioUri: string; + + /** + * Creates a new DialogflowSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DialogflowSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDialogflowSource): google.cloud.contactcenterinsights.v1.DialogflowSource; + + /** + * Encodes the specified DialogflowSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * @param message DialogflowSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDialogflowSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DialogflowSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * @param message DialogflowSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDialogflowSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DialogflowSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DialogflowSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DialogflowSource; + + /** + * Decodes a DialogflowSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DialogflowSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DialogflowSource; + + /** + * Verifies a DialogflowSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DialogflowSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DialogflowSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DialogflowSource; + + /** + * Creates a plain object from a DialogflowSource message. Also converts values to other types if specified. + * @param message DialogflowSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DialogflowSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DialogflowSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DialogflowSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnalysisResult. */ + interface IAnalysisResult { + + /** AnalysisResult callAnalysisMetadata */ + callAnalysisMetadata?: (google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null); + + /** AnalysisResult endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an AnalysisResult. */ + class AnalysisResult implements IAnalysisResult { + + /** + * Constructs a new AnalysisResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnalysisResult); + + /** AnalysisResult callAnalysisMetadata. */ + public callAnalysisMetadata?: (google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null); + + /** AnalysisResult endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** AnalysisResult metadata. */ + public metadata?: "callAnalysisMetadata"; + + /** + * Creates a new AnalysisResult instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisResult instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnalysisResult): google.cloud.contactcenterinsights.v1.AnalysisResult; + + /** + * Encodes the specified AnalysisResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * @param message AnalysisResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * @param message AnalysisResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnalysisResult; + + /** + * Decodes an AnalysisResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnalysisResult; + + /** + * Verifies an AnalysisResult message. + * @param message Plain 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 AnalysisResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnalysisResult; + + /** + * Creates a plain object from an AnalysisResult message. Also converts values to other types if specified. + * @param message AnalysisResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnalysisResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AnalysisResult { + + /** Properties of a CallAnalysisMetadata. */ + interface ICallAnalysisMetadata { + + /** CallAnalysisMetadata annotations */ + annotations?: (google.cloud.contactcenterinsights.v1.ICallAnnotation[]|null); + + /** CallAnalysisMetadata entities */ + entities?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IEntity }|null); + + /** CallAnalysisMetadata sentiments */ + sentiments?: (google.cloud.contactcenterinsights.v1.IConversationLevelSentiment[]|null); + + /** CallAnalysisMetadata intents */ + intents?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IIntent }|null); + + /** CallAnalysisMetadata phraseMatchers */ + phraseMatchers?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IPhraseMatchData }|null); + + /** CallAnalysisMetadata issueModelResult */ + issueModelResult?: (google.cloud.contactcenterinsights.v1.IIssueModelResult|null); + } + + /** Represents a CallAnalysisMetadata. */ + class CallAnalysisMetadata implements ICallAnalysisMetadata { + + /** + * Constructs a new CallAnalysisMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata); + + /** CallAnalysisMetadata annotations. */ + public annotations: google.cloud.contactcenterinsights.v1.ICallAnnotation[]; + + /** CallAnalysisMetadata entities. */ + public entities: { [k: string]: google.cloud.contactcenterinsights.v1.IEntity }; + + /** CallAnalysisMetadata sentiments. */ + public sentiments: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment[]; + + /** CallAnalysisMetadata intents. */ + public intents: { [k: string]: google.cloud.contactcenterinsights.v1.IIntent }; + + /** CallAnalysisMetadata phraseMatchers. */ + public phraseMatchers: { [k: string]: google.cloud.contactcenterinsights.v1.IPhraseMatchData }; + + /** CallAnalysisMetadata issueModelResult. */ + public issueModelResult?: (google.cloud.contactcenterinsights.v1.IIssueModelResult|null); + + /** + * Creates a new CallAnalysisMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CallAnalysisMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; + + /** + * Encodes the specified CallAnalysisMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. + * @param message CallAnalysisMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallAnalysisMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. + * @param message CallAnalysisMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallAnalysisMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallAnalysisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; + + /** + * Decodes a CallAnalysisMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallAnalysisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; + + /** + * Verifies a CallAnalysisMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CallAnalysisMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallAnalysisMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; + + /** + * Creates a plain object from a CallAnalysisMetadata message. Also converts values to other types if specified. + * @param message CallAnalysisMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallAnalysisMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallAnalysisMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an IssueModelResult. */ + interface IIssueModelResult { + + /** IssueModelResult issueModel */ + issueModel?: (string|null); + + /** IssueModelResult issues */ + issues?: (google.cloud.contactcenterinsights.v1.IIssueAssignment[]|null); + } + + /** Represents an IssueModelResult. */ + class IssueModelResult implements IIssueModelResult { + + /** + * Constructs a new IssueModelResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueModelResult); + + /** IssueModelResult issueModel. */ + public issueModel: string; + + /** IssueModelResult issues. */ + public issues: google.cloud.contactcenterinsights.v1.IIssueAssignment[]; + + /** + * Creates a new IssueModelResult instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueModelResult instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueModelResult): google.cloud.contactcenterinsights.v1.IssueModelResult; + + /** + * Encodes the specified IssueModelResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * @param message IssueModelResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueModelResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssueModelResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * @param message IssueModelResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueModelResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssueModelResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueModelResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModelResult; + + /** + * Decodes an IssueModelResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueModelResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModelResult; + + /** + * Verifies an IssueModelResult message. + * @param message Plain 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 IssueModelResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueModelResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModelResult; + + /** + * Creates a plain object from an IssueModelResult message. Also converts values to other types if specified. + * @param message IssueModelResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModelResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssueModelResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssueModelResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationLevelSentiment. */ + interface IConversationLevelSentiment { + + /** ConversationLevelSentiment channelTag */ + channelTag?: (number|null); + + /** ConversationLevelSentiment sentimentData */ + sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + } + + /** Represents a ConversationLevelSentiment. */ + class ConversationLevelSentiment implements IConversationLevelSentiment { + + /** + * Constructs a new ConversationLevelSentiment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment); + + /** ConversationLevelSentiment channelTag. */ + public channelTag: number; + + /** ConversationLevelSentiment sentimentData. */ + public sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + + /** + * Creates a new ConversationLevelSentiment instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationLevelSentiment instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; + + /** + * Encodes the specified ConversationLevelSentiment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * @param message ConversationLevelSentiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationLevelSentiment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * @param message ConversationLevelSentiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationLevelSentiment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationLevelSentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; + + /** + * Decodes a ConversationLevelSentiment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationLevelSentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; + + /** + * Verifies a ConversationLevelSentiment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationLevelSentiment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationLevelSentiment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; + + /** + * Creates a plain object from a ConversationLevelSentiment message. Also converts values to other types if specified. + * @param message ConversationLevelSentiment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationLevelSentiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationLevelSentiment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationLevelSentiment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IssueAssignment. */ + interface IIssueAssignment { + + /** IssueAssignment issue */ + issue?: (string|null); + + /** IssueAssignment score */ + score?: (number|null); + + /** IssueAssignment displayName */ + displayName?: (string|null); + } + + /** Represents an IssueAssignment. */ + class IssueAssignment implements IIssueAssignment { + + /** + * Constructs a new IssueAssignment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueAssignment); + + /** IssueAssignment issue. */ + public issue: string; + + /** IssueAssignment score. */ + public score: number; + + /** IssueAssignment displayName. */ + public displayName: string; + + /** + * Creates a new IssueAssignment instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueAssignment instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueAssignment): google.cloud.contactcenterinsights.v1.IssueAssignment; + + /** + * Encodes the specified IssueAssignment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * @param message IssueAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssueAssignment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * @param message IssueAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssueAssignment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueAssignment; + + /** + * Decodes an IssueAssignment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueAssignment; + + /** + * Verifies an IssueAssignment message. + * @param message Plain 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 IssueAssignment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueAssignment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueAssignment; + + /** + * Creates a plain object from an IssueAssignment message. Also converts values to other types if specified. + * @param message IssueAssignment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueAssignment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssueAssignment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssueAssignment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CallAnnotation. */ + interface ICallAnnotation { + + /** CallAnnotation interruptionData */ + interruptionData?: (google.cloud.contactcenterinsights.v1.IInterruptionData|null); + + /** CallAnnotation sentimentData */ + sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + + /** CallAnnotation silenceData */ + silenceData?: (google.cloud.contactcenterinsights.v1.ISilenceData|null); + + /** CallAnnotation holdData */ + holdData?: (google.cloud.contactcenterinsights.v1.IHoldData|null); + + /** CallAnnotation entityMentionData */ + entityMentionData?: (google.cloud.contactcenterinsights.v1.IEntityMentionData|null); + + /** CallAnnotation intentMatchData */ + intentMatchData?: (google.cloud.contactcenterinsights.v1.IIntentMatchData|null); + + /** CallAnnotation phraseMatchData */ + phraseMatchData?: (google.cloud.contactcenterinsights.v1.IPhraseMatchData|null); + + /** CallAnnotation channelTag */ + channelTag?: (number|null); + + /** CallAnnotation annotationStartBoundary */ + annotationStartBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** CallAnnotation annotationEndBoundary */ + annotationEndBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + } + + /** Represents a CallAnnotation. */ + class CallAnnotation implements ICallAnnotation { + + /** + * Constructs a new CallAnnotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICallAnnotation); + + /** CallAnnotation interruptionData. */ + public interruptionData?: (google.cloud.contactcenterinsights.v1.IInterruptionData|null); + + /** CallAnnotation sentimentData. */ + public sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + + /** CallAnnotation silenceData. */ + public silenceData?: (google.cloud.contactcenterinsights.v1.ISilenceData|null); + + /** CallAnnotation holdData. */ + public holdData?: (google.cloud.contactcenterinsights.v1.IHoldData|null); + + /** CallAnnotation entityMentionData. */ + public entityMentionData?: (google.cloud.contactcenterinsights.v1.IEntityMentionData|null); + + /** CallAnnotation intentMatchData. */ + public intentMatchData?: (google.cloud.contactcenterinsights.v1.IIntentMatchData|null); + + /** CallAnnotation phraseMatchData. */ + public phraseMatchData?: (google.cloud.contactcenterinsights.v1.IPhraseMatchData|null); + + /** CallAnnotation channelTag. */ + public channelTag: number; + + /** CallAnnotation annotationStartBoundary. */ + public annotationStartBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** CallAnnotation annotationEndBoundary. */ + public annotationEndBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** CallAnnotation data. */ + public data?: ("interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"); + + /** + * Creates a new CallAnnotation instance using the specified properties. + * @param [properties] Properties to set + * @returns CallAnnotation instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICallAnnotation): google.cloud.contactcenterinsights.v1.CallAnnotation; + + /** + * Encodes the specified CallAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * @param message CallAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICallAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * @param message CallAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICallAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallAnnotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CallAnnotation; + + /** + * Decodes a CallAnnotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CallAnnotation; + + /** + * Verifies a CallAnnotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CallAnnotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallAnnotation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CallAnnotation; + + /** + * Creates a plain object from a CallAnnotation message. Also converts values to other types if specified. + * @param message CallAnnotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CallAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallAnnotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallAnnotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnnotationBoundary. */ + interface IAnnotationBoundary { + + /** AnnotationBoundary wordIndex */ + wordIndex?: (number|null); + + /** AnnotationBoundary transcriptIndex */ + transcriptIndex?: (number|null); + } + + /** Represents an AnnotationBoundary. */ + class AnnotationBoundary implements IAnnotationBoundary { + + /** + * Constructs a new AnnotationBoundary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnnotationBoundary); + + /** AnnotationBoundary wordIndex. */ + public wordIndex?: (number|null); + + /** AnnotationBoundary transcriptIndex. */ + public transcriptIndex: number; + + /** AnnotationBoundary detailedBoundary. */ + public detailedBoundary?: "wordIndex"; + + /** + * Creates a new AnnotationBoundary instance using the specified properties. + * @param [properties] Properties to set + * @returns AnnotationBoundary instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnnotationBoundary): google.cloud.contactcenterinsights.v1.AnnotationBoundary; + + /** + * Encodes the specified AnnotationBoundary message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. + * @param message AnnotationBoundary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IAnnotationBoundary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnnotationBoundary message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. + * @param message AnnotationBoundary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnnotationBoundary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnnotationBoundary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnnotationBoundary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotationBoundary; + + /** + * Decodes an AnnotationBoundary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnnotationBoundary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotationBoundary; + + /** + * Verifies an AnnotationBoundary message. + * @param message Plain 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 AnnotationBoundary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnnotationBoundary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotationBoundary; + + /** + * Creates a plain object from an AnnotationBoundary message. Also converts values to other types if specified. + * @param message AnnotationBoundary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotationBoundary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnnotationBoundary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnnotationBoundary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Entity. */ + interface IEntity { + + /** Entity displayName */ + displayName?: (string|null); + + /** Entity type */ + type?: (google.cloud.contactcenterinsights.v1.Entity.Type|keyof typeof google.cloud.contactcenterinsights.v1.Entity.Type|null); + + /** Entity metadata */ + metadata?: ({ [k: string]: string }|null); + + /** Entity salience */ + salience?: (number|null); + + /** Entity sentiment */ + sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + } + + /** Represents an Entity. */ + class Entity implements IEntity { + + /** + * Constructs a new Entity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IEntity); + + /** Entity displayName. */ + public displayName: string; + + /** Entity type. */ + public type: (google.cloud.contactcenterinsights.v1.Entity.Type|keyof typeof google.cloud.contactcenterinsights.v1.Entity.Type); + + /** Entity metadata. */ + public metadata: { [k: string]: string }; + + /** Entity salience. */ + public salience: number; + + /** Entity sentiment. */ + public sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + + /** + * Creates a new Entity instance using the specified properties. + * @param [properties] Properties to set + * @returns Entity instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IEntity): google.cloud.contactcenterinsights.v1.Entity; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Entity; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Entity; + + /** + * Verifies an Entity message. + * @param message Plain 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 Entity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Entity; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Entity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + PERSON = 1, + LOCATION = 2, + ORGANIZATION = 3, + EVENT = 4, + WORK_OF_ART = 5, + CONSUMER_GOOD = 6, + OTHER = 7, + PHONE_NUMBER = 9, + ADDRESS = 10, + DATE = 11, + NUMBER = 12, + PRICE = 13 + } + } + + /** Properties of an Intent. */ + interface IIntent { + + /** Intent id */ + id?: (string|null); + + /** Intent displayName */ + displayName?: (string|null); + } + + /** Represents an Intent. */ + class Intent implements IIntent { + + /** + * Constructs a new Intent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIntent); + + /** Intent id. */ + public id: string; + + /** Intent displayName. */ + public displayName: string; + + /** + * Creates a new Intent instance using the specified properties. + * @param [properties] Properties to set + * @returns Intent instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIntent): google.cloud.contactcenterinsights.v1.Intent; + + /** + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. + * @param message Intent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. + * @param message Intent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Intent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Intent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Intent; + + /** + * Decodes an Intent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Intent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Intent; + + /** + * Verifies an Intent message. + * @param message Plain 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 Intent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Intent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Intent; + + /** + * Creates a plain object from an Intent message. Also converts values to other types if specified. + * @param message Intent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Intent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Intent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Intent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhraseMatchData. */ + interface IPhraseMatchData { + + /** PhraseMatchData phraseMatcher */ + phraseMatcher?: (string|null); + + /** PhraseMatchData displayName */ + displayName?: (string|null); + } + + /** Represents a PhraseMatchData. */ + class PhraseMatchData implements IPhraseMatchData { + + /** + * Constructs a new PhraseMatchData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchData); + + /** PhraseMatchData phraseMatcher. */ + public phraseMatcher: string; + + /** PhraseMatchData displayName. */ + public displayName: string; + + /** + * Creates a new PhraseMatchData instance using the specified properties. + * @param [properties] Properties to set + * @returns PhraseMatchData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchData): google.cloud.contactcenterinsights.v1.PhraseMatchData; + + /** + * Encodes the specified PhraseMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. + * @param message PhraseMatchData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhraseMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. + * @param message PhraseMatchData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhraseMatchData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhraseMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchData; + + /** + * Decodes a PhraseMatchData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhraseMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchData; + + /** + * Verifies a PhraseMatchData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhraseMatchData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhraseMatchData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchData; + + /** + * Creates a plain object from a PhraseMatchData message. Also converts values to other types if specified. + * @param message PhraseMatchData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhraseMatchData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhraseMatchData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DialogflowIntent. */ + interface IDialogflowIntent { + + /** DialogflowIntent displayName */ + displayName?: (string|null); + } + + /** Represents a DialogflowIntent. */ + class DialogflowIntent implements IDialogflowIntent { + + /** + * Constructs a new DialogflowIntent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDialogflowIntent); + + /** DialogflowIntent displayName. */ + public displayName: string; + + /** + * Creates a new DialogflowIntent instance using the specified properties. + * @param [properties] Properties to set + * @returns DialogflowIntent instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDialogflowIntent): google.cloud.contactcenterinsights.v1.DialogflowIntent; + + /** + * Encodes the specified DialogflowIntent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. + * @param message DialogflowIntent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDialogflowIntent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DialogflowIntent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. + * @param message DialogflowIntent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDialogflowIntent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DialogflowIntent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DialogflowIntent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DialogflowIntent; + + /** + * Decodes a DialogflowIntent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DialogflowIntent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DialogflowIntent; + + /** + * Verifies a DialogflowIntent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DialogflowIntent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DialogflowIntent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DialogflowIntent; + + /** + * Creates a plain object from a DialogflowIntent message. Also converts values to other types if specified. + * @param message DialogflowIntent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DialogflowIntent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DialogflowIntent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DialogflowIntent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InterruptionData. */ + interface IInterruptionData { + } + + /** Represents an InterruptionData. */ + class InterruptionData implements IInterruptionData { + + /** + * Constructs a new InterruptionData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IInterruptionData); + + /** + * Creates a new InterruptionData instance using the specified properties. + * @param [properties] Properties to set + * @returns InterruptionData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IInterruptionData): google.cloud.contactcenterinsights.v1.InterruptionData; + + /** + * Encodes the specified InterruptionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. + * @param message InterruptionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IInterruptionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InterruptionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. + * @param message InterruptionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInterruptionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InterruptionData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InterruptionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InterruptionData; + + /** + * Decodes an InterruptionData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InterruptionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InterruptionData; + + /** + * Verifies an InterruptionData message. + * @param message Plain 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 InterruptionData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InterruptionData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InterruptionData; + + /** + * Creates a plain object from an InterruptionData message. Also converts values to other types if specified. + * @param message InterruptionData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.InterruptionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InterruptionData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InterruptionData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SilenceData. */ + interface ISilenceData { + } + + /** Represents a SilenceData. */ + class SilenceData implements ISilenceData { + + /** + * Constructs a new SilenceData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ISilenceData); + + /** + * Creates a new SilenceData instance using the specified properties. + * @param [properties] Properties to set + * @returns SilenceData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ISilenceData): google.cloud.contactcenterinsights.v1.SilenceData; + + /** + * Encodes the specified SilenceData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * @param message SilenceData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ISilenceData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SilenceData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * @param message SilenceData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISilenceData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SilenceData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SilenceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SilenceData; + + /** + * Decodes a SilenceData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SilenceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SilenceData; + + /** + * Verifies a SilenceData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SilenceData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SilenceData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SilenceData; + + /** + * Creates a plain object from a SilenceData message. Also converts values to other types if specified. + * @param message SilenceData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.SilenceData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SilenceData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SilenceData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HoldData. */ + interface IHoldData { + } + + /** Represents a HoldData. */ + class HoldData implements IHoldData { + + /** + * Constructs a new HoldData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IHoldData); + + /** + * Creates a new HoldData instance using the specified properties. + * @param [properties] Properties to set + * @returns HoldData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IHoldData): google.cloud.contactcenterinsights.v1.HoldData; + + /** + * Encodes the specified HoldData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. + * @param message HoldData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IHoldData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HoldData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. + * @param message HoldData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IHoldData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HoldData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HoldData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.HoldData; + + /** + * Decodes a HoldData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HoldData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.HoldData; + + /** + * Verifies a HoldData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HoldData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HoldData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.HoldData; + + /** + * Creates a plain object from a HoldData message. Also converts values to other types if specified. + * @param message HoldData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.HoldData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HoldData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HoldData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EntityMentionData. */ + interface IEntityMentionData { + + /** EntityMentionData entityUniqueId */ + entityUniqueId?: (string|null); + + /** EntityMentionData type */ + type?: (google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|keyof typeof google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|null); + + /** EntityMentionData sentiment */ + sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + } + + /** Represents an EntityMentionData. */ + class EntityMentionData implements IEntityMentionData { + + /** + * Constructs a new EntityMentionData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IEntityMentionData); + + /** EntityMentionData entityUniqueId. */ + public entityUniqueId: string; + + /** EntityMentionData type. */ + public type: (google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|keyof typeof google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType); + + /** EntityMentionData sentiment. */ + public sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + + /** + * Creates a new EntityMentionData instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityMentionData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IEntityMentionData): google.cloud.contactcenterinsights.v1.EntityMentionData; + + /** + * Encodes the specified EntityMentionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. + * @param message EntityMentionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IEntityMentionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityMentionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. + * @param message EntityMentionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IEntityMentionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityMentionData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityMentionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.EntityMentionData; + + /** + * Decodes an EntityMentionData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityMentionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.EntityMentionData; + + /** + * Verifies an EntityMentionData message. + * @param message Plain 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 EntityMentionData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityMentionData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.EntityMentionData; + + /** + * Creates a plain object from an EntityMentionData message. Also converts values to other types if specified. + * @param message EntityMentionData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.EntityMentionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityMentionData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityMentionData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EntityMentionData { + + /** MentionType enum. */ + enum MentionType { + MENTION_TYPE_UNSPECIFIED = 0, + PROPER = 1, + COMMON = 2 + } + } + + /** Properties of an IntentMatchData. */ + interface IIntentMatchData { + + /** IntentMatchData intentUniqueId */ + intentUniqueId?: (string|null); + } + + /** Represents an IntentMatchData. */ + class IntentMatchData implements IIntentMatchData { + + /** + * Constructs a new IntentMatchData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIntentMatchData); + + /** IntentMatchData intentUniqueId. */ + public intentUniqueId: string; + + /** + * Creates a new IntentMatchData instance using the specified properties. + * @param [properties] Properties to set + * @returns IntentMatchData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIntentMatchData): google.cloud.contactcenterinsights.v1.IntentMatchData; + + /** + * Encodes the specified IntentMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. + * @param message IntentMatchData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIntentMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntentMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. + * @param message IntentMatchData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIntentMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntentMatchData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IntentMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IntentMatchData; + + /** + * Decodes an IntentMatchData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IntentMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IntentMatchData; + + /** + * Verifies an IntentMatchData message. + * @param message Plain 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 IntentMatchData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntentMatchData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IntentMatchData; + + /** + * Creates a plain object from an IntentMatchData message. Also converts values to other types if specified. + * @param message IntentMatchData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IntentMatchData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IntentMatchData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IntentMatchData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SentimentData. */ + interface ISentimentData { + + /** SentimentData magnitude */ + magnitude?: (number|null); + + /** SentimentData score */ + score?: (number|null); + } + + /** Represents a SentimentData. */ + class SentimentData implements ISentimentData { + + /** + * Constructs a new SentimentData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ISentimentData); + + /** SentimentData magnitude. */ + public magnitude: number; + + /** SentimentData score. */ + public score: number; + + /** + * Creates a new SentimentData instance using the specified properties. + * @param [properties] Properties to set + * @returns SentimentData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ISentimentData): google.cloud.contactcenterinsights.v1.SentimentData; + + /** + * Encodes the specified SentimentData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. + * @param message SentimentData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ISentimentData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SentimentData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. + * @param message SentimentData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISentimentData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SentimentData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SentimentData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SentimentData; + + /** + * Decodes a SentimentData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SentimentData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SentimentData; + + /** + * Verifies a SentimentData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SentimentData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SentimentData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SentimentData; + + /** + * Creates a plain object from a SentimentData message. Also converts values to other types if specified. + * @param message SentimentData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.SentimentData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SentimentData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SentimentData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IssueModel. */ + interface IIssueModel { + + /** IssueModel name */ + name?: (string|null); + + /** IssueModel displayName */ + displayName?: (string|null); + + /** IssueModel createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** IssueModel updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** IssueModel state */ + state?: (google.cloud.contactcenterinsights.v1.IssueModel.State|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.State|null); + + /** IssueModel inputDataConfig */ + inputDataConfig?: (google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null); + + /** IssueModel trainingStats */ + trainingStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + } + + /** Represents an IssueModel. */ + class IssueModel implements IIssueModel { + + /** + * Constructs a new IssueModel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueModel); + + /** IssueModel name. */ + public name: string; + + /** IssueModel displayName. */ + public displayName: string; + + /** IssueModel createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** IssueModel updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** IssueModel state. */ + public state: (google.cloud.contactcenterinsights.v1.IssueModel.State|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.State); + + /** IssueModel inputDataConfig. */ + public inputDataConfig?: (google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null); + + /** IssueModel trainingStats. */ + public trainingStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + + /** + * Creates a new IssueModel instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueModel instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueModel): google.cloud.contactcenterinsights.v1.IssueModel; + + /** + * Encodes the specified IssueModel message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. + * @param message IssueModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssueModel message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. + * @param message IssueModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssueModel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModel; + + /** + * Decodes an IssueModel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModel; + + /** + * Verifies an IssueModel message. + * @param message Plain 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 IssueModel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueModel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModel; + + /** + * Creates a plain object from an IssueModel message. Also converts values to other types if specified. + * @param message IssueModel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssueModel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssueModel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IssueModel { + + /** Properties of an InputDataConfig. */ + interface IInputDataConfig { + + /** InputDataConfig medium */ + medium?: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium|null); + + /** InputDataConfig trainingConversationsCount */ + trainingConversationsCount?: (number|Long|string|null); + + /** InputDataConfig filter */ + filter?: (string|null); + } + + /** Represents an InputDataConfig. */ + class InputDataConfig implements IInputDataConfig { + + /** + * Constructs a new InputDataConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig); + + /** InputDataConfig medium. */ + public medium: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium); + + /** InputDataConfig trainingConversationsCount. */ + public trainingConversationsCount: (number|Long|string); + + /** InputDataConfig filter. */ + public filter: string; + + /** + * Creates a new InputDataConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InputDataConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + + /** + * Encodes the specified InputDataConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. + * @param message InputDataConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InputDataConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. + * @param message InputDataConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InputDataConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InputDataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + + /** + * Decodes an InputDataConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InputDataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + + /** + * Verifies an InputDataConfig message. + * @param message Plain 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 InputDataConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InputDataConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + + /** + * Creates a plain object from an InputDataConfig message. Also converts values to other types if specified. + * @param message InputDataConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InputDataConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InputDataConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + UNDEPLOYED = 1, + DEPLOYING = 2, + DEPLOYED = 3, + UNDEPLOYING = 4, + DELETING = 5 + } + } + + /** Properties of an Issue. */ + interface IIssue { + + /** Issue name */ + name?: (string|null); + + /** Issue displayName */ + displayName?: (string|null); + + /** Issue createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Issue updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Issue. */ + class Issue implements IIssue { + + /** + * Constructs a new Issue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssue); + + /** Issue name. */ + public name: string; + + /** Issue displayName. */ + public displayName: string; + + /** Issue createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Issue updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Issue instance using the specified properties. + * @param [properties] Properties to set + * @returns Issue instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssue): google.cloud.contactcenterinsights.v1.Issue; + + /** + * Encodes the specified Issue message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. + * @param message Issue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIssue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Issue message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. + * @param message Issue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Issue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Issue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Issue; + + /** + * Decodes an Issue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Issue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Issue; + + /** + * Verifies an Issue message. + * @param message Plain 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 Issue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Issue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Issue; + + /** + * Creates a plain object from an Issue message. Also converts values to other types if specified. + * @param message Issue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Issue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Issue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Issue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IssueModelLabelStats. */ + interface IIssueModelLabelStats { + + /** IssueModelLabelStats analyzedConversationsCount */ + analyzedConversationsCount?: (number|Long|string|null); + + /** IssueModelLabelStats unclassifiedConversationsCount */ + unclassifiedConversationsCount?: (number|Long|string|null); + + /** IssueModelLabelStats issueStats */ + issueStats?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats }|null); + } + + /** Represents an IssueModelLabelStats. */ + class IssueModelLabelStats implements IIssueModelLabelStats { + + /** + * Constructs a new IssueModelLabelStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats); + + /** IssueModelLabelStats analyzedConversationsCount. */ + public analyzedConversationsCount: (number|Long|string); + + /** IssueModelLabelStats unclassifiedConversationsCount. */ + public unclassifiedConversationsCount: (number|Long|string); + + /** IssueModelLabelStats issueStats. */ + public issueStats: { [k: string]: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats }; + + /** + * Creates a new IssueModelLabelStats instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueModelLabelStats instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; + + /** + * Encodes the specified IssueModelLabelStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. + * @param message IssueModelLabelStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssueModelLabelStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. + * @param message IssueModelLabelStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssueModelLabelStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueModelLabelStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; + + /** + * Decodes an IssueModelLabelStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueModelLabelStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; + + /** + * Verifies an IssueModelLabelStats message. + * @param message Plain 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 IssueModelLabelStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueModelLabelStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; + + /** + * Creates a plain object from an IssueModelLabelStats message. Also converts values to other types if specified. + * @param message IssueModelLabelStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssueModelLabelStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssueModelLabelStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IssueModelLabelStats { + + /** Properties of an IssueStats. */ + interface IIssueStats { + + /** IssueStats issue */ + issue?: (string|null); + + /** IssueStats labeledConversationsCount */ + labeledConversationsCount?: (number|Long|string|null); + + /** IssueStats displayName */ + displayName?: (string|null); + } + + /** Represents an IssueStats. */ + class IssueStats implements IIssueStats { + + /** + * Constructs a new IssueStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats); + + /** IssueStats issue. */ + public issue: string; + + /** IssueStats labeledConversationsCount. */ + public labeledConversationsCount: (number|Long|string); + + /** IssueStats displayName. */ + public displayName: string; + + /** + * Creates a new IssueStats instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueStats instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; + + /** + * Encodes the specified IssueStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. + * @param message IssueStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssueStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. + * @param message IssueStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssueStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; + + /** + * Decodes an IssueStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; + + /** + * Verifies an IssueStats message. + * @param message Plain 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 IssueStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; + + /** + * Creates a plain object from an IssueStats message. Also converts values to other types if specified. + * @param message IssueStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssueStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssueStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a PhraseMatcher. */ + interface IPhraseMatcher { + + /** PhraseMatcher name */ + name?: (string|null); + + /** PhraseMatcher revisionId */ + revisionId?: (string|null); + + /** PhraseMatcher versionTag */ + versionTag?: (string|null); + + /** PhraseMatcher revisionCreateTime */ + revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** PhraseMatcher displayName */ + displayName?: (string|null); + + /** PhraseMatcher type */ + type?: (google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|null); + + /** PhraseMatcher active */ + active?: (boolean|null); + + /** PhraseMatcher phraseMatchRuleGroups */ + phraseMatchRuleGroups?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup[]|null); + + /** PhraseMatcher activationUpdateTime */ + activationUpdateTime?: (google.protobuf.ITimestamp|null); + + /** PhraseMatcher roleMatch */ + roleMatch?: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null); + + /** PhraseMatcher updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a PhraseMatcher. */ + class PhraseMatcher implements IPhraseMatcher { + + /** + * Constructs a new PhraseMatcher. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatcher); + + /** PhraseMatcher name. */ + public name: string; + + /** PhraseMatcher revisionId. */ + public revisionId: string; + + /** PhraseMatcher versionTag. */ + public versionTag: string; + + /** PhraseMatcher revisionCreateTime. */ + public revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** PhraseMatcher displayName. */ + public displayName: string; + + /** PhraseMatcher type. */ + public type: (google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType); + + /** PhraseMatcher active. */ + public active: boolean; + + /** PhraseMatcher phraseMatchRuleGroups. */ + public phraseMatchRuleGroups: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup[]; + + /** PhraseMatcher activationUpdateTime. */ + public activationUpdateTime?: (google.protobuf.ITimestamp|null); + + /** PhraseMatcher roleMatch. */ + public roleMatch: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role); + + /** PhraseMatcher updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new PhraseMatcher instance using the specified properties. + * @param [properties] Properties to set + * @returns PhraseMatcher instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatcher): google.cloud.contactcenterinsights.v1.PhraseMatcher; + + /** + * Encodes the specified PhraseMatcher message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. + * @param message PhraseMatcher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatcher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhraseMatcher message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. + * @param message PhraseMatcher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatcher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhraseMatcher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhraseMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatcher; + + /** + * Decodes a PhraseMatcher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhraseMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatcher; + + /** + * Verifies a PhraseMatcher message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhraseMatcher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhraseMatcher + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatcher; + + /** + * Creates a plain object from a PhraseMatcher message. Also converts values to other types if specified. + * @param message PhraseMatcher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatcher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhraseMatcher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhraseMatcher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PhraseMatcher { + + /** PhraseMatcherType enum. */ + enum PhraseMatcherType { + PHRASE_MATCHER_TYPE_UNSPECIFIED = 0, + ALL_OF = 1, + ANY_OF = 2 + } + } + + /** Properties of a PhraseMatchRuleGroup. */ + interface IPhraseMatchRuleGroup { + + /** PhraseMatchRuleGroup type */ + type?: (google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|null); + + /** PhraseMatchRuleGroup phraseMatchRules */ + phraseMatchRules?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRule[]|null); + } + + /** Represents a PhraseMatchRuleGroup. */ + class PhraseMatchRuleGroup implements IPhraseMatchRuleGroup { + + /** + * Constructs a new PhraseMatchRuleGroup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup); + + /** PhraseMatchRuleGroup type. */ + public type: (google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType); + + /** PhraseMatchRuleGroup phraseMatchRules. */ + public phraseMatchRules: google.cloud.contactcenterinsights.v1.IPhraseMatchRule[]; + + /** + * Creates a new PhraseMatchRuleGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns PhraseMatchRuleGroup instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; + + /** + * Encodes the specified PhraseMatchRuleGroup message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. + * @param message PhraseMatchRuleGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhraseMatchRuleGroup message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. + * @param message PhraseMatchRuleGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhraseMatchRuleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; + + /** + * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhraseMatchRuleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; + + /** + * Verifies a PhraseMatchRuleGroup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhraseMatchRuleGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhraseMatchRuleGroup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; + + /** + * Creates a plain object from a PhraseMatchRuleGroup message. Also converts values to other types if specified. + * @param message PhraseMatchRuleGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhraseMatchRuleGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhraseMatchRuleGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PhraseMatchRuleGroup { + + /** PhraseMatchRuleGroupType enum. */ + enum PhraseMatchRuleGroupType { + PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0, + ALL_OF = 1, + ANY_OF = 2 + } + } + + /** Properties of a PhraseMatchRule. */ + interface IPhraseMatchRule { + + /** PhraseMatchRule query */ + query?: (string|null); + + /** PhraseMatchRule negated */ + negated?: (boolean|null); + + /** PhraseMatchRule config */ + config?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null); + } + + /** Represents a PhraseMatchRule. */ + class PhraseMatchRule implements IPhraseMatchRule { + + /** + * Constructs a new PhraseMatchRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRule); + + /** PhraseMatchRule query. */ + public query: string; + + /** PhraseMatchRule negated. */ + public negated: boolean; + + /** PhraseMatchRule config. */ + public config?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null); + + /** + * Creates a new PhraseMatchRule instance using the specified properties. + * @param [properties] Properties to set + * @returns PhraseMatchRule instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRule): google.cloud.contactcenterinsights.v1.PhraseMatchRule; + + /** + * Encodes the specified PhraseMatchRule message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. + * @param message PhraseMatchRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhraseMatchRule message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. + * @param message PhraseMatchRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhraseMatchRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhraseMatchRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchRule; + + /** + * Decodes a PhraseMatchRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhraseMatchRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchRule; + + /** + * Verifies a PhraseMatchRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhraseMatchRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhraseMatchRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchRule; + + /** + * Creates a plain object from a PhraseMatchRule message. Also converts values to other types if specified. + * @param message PhraseMatchRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhraseMatchRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhraseMatchRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhraseMatchRuleConfig. */ + interface IPhraseMatchRuleConfig { + + /** PhraseMatchRuleConfig exactMatchConfig */ + exactMatchConfig?: (google.cloud.contactcenterinsights.v1.IExactMatchConfig|null); + } + + /** Represents a PhraseMatchRuleConfig. */ + class PhraseMatchRuleConfig implements IPhraseMatchRuleConfig { + + /** + * Constructs a new PhraseMatchRuleConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig); + + /** PhraseMatchRuleConfig exactMatchConfig. */ + public exactMatchConfig?: (google.cloud.contactcenterinsights.v1.IExactMatchConfig|null); + + /** PhraseMatchRuleConfig config. */ + public config?: "exactMatchConfig"; + + /** + * Creates a new PhraseMatchRuleConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PhraseMatchRuleConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; + + /** + * Encodes the specified PhraseMatchRuleConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. + * @param message PhraseMatchRuleConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhraseMatchRuleConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. + * @param message PhraseMatchRuleConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhraseMatchRuleConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; + + /** + * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhraseMatchRuleConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; + + /** + * Verifies a PhraseMatchRuleConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhraseMatchRuleConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhraseMatchRuleConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; + + /** + * Creates a plain object from a PhraseMatchRuleConfig message. Also converts values to other types if specified. + * @param message PhraseMatchRuleConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhraseMatchRuleConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhraseMatchRuleConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExactMatchConfig. */ + interface IExactMatchConfig { + + /** ExactMatchConfig caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an ExactMatchConfig. */ + class ExactMatchConfig implements IExactMatchConfig { + + /** + * Constructs a new ExactMatchConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IExactMatchConfig); + + /** ExactMatchConfig caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new ExactMatchConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ExactMatchConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IExactMatchConfig): google.cloud.contactcenterinsights.v1.ExactMatchConfig; + + /** + * Encodes the specified ExactMatchConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. + * @param message ExactMatchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IExactMatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExactMatchConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. + * @param message ExactMatchConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IExactMatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExactMatchConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExactMatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExactMatchConfig; + + /** + * Decodes an ExactMatchConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExactMatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExactMatchConfig; + + /** + * Verifies an ExactMatchConfig message. + * @param message Plain 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 ExactMatchConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExactMatchConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExactMatchConfig; + + /** + * Creates a plain object from an ExactMatchConfig message. Also converts values to other types if specified. + * @param message ExactMatchConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ExactMatchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExactMatchConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExactMatchConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Settings. */ + interface ISettings { + + /** Settings name */ + name?: (string|null); + + /** Settings createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Settings updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Settings languageCode */ + languageCode?: (string|null); + + /** Settings conversationTtl */ + conversationTtl?: (google.protobuf.IDuration|null); + + /** Settings pubsubNotificationSettings */ + pubsubNotificationSettings?: ({ [k: string]: string }|null); + + /** Settings analysisConfig */ + analysisConfig?: (google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null); + } + + /** Represents a Settings. */ + class Settings implements ISettings { + + /** + * Constructs a new Settings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ISettings); + + /** Settings name. */ + public name: string; + + /** Settings createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Settings updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Settings languageCode. */ + public languageCode: string; + + /** Settings conversationTtl. */ + public conversationTtl?: (google.protobuf.IDuration|null); + + /** Settings pubsubNotificationSettings. */ + public pubsubNotificationSettings: { [k: string]: string }; + + /** Settings analysisConfig. */ + public analysisConfig?: (google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null); + + /** + * Creates a new Settings instance using the specified properties. + * @param [properties] Properties to set + * @returns Settings instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ISettings): google.cloud.contactcenterinsights.v1.Settings; + + /** + * Encodes the specified Settings message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. + * @param message Settings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ISettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. + * @param message Settings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Settings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Settings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Settings; + + /** + * Decodes a Settings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Settings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Settings; + + /** + * Verifies a Settings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Settings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Settings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Settings; + + /** + * Creates a plain object from a Settings message. Also converts values to other types if specified. + * @param message Settings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Settings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Settings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Settings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Settings { + + /** Properties of an AnalysisConfig. */ + interface IAnalysisConfig { + + /** AnalysisConfig runtimeIntegrationAnalysisPercentage */ + runtimeIntegrationAnalysisPercentage?: (number|null); + } + + /** Represents an AnalysisConfig. */ + class AnalysisConfig implements IAnalysisConfig { + + /** + * Constructs a new AnalysisConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig); + + /** AnalysisConfig runtimeIntegrationAnalysisPercentage. */ + public runtimeIntegrationAnalysisPercentage: number; + + /** + * Creates a new AnalysisConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; + + /** + * Encodes the specified AnalysisConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. + * @param message AnalysisConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. + * @param message AnalysisConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; + + /** + * Decodes an AnalysisConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; + + /** + * Verifies an AnalysisConfig message. + * @param message Plain 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 AnalysisConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; + + /** + * Creates a plain object from an AnalysisConfig message. Also converts values to other types if specified. + * @param message AnalysisConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RuntimeAnnotation. */ + interface IRuntimeAnnotation { + + /** RuntimeAnnotation articleSuggestion */ + articleSuggestion?: (google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null); + + /** RuntimeAnnotation faqAnswer */ + faqAnswer?: (google.cloud.contactcenterinsights.v1.IFaqAnswerData|null); + + /** RuntimeAnnotation smartReply */ + smartReply?: (google.cloud.contactcenterinsights.v1.ISmartReplyData|null); + + /** RuntimeAnnotation smartComposeSuggestion */ + smartComposeSuggestion?: (google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null); + + /** RuntimeAnnotation dialogflowInteraction */ + dialogflowInteraction?: (google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null); + + /** RuntimeAnnotation annotationId */ + annotationId?: (string|null); + + /** RuntimeAnnotation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** RuntimeAnnotation startBoundary */ + startBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** RuntimeAnnotation endBoundary */ + endBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** RuntimeAnnotation answerFeedback */ + answerFeedback?: (google.cloud.contactcenterinsights.v1.IAnswerFeedback|null); + } + + /** Represents a RuntimeAnnotation. */ + class RuntimeAnnotation implements IRuntimeAnnotation { + + /** + * Constructs a new RuntimeAnnotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation); + + /** RuntimeAnnotation articleSuggestion. */ + public articleSuggestion?: (google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null); + + /** RuntimeAnnotation faqAnswer. */ + public faqAnswer?: (google.cloud.contactcenterinsights.v1.IFaqAnswerData|null); + + /** RuntimeAnnotation smartReply. */ + public smartReply?: (google.cloud.contactcenterinsights.v1.ISmartReplyData|null); + + /** RuntimeAnnotation smartComposeSuggestion. */ + public smartComposeSuggestion?: (google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null); + + /** RuntimeAnnotation dialogflowInteraction. */ + public dialogflowInteraction?: (google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null); + + /** RuntimeAnnotation annotationId. */ + public annotationId: string; + + /** RuntimeAnnotation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** RuntimeAnnotation startBoundary. */ + public startBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** RuntimeAnnotation endBoundary. */ + public endBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** RuntimeAnnotation answerFeedback. */ + public answerFeedback?: (google.cloud.contactcenterinsights.v1.IAnswerFeedback|null); + + /** RuntimeAnnotation data. */ + public data?: ("articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"); + + /** + * Creates a new RuntimeAnnotation instance using the specified properties. + * @param [properties] Properties to set + * @returns RuntimeAnnotation instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; + + /** + * Encodes the specified RuntimeAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. + * @param message RuntimeAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RuntimeAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. + * @param message RuntimeAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RuntimeAnnotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RuntimeAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; + + /** + * Decodes a RuntimeAnnotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RuntimeAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; + + /** + * Verifies a RuntimeAnnotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RuntimeAnnotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RuntimeAnnotation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; + + /** + * Creates a plain object from a RuntimeAnnotation message. Also converts values to other types if specified. + * @param message RuntimeAnnotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RuntimeAnnotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RuntimeAnnotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnswerFeedback. */ + interface IAnswerFeedback { + + /** AnswerFeedback correctnessLevel */ + correctnessLevel?: (google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|null); + + /** AnswerFeedback clicked */ + clicked?: (boolean|null); + + /** AnswerFeedback displayed */ + displayed?: (boolean|null); + } + + /** Represents an AnswerFeedback. */ + class AnswerFeedback implements IAnswerFeedback { + + /** + * Constructs a new AnswerFeedback. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnswerFeedback); + + /** AnswerFeedback correctnessLevel. */ + public correctnessLevel: (google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel); + + /** AnswerFeedback clicked. */ + public clicked: boolean; + + /** AnswerFeedback displayed. */ + public displayed: boolean; + + /** + * Creates a new AnswerFeedback instance using the specified properties. + * @param [properties] Properties to set + * @returns AnswerFeedback instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnswerFeedback): google.cloud.contactcenterinsights.v1.AnswerFeedback; + + /** + * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. + * @param message AnswerFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. + * @param message AnswerFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnswerFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnswerFeedback; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnswerFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnswerFeedback; + + /** + * Verifies an AnswerFeedback message. + * @param message Plain 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 AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnswerFeedback + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnswerFeedback; + + /** + * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * @param message AnswerFeedback + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnswerFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnswerFeedback to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnswerFeedback + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AnswerFeedback { + + /** CorrectnessLevel enum. */ + enum CorrectnessLevel { + CORRECTNESS_LEVEL_UNSPECIFIED = 0, + NOT_CORRECT = 1, + PARTIALLY_CORRECT = 2, + FULLY_CORRECT = 3 + } + } + + /** Properties of an ArticleSuggestionData. */ + interface IArticleSuggestionData { + + /** ArticleSuggestionData title */ + title?: (string|null); + + /** ArticleSuggestionData uri */ + uri?: (string|null); + + /** ArticleSuggestionData confidenceScore */ + confidenceScore?: (number|null); + + /** ArticleSuggestionData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** ArticleSuggestionData queryRecord */ + queryRecord?: (string|null); + + /** ArticleSuggestionData source */ + source?: (string|null); + } + + /** Represents an ArticleSuggestionData. */ + class ArticleSuggestionData implements IArticleSuggestionData { + + /** + * Constructs a new ArticleSuggestionData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IArticleSuggestionData); + + /** ArticleSuggestionData title. */ + public title: string; + + /** ArticleSuggestionData uri. */ + public uri: string; + + /** ArticleSuggestionData confidenceScore. */ + public confidenceScore: number; + + /** ArticleSuggestionData metadata. */ + public metadata: { [k: string]: string }; + + /** ArticleSuggestionData queryRecord. */ + public queryRecord: string; + + /** ArticleSuggestionData source. */ + public source: string; + + /** + * Creates a new ArticleSuggestionData instance using the specified properties. + * @param [properties] Properties to set + * @returns ArticleSuggestionData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IArticleSuggestionData): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; + + /** + * Encodes the specified ArticleSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. + * @param message ArticleSuggestionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IArticleSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArticleSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. + * @param message ArticleSuggestionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IArticleSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArticleSuggestionData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArticleSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; + + /** + * Decodes an ArticleSuggestionData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArticleSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; + + /** + * Verifies an ArticleSuggestionData message. + * @param message Plain 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 ArticleSuggestionData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArticleSuggestionData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; + + /** + * Creates a plain object from an ArticleSuggestionData message. Also converts values to other types if specified. + * @param message ArticleSuggestionData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ArticleSuggestionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArticleSuggestionData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArticleSuggestionData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FaqAnswerData. */ + interface IFaqAnswerData { + + /** FaqAnswerData answer */ + answer?: (string|null); + + /** FaqAnswerData confidenceScore */ + confidenceScore?: (number|null); + + /** FaqAnswerData question */ + question?: (string|null); + + /** FaqAnswerData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** FaqAnswerData queryRecord */ + queryRecord?: (string|null); + + /** FaqAnswerData source */ + source?: (string|null); + } + + /** Represents a FaqAnswerData. */ + class FaqAnswerData implements IFaqAnswerData { + + /** + * Constructs a new FaqAnswerData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IFaqAnswerData); + + /** FaqAnswerData answer. */ + public answer: string; + + /** FaqAnswerData confidenceScore. */ + public confidenceScore: number; + + /** FaqAnswerData question. */ + public question: string; + + /** FaqAnswerData metadata. */ + public metadata: { [k: string]: string }; + + /** FaqAnswerData queryRecord. */ + public queryRecord: string; + + /** FaqAnswerData source. */ + public source: string; + + /** + * Creates a new FaqAnswerData instance using the specified properties. + * @param [properties] Properties to set + * @returns FaqAnswerData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IFaqAnswerData): google.cloud.contactcenterinsights.v1.FaqAnswerData; + + /** + * Encodes the specified FaqAnswerData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. + * @param message FaqAnswerData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IFaqAnswerData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FaqAnswerData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. + * @param message FaqAnswerData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IFaqAnswerData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FaqAnswerData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FaqAnswerData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.FaqAnswerData; + + /** + * Decodes a FaqAnswerData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FaqAnswerData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.FaqAnswerData; + + /** + * Verifies a FaqAnswerData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FaqAnswerData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FaqAnswerData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.FaqAnswerData; + + /** + * Creates a plain object from a FaqAnswerData message. Also converts values to other types if specified. + * @param message FaqAnswerData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.FaqAnswerData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FaqAnswerData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FaqAnswerData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SmartReplyData. */ + interface ISmartReplyData { + + /** SmartReplyData reply */ + reply?: (string|null); + + /** SmartReplyData confidenceScore */ + confidenceScore?: (number|null); + + /** SmartReplyData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** SmartReplyData queryRecord */ + queryRecord?: (string|null); + } + + /** Represents a SmartReplyData. */ + class SmartReplyData implements ISmartReplyData { + + /** + * Constructs a new SmartReplyData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ISmartReplyData); + + /** SmartReplyData reply. */ + public reply: string; + + /** SmartReplyData confidenceScore. */ + public confidenceScore: number; + + /** SmartReplyData metadata. */ + public metadata: { [k: string]: string }; + + /** SmartReplyData queryRecord. */ + public queryRecord: string; + + /** + * Creates a new SmartReplyData instance using the specified properties. + * @param [properties] Properties to set + * @returns SmartReplyData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ISmartReplyData): google.cloud.contactcenterinsights.v1.SmartReplyData; + + /** + * Encodes the specified SmartReplyData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. + * @param message SmartReplyData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ISmartReplyData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SmartReplyData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. + * @param message SmartReplyData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISmartReplyData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SmartReplyData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SmartReplyData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SmartReplyData; + + /** + * Decodes a SmartReplyData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SmartReplyData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SmartReplyData; + + /** + * Verifies a SmartReplyData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SmartReplyData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SmartReplyData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SmartReplyData; + + /** + * Creates a plain object from a SmartReplyData message. Also converts values to other types if specified. + * @param message SmartReplyData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.SmartReplyData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SmartReplyData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SmartReplyData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SmartComposeSuggestionData. */ + interface ISmartComposeSuggestionData { + + /** SmartComposeSuggestionData suggestion */ + suggestion?: (string|null); + + /** SmartComposeSuggestionData confidenceScore */ + confidenceScore?: (number|null); + + /** SmartComposeSuggestionData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** SmartComposeSuggestionData queryRecord */ + queryRecord?: (string|null); + } + + /** Represents a SmartComposeSuggestionData. */ + class SmartComposeSuggestionData implements ISmartComposeSuggestionData { + + /** + * Constructs a new SmartComposeSuggestionData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData); + + /** SmartComposeSuggestionData suggestion. */ + public suggestion: string; + + /** SmartComposeSuggestionData confidenceScore. */ + public confidenceScore: number; + + /** SmartComposeSuggestionData metadata. */ + public metadata: { [k: string]: string }; + + /** SmartComposeSuggestionData queryRecord. */ + public queryRecord: string; + + /** + * Creates a new SmartComposeSuggestionData instance using the specified properties. + * @param [properties] Properties to set + * @returns SmartComposeSuggestionData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; + + /** + * Encodes the specified SmartComposeSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. + * @param message SmartComposeSuggestionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SmartComposeSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. + * @param message SmartComposeSuggestionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SmartComposeSuggestionData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SmartComposeSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; + + /** + * Decodes a SmartComposeSuggestionData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SmartComposeSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; + + /** + * Verifies a SmartComposeSuggestionData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SmartComposeSuggestionData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SmartComposeSuggestionData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; + + /** + * Creates a plain object from a SmartComposeSuggestionData message. Also converts values to other types if specified. + * @param message SmartComposeSuggestionData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SmartComposeSuggestionData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SmartComposeSuggestionData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DialogflowInteractionData. */ + interface IDialogflowInteractionData { + + /** DialogflowInteractionData dialogflowIntentId */ + dialogflowIntentId?: (string|null); + + /** DialogflowInteractionData confidence */ + confidence?: (number|null); + } + + /** Represents a DialogflowInteractionData. */ + class DialogflowInteractionData implements IDialogflowInteractionData { + + /** + * Constructs a new DialogflowInteractionData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData); + + /** DialogflowInteractionData dialogflowIntentId. */ + public dialogflowIntentId: string; + + /** DialogflowInteractionData confidence. */ + public confidence: number; + + /** + * Creates a new DialogflowInteractionData instance using the specified properties. + * @param [properties] Properties to set + * @returns DialogflowInteractionData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; + + /** + * Encodes the specified DialogflowInteractionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. + * @param message DialogflowInteractionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DialogflowInteractionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. + * @param message DialogflowInteractionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DialogflowInteractionData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DialogflowInteractionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; + + /** + * Decodes a DialogflowInteractionData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DialogflowInteractionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; + + /** + * Verifies a DialogflowInteractionData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DialogflowInteractionData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DialogflowInteractionData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; + + /** + * Creates a plain object from a DialogflowInteractionData message. Also converts values to other types if specified. + * @param message DialogflowInteractionData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DialogflowInteractionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DialogflowInteractionData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DialogflowInteractionData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationParticipant. */ + interface IConversationParticipant { + + /** ConversationParticipant dialogflowParticipantName */ + dialogflowParticipantName?: (string|null); + + /** ConversationParticipant userId */ + userId?: (string|null); + + /** ConversationParticipant dialogflowParticipant */ + dialogflowParticipant?: (string|null); + + /** ConversationParticipant obfuscatedExternalUserId */ + obfuscatedExternalUserId?: (string|null); + + /** ConversationParticipant role */ + role?: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null); + } + + /** Represents a ConversationParticipant. */ + class ConversationParticipant implements IConversationParticipant { + + /** + * Constructs a new ConversationParticipant. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationParticipant); + + /** ConversationParticipant dialogflowParticipantName. */ + public dialogflowParticipantName?: (string|null); + + /** ConversationParticipant userId. */ + public userId?: (string|null); + + /** ConversationParticipant dialogflowParticipant. */ + public dialogflowParticipant: string; + + /** ConversationParticipant obfuscatedExternalUserId. */ + public obfuscatedExternalUserId: string; + + /** ConversationParticipant role. */ + public role: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role); + + /** ConversationParticipant participant. */ + public participant?: ("dialogflowParticipantName"|"userId"); + + /** + * Creates a new ConversationParticipant instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationParticipant instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationParticipant): google.cloud.contactcenterinsights.v1.ConversationParticipant; + + /** + * Encodes the specified ConversationParticipant message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. + * @param message ConversationParticipant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationParticipant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationParticipant message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. + * @param message ConversationParticipant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationParticipant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationParticipant message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationParticipant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationParticipant; + + /** + * Decodes a ConversationParticipant message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationParticipant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationParticipant; + + /** + * Verifies a ConversationParticipant message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationParticipant message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationParticipant + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationParticipant; + + /** + * Creates a plain object from a ConversationParticipant message. Also converts values to other types if specified. + * @param message ConversationParticipant + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationParticipant, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationParticipant to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationParticipant + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ConversationParticipant { + + /** Role enum. */ + enum Role { + ROLE_UNSPECIFIED = 0, + HUMAN_AGENT = 1, + AUTOMATED_AGENT = 2, + END_USER = 3, + ANY_AGENT = 4 + } + } + + /** Properties of a View. */ + interface IView { + + /** View name */ + name?: (string|null); + + /** View displayName */ + displayName?: (string|null); + + /** View createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** View updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** View value */ + value?: (string|null); + } + + /** Represents a View. */ + class View implements IView { + + /** + * Constructs a new View. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IView); + + /** View name. */ + public name: string; + + /** View displayName. */ + public displayName: string; + + /** View createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** View updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** View value. */ + public value: string; + + /** + * Creates a new View instance using the specified properties. + * @param [properties] Properties to set + * @returns View instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IView): google.cloud.contactcenterinsights.v1.View; + + /** + * Encodes the specified View message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. + * @param message View message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified View message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. + * @param message View message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IView, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a View message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns View + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.View; + + /** + * Decodes a View message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns View + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.View; + + /** + * Verifies a View message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a View message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns View + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.View; + + /** + * Creates a plain object from a View message. Also converts values to other types if specified. + * @param message View + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.View, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this View to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for View + * @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; + } + + /** 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 + } + + /** 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; + } + + /** 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 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?: (string|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 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: string; + + /** + * 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); + } + + /** 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[]; + + /** + * 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); + } + + /** 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[]; + + /** + * 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; + } + + /** 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_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** 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); + } + + /** 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[]; + + /** + * 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 phpGenericServices */ + phpGenericServices?: (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 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 phpGenericServices. */ + public phpGenericServices: 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 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 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 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 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 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 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** 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 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 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 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 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 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 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); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** 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 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); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|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 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|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|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 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 + } + } + } + + /** 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 Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|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|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; + } + + /** 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; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations 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 Operations 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): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain 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 Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @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; + } + } +} diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.js b/packages/google-cloud-contactcenterinsights/protos/protos.js new file mode 100644 index 00000000000..4cd9d71c172 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/protos/protos.js @@ -0,0 +1,43331 @@ +// Copyright 2022 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_contact_center_insights_protos || ($protobuf.roots._google_cloud_contact_center_insights_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.contactcenterinsights = (function() { + + /** + * Namespace contactcenterinsights. + * @memberof google.cloud + * @namespace + */ + var contactcenterinsights = {}; + + contactcenterinsights.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.contactcenterinsights + * @namespace + */ + var v1 = {}; + + v1.ContactCenterInsights = (function() { + + /** + * Constructs a new ContactCenterInsights service. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ContactCenterInsights + * @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 ContactCenterInsights(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ContactCenterInsights.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ContactCenterInsights; + + /** + * Creates new ContactCenterInsights service using the specified rpc implementation. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @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 {ContactCenterInsights} RPC service. Useful where requests and/or responses are streamed. + */ + ContactCenterInsights.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createConversation}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreateConversationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.Conversation} [response] Conversation + */ + + /** + * Calls CreateConversation. + * @function createConversation + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateConversationRequest} request CreateConversationRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateConversationCallback} callback Node-style callback called with the error, if any, and Conversation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.createConversation = function createConversation(request, callback) { + return this.rpcCall(createConversation, $root.google.cloud.contactcenterinsights.v1.CreateConversationRequest, $root.google.cloud.contactcenterinsights.v1.Conversation, request, callback); + }, "name", { value: "CreateConversation" }); + + /** + * Calls CreateConversation. + * @function createConversation + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateConversationRequest} request CreateConversationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateConversation}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdateConversationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.Conversation} [response] Conversation + */ + + /** + * Calls UpdateConversation. + * @function updateConversation + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateConversationRequest} request UpdateConversationRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateConversationCallback} callback Node-style callback called with the error, if any, and Conversation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.updateConversation = function updateConversation(request, callback) { + return this.rpcCall(updateConversation, $root.google.cloud.contactcenterinsights.v1.UpdateConversationRequest, $root.google.cloud.contactcenterinsights.v1.Conversation, request, callback); + }, "name", { value: "UpdateConversation" }); + + /** + * Calls UpdateConversation. + * @function updateConversation + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateConversationRequest} request UpdateConversationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getConversation}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetConversationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.Conversation} [response] Conversation + */ + + /** + * Calls GetConversation. + * @function getConversation + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetConversationRequest} request GetConversationRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetConversationCallback} callback Node-style callback called with the error, if any, and Conversation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getConversation = function getConversation(request, callback) { + return this.rpcCall(getConversation, $root.google.cloud.contactcenterinsights.v1.GetConversationRequest, $root.google.cloud.contactcenterinsights.v1.Conversation, request, callback); + }, "name", { value: "GetConversation" }); + + /** + * Calls GetConversation. + * @function getConversation + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetConversationRequest} request GetConversationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listConversations}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListConversationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListConversationsResponse} [response] ListConversationsResponse + */ + + /** + * Calls ListConversations. + * @function listConversations + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListConversationsRequest} request ListConversationsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListConversationsCallback} callback Node-style callback called with the error, if any, and ListConversationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listConversations = function listConversations(request, callback) { + return this.rpcCall(listConversations, $root.google.cloud.contactcenterinsights.v1.ListConversationsRequest, $root.google.cloud.contactcenterinsights.v1.ListConversationsResponse, request, callback); + }, "name", { value: "ListConversations" }); + + /** + * Calls ListConversations. + * @function listConversations + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListConversationsRequest} request ListConversationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteConversation}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteConversationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteConversation. + * @function deleteConversation + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteConversationRequest} request DeleteConversationRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteConversationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deleteConversation = function deleteConversation(request, callback) { + return this.rpcCall(deleteConversation, $root.google.cloud.contactcenterinsights.v1.DeleteConversationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteConversation" }); + + /** + * Calls DeleteConversation. + * @function deleteConversation + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteConversationRequest} request DeleteConversationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createAnalysis}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreateAnalysisCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAnalysis. + * @function createAnalysis + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest} request CreateAnalysisRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateAnalysisCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.createAnalysis = function createAnalysis(request, callback) { + return this.rpcCall(createAnalysis, $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAnalysis" }); + + /** + * Calls CreateAnalysis. + * @function createAnalysis + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest} request CreateAnalysisRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getAnalysis}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetAnalysisCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.Analysis} [response] Analysis + */ + + /** + * Calls GetAnalysis. + * @function getAnalysis + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest} request GetAnalysisRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetAnalysisCallback} callback Node-style callback called with the error, if any, and Analysis + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getAnalysis = function getAnalysis(request, callback) { + return this.rpcCall(getAnalysis, $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest, $root.google.cloud.contactcenterinsights.v1.Analysis, request, callback); + }, "name", { value: "GetAnalysis" }); + + /** + * Calls GetAnalysis. + * @function getAnalysis + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest} request GetAnalysisRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listAnalyses}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListAnalysesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} [response] ListAnalysesResponse + */ + + /** + * Calls ListAnalyses. + * @function listAnalyses + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest} request ListAnalysesRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAnalysesCallback} callback Node-style callback called with the error, if any, and ListAnalysesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listAnalyses = function listAnalyses(request, callback) { + return this.rpcCall(listAnalyses, $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest, $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse, request, callback); + }, "name", { value: "ListAnalyses" }); + + /** + * Calls ListAnalyses. + * @function listAnalyses + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest} request ListAnalysesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteAnalysis}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteAnalysisCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAnalysis. + * @function deleteAnalysis + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest} request DeleteAnalysisRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteAnalysisCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deleteAnalysis = function deleteAnalysis(request, callback) { + return this.rpcCall(deleteAnalysis, $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAnalysis" }); + + /** + * Calls DeleteAnalysis. + * @function deleteAnalysis + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest} request DeleteAnalysisRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|exportInsightsData}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ExportInsightsDataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportInsightsData. + * @function exportInsightsData + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest} request ExportInsightsDataRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportInsightsDataCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.exportInsightsData = function exportInsightsData(request, callback) { + return this.rpcCall(exportInsightsData, $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportInsightsData" }); + + /** + * Calls ExportInsightsData. + * @function exportInsightsData + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest} request ExportInsightsDataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createIssueModel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreateIssueModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateIssueModel. + * @function createIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest} request CreateIssueModelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateIssueModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.createIssueModel = function createIssueModel(request, callback) { + return this.rpcCall(createIssueModel, $root.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateIssueModel" }); + + /** + * Calls CreateIssueModel. + * @function createIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest} request CreateIssueModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateIssueModel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdateIssueModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.IssueModel} [response] IssueModel + */ + + /** + * Calls UpdateIssueModel. + * @function updateIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest} request UpdateIssueModelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssueModelCallback} callback Node-style callback called with the error, if any, and IssueModel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.updateIssueModel = function updateIssueModel(request, callback) { + return this.rpcCall(updateIssueModel, $root.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest, $root.google.cloud.contactcenterinsights.v1.IssueModel, request, callback); + }, "name", { value: "UpdateIssueModel" }); + + /** + * Calls UpdateIssueModel. + * @function updateIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest} request UpdateIssueModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getIssueModel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetIssueModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.IssueModel} [response] IssueModel + */ + + /** + * Calls GetIssueModel. + * @function getIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetIssueModelRequest} request GetIssueModelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssueModelCallback} callback Node-style callback called with the error, if any, and IssueModel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getIssueModel = function getIssueModel(request, callback) { + return this.rpcCall(getIssueModel, $root.google.cloud.contactcenterinsights.v1.GetIssueModelRequest, $root.google.cloud.contactcenterinsights.v1.IssueModel, request, callback); + }, "name", { value: "GetIssueModel" }); + + /** + * Calls GetIssueModel. + * @function getIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetIssueModelRequest} request GetIssueModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listIssueModels}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListIssueModelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListIssueModelsResponse} [response] ListIssueModelsResponse + */ + + /** + * Calls ListIssueModels. + * @function listIssueModels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsRequest} request ListIssueModelsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssueModelsCallback} callback Node-style callback called with the error, if any, and ListIssueModelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listIssueModels = function listIssueModels(request, callback) { + return this.rpcCall(listIssueModels, $root.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest, $root.google.cloud.contactcenterinsights.v1.ListIssueModelsResponse, request, callback); + }, "name", { value: "ListIssueModels" }); + + /** + * Calls ListIssueModels. + * @function listIssueModels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsRequest} request ListIssueModelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteIssueModel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteIssueModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteIssueModel. + * @function deleteIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest} request DeleteIssueModelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssueModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deleteIssueModel = function deleteIssueModel(request, callback) { + return this.rpcCall(deleteIssueModel, $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteIssueModel" }); + + /** + * Calls DeleteIssueModel. + * @function deleteIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest} request DeleteIssueModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deployIssueModel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeployIssueModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeployIssueModel. + * @function deployIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest} request DeployIssueModelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeployIssueModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deployIssueModel = function deployIssueModel(request, callback) { + return this.rpcCall(deployIssueModel, $root.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeployIssueModel" }); + + /** + * Calls DeployIssueModel. + * @function deployIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest} request DeployIssueModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|undeployIssueModel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UndeployIssueModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UndeployIssueModel. + * @function undeployIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest} request UndeployIssueModelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UndeployIssueModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.undeployIssueModel = function undeployIssueModel(request, callback) { + return this.rpcCall(undeployIssueModel, $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UndeployIssueModel" }); + + /** + * Calls UndeployIssueModel. + * @function undeployIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest} request UndeployIssueModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getIssue}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetIssueCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.Issue} [response] Issue + */ + + /** + * Calls GetIssue. + * @function getIssue + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest} request GetIssueRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssueCallback} callback Node-style callback called with the error, if any, and Issue + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getIssue = function getIssue(request, callback) { + return this.rpcCall(getIssue, $root.google.cloud.contactcenterinsights.v1.GetIssueRequest, $root.google.cloud.contactcenterinsights.v1.Issue, request, callback); + }, "name", { value: "GetIssue" }); + + /** + * Calls GetIssue. + * @function getIssue + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest} request GetIssueRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listIssues}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListIssuesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListIssuesResponse} [response] ListIssuesResponse + */ + + /** + * Calls ListIssues. + * @function listIssues + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest} request ListIssuesRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssuesCallback} callback Node-style callback called with the error, if any, and ListIssuesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listIssues = function listIssues(request, callback) { + return this.rpcCall(listIssues, $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest, $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse, request, callback); + }, "name", { value: "ListIssues" }); + + /** + * Calls ListIssues. + * @function listIssues + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest} request ListIssuesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateIssue}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdateIssueCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.Issue} [response] Issue + */ + + /** + * Calls UpdateIssue. + * @function updateIssue + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} request UpdateIssueRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssueCallback} callback Node-style callback called with the error, if any, and Issue + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.updateIssue = function updateIssue(request, callback) { + return this.rpcCall(updateIssue, $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest, $root.google.cloud.contactcenterinsights.v1.Issue, request, callback); + }, "name", { value: "UpdateIssue" }); + + /** + * Calls UpdateIssue. + * @function updateIssue + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} request UpdateIssueRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|calculateIssueModelStats}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CalculateIssueModelStatsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} [response] CalculateIssueModelStatsResponse + */ + + /** + * Calls CalculateIssueModelStats. + * @function calculateIssueModelStats + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest} request CalculateIssueModelStatsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateIssueModelStatsCallback} callback Node-style callback called with the error, if any, and CalculateIssueModelStatsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.calculateIssueModelStats = function calculateIssueModelStats(request, callback) { + return this.rpcCall(calculateIssueModelStats, $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest, $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse, request, callback); + }, "name", { value: "CalculateIssueModelStats" }); + + /** + * Calls CalculateIssueModelStats. + * @function calculateIssueModelStats + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest} request CalculateIssueModelStatsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createPhraseMatcher}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreatePhraseMatcherCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.PhraseMatcher} [response] PhraseMatcher + */ + + /** + * Calls CreatePhraseMatcher. + * @function createPhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest} request CreatePhraseMatcherRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreatePhraseMatcherCallback} callback Node-style callback called with the error, if any, and PhraseMatcher + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.createPhraseMatcher = function createPhraseMatcher(request, callback) { + return this.rpcCall(createPhraseMatcher, $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest, $root.google.cloud.contactcenterinsights.v1.PhraseMatcher, request, callback); + }, "name", { value: "CreatePhraseMatcher" }); + + /** + * Calls CreatePhraseMatcher. + * @function createPhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest} request CreatePhraseMatcherRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getPhraseMatcher}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetPhraseMatcherCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.PhraseMatcher} [response] PhraseMatcher + */ + + /** + * Calls GetPhraseMatcher. + * @function getPhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest} request GetPhraseMatcherRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetPhraseMatcherCallback} callback Node-style callback called with the error, if any, and PhraseMatcher + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getPhraseMatcher = function getPhraseMatcher(request, callback) { + return this.rpcCall(getPhraseMatcher, $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest, $root.google.cloud.contactcenterinsights.v1.PhraseMatcher, request, callback); + }, "name", { value: "GetPhraseMatcher" }); + + /** + * Calls GetPhraseMatcher. + * @function getPhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest} request GetPhraseMatcherRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listPhraseMatchers}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListPhraseMatchersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} [response] ListPhraseMatchersResponse + */ + + /** + * Calls ListPhraseMatchers. + * @function listPhraseMatchers + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest} request ListPhraseMatchersRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListPhraseMatchersCallback} callback Node-style callback called with the error, if any, and ListPhraseMatchersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listPhraseMatchers = function listPhraseMatchers(request, callback) { + return this.rpcCall(listPhraseMatchers, $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest, $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse, request, callback); + }, "name", { value: "ListPhraseMatchers" }); + + /** + * Calls ListPhraseMatchers. + * @function listPhraseMatchers + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest} request ListPhraseMatchersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deletePhraseMatcher}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeletePhraseMatcherCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeletePhraseMatcher. + * @function deletePhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest} request DeletePhraseMatcherRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeletePhraseMatcherCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deletePhraseMatcher = function deletePhraseMatcher(request, callback) { + return this.rpcCall(deletePhraseMatcher, $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePhraseMatcher" }); + + /** + * Calls DeletePhraseMatcher. + * @function deletePhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest} request DeletePhraseMatcherRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updatePhraseMatcher}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdatePhraseMatcherCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.PhraseMatcher} [response] PhraseMatcher + */ + + /** + * Calls UpdatePhraseMatcher. + * @function updatePhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest} request UpdatePhraseMatcherRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdatePhraseMatcherCallback} callback Node-style callback called with the error, if any, and PhraseMatcher + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.updatePhraseMatcher = function updatePhraseMatcher(request, callback) { + return this.rpcCall(updatePhraseMatcher, $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest, $root.google.cloud.contactcenterinsights.v1.PhraseMatcher, request, callback); + }, "name", { value: "UpdatePhraseMatcher" }); + + /** + * Calls UpdatePhraseMatcher. + * @function updatePhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest} request UpdatePhraseMatcherRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|calculateStats}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CalculateStatsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} [response] CalculateStatsResponse + */ + + /** + * Calls CalculateStats. + * @function calculateStats + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest} request CalculateStatsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateStatsCallback} callback Node-style callback called with the error, if any, and CalculateStatsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.calculateStats = function calculateStats(request, callback) { + return this.rpcCall(calculateStats, $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest, $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse, request, callback); + }, "name", { value: "CalculateStats" }); + + /** + * Calls CalculateStats. + * @function calculateStats + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest} request CalculateStatsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getSettings}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.Settings} [response] Settings + */ + + /** + * Calls GetSettings. + * @function getSettings + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest} request GetSettingsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetSettingsCallback} callback Node-style callback called with the error, if any, and Settings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getSettings = function getSettings(request, callback) { + return this.rpcCall(getSettings, $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest, $root.google.cloud.contactcenterinsights.v1.Settings, request, callback); + }, "name", { value: "GetSettings" }); + + /** + * Calls GetSettings. + * @function getSettings + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest} request GetSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateSettings}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdateSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.Settings} [response] Settings + */ + + /** + * Calls UpdateSettings. + * @function updateSettings + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest} request UpdateSettingsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateSettingsCallback} callback Node-style callback called with the error, if any, and Settings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.updateSettings = function updateSettings(request, callback) { + return this.rpcCall(updateSettings, $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest, $root.google.cloud.contactcenterinsights.v1.Settings, request, callback); + }, "name", { value: "UpdateSettings" }); + + /** + * Calls UpdateSettings. + * @function updateSettings + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest} request UpdateSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createView}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreateViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.View} [response] View + */ + + /** + * Calls CreateView. + * @function createView + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest} request CreateViewRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateViewCallback} callback Node-style callback called with the error, if any, and View + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.createView = function createView(request, callback) { + return this.rpcCall(createView, $root.google.cloud.contactcenterinsights.v1.CreateViewRequest, $root.google.cloud.contactcenterinsights.v1.View, request, callback); + }, "name", { value: "CreateView" }); + + /** + * Calls CreateView. + * @function createView + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest} request CreateViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getView}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.View} [response] View + */ + + /** + * Calls GetView. + * @function getView + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest} request GetViewRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetViewCallback} callback Node-style callback called with the error, if any, and View + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getView = function getView(request, callback) { + return this.rpcCall(getView, $root.google.cloud.contactcenterinsights.v1.GetViewRequest, $root.google.cloud.contactcenterinsights.v1.View, request, callback); + }, "name", { value: "GetView" }); + + /** + * Calls GetView. + * @function getView + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest} request GetViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listViews}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListViewsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListViewsResponse} [response] ListViewsResponse + */ + + /** + * Calls ListViews. + * @function listViews + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest} request ListViewsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListViewsCallback} callback Node-style callback called with the error, if any, and ListViewsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listViews = function listViews(request, callback) { + return this.rpcCall(listViews, $root.google.cloud.contactcenterinsights.v1.ListViewsRequest, $root.google.cloud.contactcenterinsights.v1.ListViewsResponse, request, callback); + }, "name", { value: "ListViews" }); + + /** + * Calls ListViews. + * @function listViews + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest} request ListViewsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateView}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdateViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.View} [response] View + */ + + /** + * Calls UpdateView. + * @function updateView + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest} request UpdateViewRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateViewCallback} callback Node-style callback called with the error, if any, and View + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.updateView = function updateView(request, callback) { + return this.rpcCall(updateView, $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest, $root.google.cloud.contactcenterinsights.v1.View, request, callback); + }, "name", { value: "UpdateView" }); + + /** + * Calls UpdateView. + * @function updateView + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest} request UpdateViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteView}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteViewCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteView. + * @function deleteView + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest} request DeleteViewRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteViewCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deleteView = function deleteView(request, callback) { + return this.rpcCall(deleteView, $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteView" }); + + /** + * Calls DeleteView. + * @function deleteView + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest} request DeleteViewRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ContactCenterInsights; + })(); + + /** + * ConversationView enum. + * @name google.cloud.contactcenterinsights.v1.ConversationView + * @enum {number} + * @property {number} CONVERSATION_VIEW_UNSPECIFIED=0 CONVERSATION_VIEW_UNSPECIFIED value + * @property {number} FULL=2 FULL value + * @property {number} BASIC=1 BASIC value + */ + v1.ConversationView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONVERSATION_VIEW_UNSPECIFIED"] = 0; + values[valuesById[2] = "FULL"] = 2; + values[valuesById[1] = "BASIC"] = 1; + return values; + })(); + + v1.CalculateStatsRequest = (function() { + + /** + * Properties of a CalculateStatsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICalculateStatsRequest + * @property {string|null} [location] CalculateStatsRequest location + * @property {string|null} [filter] CalculateStatsRequest filter + */ + + /** + * Constructs a new CalculateStatsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CalculateStatsRequest. + * @implements ICalculateStatsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest=} [properties] Properties to set + */ + function CalculateStatsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateStatsRequest location. + * @member {string} location + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @instance + */ + CalculateStatsRequest.prototype.location = ""; + + /** + * CalculateStatsRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @instance + */ + CalculateStatsRequest.prototype.filter = ""; + + /** + * Creates a new CalculateStatsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest instance + */ + CalculateStatsRequest.create = function create(properties) { + return new CalculateStatsRequest(properties); + }; + + /** + * Encodes the specified CalculateStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest} message CalculateStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateStatsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + return writer; + }; + + /** + * Encodes the specified CalculateStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest} message CalculateStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CalculateStatsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateStatsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CalculateStatsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateStatsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CalculateStatsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CalculateStatsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a CalculateStatsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest + */ + CalculateStatsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest(); + if (object.location != null) + message.location = String(object.location); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a CalculateStatsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} message CalculateStatsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CalculateStatsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = ""; + object.filter = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this CalculateStatsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @instance + * @returns {Object.} JSON object + */ + CalculateStatsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CalculateStatsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CalculateStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateStatsRequest"; + }; + + return CalculateStatsRequest; + })(); + + v1.CalculateStatsResponse = (function() { + + /** + * Properties of a CalculateStatsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICalculateStatsResponse + * @property {google.protobuf.IDuration|null} [averageDuration] CalculateStatsResponse averageDuration + * @property {number|null} [averageTurnCount] CalculateStatsResponse averageTurnCount + * @property {number|null} [conversationCount] CalculateStatsResponse conversationCount + * @property {Object.|null} [smartHighlighterMatches] CalculateStatsResponse smartHighlighterMatches + * @property {Object.|null} [customHighlighterMatches] CalculateStatsResponse customHighlighterMatches + * @property {Object.|null} [issueMatches] CalculateStatsResponse issueMatches + * @property {Object.|null} [issueMatchesStats] CalculateStatsResponse issueMatchesStats + * @property {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries|null} [conversationCountTimeSeries] CalculateStatsResponse conversationCountTimeSeries + */ + + /** + * Constructs a new CalculateStatsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CalculateStatsResponse. + * @implements ICalculateStatsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse=} [properties] Properties to set + */ + function CalculateStatsResponse(properties) { + this.smartHighlighterMatches = {}; + this.customHighlighterMatches = {}; + this.issueMatches = {}; + this.issueMatchesStats = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateStatsResponse averageDuration. + * @member {google.protobuf.IDuration|null|undefined} averageDuration + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.averageDuration = null; + + /** + * CalculateStatsResponse averageTurnCount. + * @member {number} averageTurnCount + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.averageTurnCount = 0; + + /** + * CalculateStatsResponse conversationCount. + * @member {number} conversationCount + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.conversationCount = 0; + + /** + * CalculateStatsResponse smartHighlighterMatches. + * @member {Object.} smartHighlighterMatches + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.smartHighlighterMatches = $util.emptyObject; + + /** + * CalculateStatsResponse customHighlighterMatches. + * @member {Object.} customHighlighterMatches + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.customHighlighterMatches = $util.emptyObject; + + /** + * CalculateStatsResponse issueMatches. + * @member {Object.} issueMatches + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.issueMatches = $util.emptyObject; + + /** + * CalculateStatsResponse issueMatchesStats. + * @member {Object.} issueMatchesStats + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.issueMatchesStats = $util.emptyObject; + + /** + * CalculateStatsResponse conversationCountTimeSeries. + * @member {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries|null|undefined} conversationCountTimeSeries + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.conversationCountTimeSeries = null; + + /** + * Creates a new CalculateStatsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} CalculateStatsResponse instance + */ + CalculateStatsResponse.create = function create(properties) { + return new CalculateStatsResponse(properties); + }; + + /** + * Encodes the specified CalculateStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse} message CalculateStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateStatsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.averageDuration != null && Object.hasOwnProperty.call(message, "averageDuration")) + $root.google.protobuf.Duration.encode(message.averageDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.averageTurnCount != null && Object.hasOwnProperty.call(message, "averageTurnCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.averageTurnCount); + if (message.conversationCount != null && Object.hasOwnProperty.call(message, "conversationCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.conversationCount); + if (message.smartHighlighterMatches != null && Object.hasOwnProperty.call(message, "smartHighlighterMatches")) + for (var keys = Object.keys(message.smartHighlighterMatches), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.smartHighlighterMatches[keys[i]]).ldelim(); + if (message.customHighlighterMatches != null && Object.hasOwnProperty.call(message, "customHighlighterMatches")) + for (var keys = Object.keys(message.customHighlighterMatches), 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 0 =*/16).int32(message.customHighlighterMatches[keys[i]]).ldelim(); + if (message.issueMatches != null && Object.hasOwnProperty.call(message, "issueMatches")) + for (var keys = Object.keys(message.issueMatches), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.issueMatches[keys[i]]).ldelim(); + if (message.conversationCountTimeSeries != null && Object.hasOwnProperty.call(message, "conversationCountTimeSeries")) + $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.encode(message.conversationCountTimeSeries, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.issueMatchesStats != null && Object.hasOwnProperty.call(message, "issueMatchesStats")) + for (var keys = Object.keys(message.issueMatchesStats), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.encode(message.issueMatchesStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CalculateStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse} message CalculateStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CalculateStatsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} CalculateStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateStatsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.averageDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.averageTurnCount = reader.int32(); + break; + } + case 3: { + message.conversationCount = reader.int32(); + break; + } + case 4: { + if (message.smartHighlighterMatches === $util.emptyObject) + message.smartHighlighterMatches = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.smartHighlighterMatches[key] = value; + break; + } + case 5: { + if (message.customHighlighterMatches === $util.emptyObject) + message.customHighlighterMatches = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.customHighlighterMatches[key] = value; + break; + } + case 6: { + if (message.issueMatches === $util.emptyObject) + message.issueMatches = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.issueMatches[key] = value; + break; + } + case 8: { + if (message.issueMatchesStats === $util.emptyObject) + message.issueMatchesStats = {}; + 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.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.issueMatchesStats[key] = value; + break; + } + case 7: { + message.conversationCountTimeSeries = $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CalculateStatsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} CalculateStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateStatsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CalculateStatsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CalculateStatsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.averageDuration != null && message.hasOwnProperty("averageDuration")) { + var error = $root.google.protobuf.Duration.verify(message.averageDuration); + if (error) + return "averageDuration." + error; + } + if (message.averageTurnCount != null && message.hasOwnProperty("averageTurnCount")) + if (!$util.isInteger(message.averageTurnCount)) + return "averageTurnCount: integer expected"; + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) + if (!$util.isInteger(message.conversationCount)) + return "conversationCount: integer expected"; + if (message.smartHighlighterMatches != null && message.hasOwnProperty("smartHighlighterMatches")) { + if (!$util.isObject(message.smartHighlighterMatches)) + return "smartHighlighterMatches: object expected"; + var key = Object.keys(message.smartHighlighterMatches); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.smartHighlighterMatches[key[i]])) + return "smartHighlighterMatches: integer{k:string} expected"; + } + if (message.customHighlighterMatches != null && message.hasOwnProperty("customHighlighterMatches")) { + if (!$util.isObject(message.customHighlighterMatches)) + return "customHighlighterMatches: object expected"; + var key = Object.keys(message.customHighlighterMatches); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.customHighlighterMatches[key[i]])) + return "customHighlighterMatches: integer{k:string} expected"; + } + if (message.issueMatches != null && message.hasOwnProperty("issueMatches")) { + if (!$util.isObject(message.issueMatches)) + return "issueMatches: object expected"; + var key = Object.keys(message.issueMatches); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.issueMatches[key[i]])) + return "issueMatches: integer{k:string} expected"; + } + if (message.issueMatchesStats != null && message.hasOwnProperty("issueMatchesStats")) { + if (!$util.isObject(message.issueMatchesStats)) + return "issueMatchesStats: object expected"; + var key = Object.keys(message.issueMatchesStats); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify(message.issueMatchesStats[key[i]]); + if (error) + return "issueMatchesStats." + error; + } + } + if (message.conversationCountTimeSeries != null && message.hasOwnProperty("conversationCountTimeSeries")) { + var error = $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.verify(message.conversationCountTimeSeries); + if (error) + return "conversationCountTimeSeries." + error; + } + return null; + }; + + /** + * Creates a CalculateStatsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} CalculateStatsResponse + */ + CalculateStatsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse(); + if (object.averageDuration != null) { + if (typeof object.averageDuration !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.averageDuration: object expected"); + message.averageDuration = $root.google.protobuf.Duration.fromObject(object.averageDuration); + } + if (object.averageTurnCount != null) + message.averageTurnCount = object.averageTurnCount | 0; + if (object.conversationCount != null) + message.conversationCount = object.conversationCount | 0; + if (object.smartHighlighterMatches) { + if (typeof object.smartHighlighterMatches !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.smartHighlighterMatches: object expected"); + message.smartHighlighterMatches = {}; + for (var keys = Object.keys(object.smartHighlighterMatches), i = 0; i < keys.length; ++i) + message.smartHighlighterMatches[keys[i]] = object.smartHighlighterMatches[keys[i]] | 0; + } + if (object.customHighlighterMatches) { + if (typeof object.customHighlighterMatches !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.customHighlighterMatches: object expected"); + message.customHighlighterMatches = {}; + for (var keys = Object.keys(object.customHighlighterMatches), i = 0; i < keys.length; ++i) + message.customHighlighterMatches[keys[i]] = object.customHighlighterMatches[keys[i]] | 0; + } + if (object.issueMatches) { + if (typeof object.issueMatches !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.issueMatches: object expected"); + message.issueMatches = {}; + for (var keys = Object.keys(object.issueMatches), i = 0; i < keys.length; ++i) + message.issueMatches[keys[i]] = object.issueMatches[keys[i]] | 0; + } + if (object.issueMatchesStats) { + if (typeof object.issueMatchesStats !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.issueMatchesStats: object expected"); + message.issueMatchesStats = {}; + for (var keys = Object.keys(object.issueMatchesStats), i = 0; i < keys.length; ++i) { + if (typeof object.issueMatchesStats[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.issueMatchesStats: object expected"); + message.issueMatchesStats[keys[i]] = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.fromObject(object.issueMatchesStats[keys[i]]); + } + } + if (object.conversationCountTimeSeries != null) { + if (typeof object.conversationCountTimeSeries !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.conversationCountTimeSeries: object expected"); + message.conversationCountTimeSeries = $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.fromObject(object.conversationCountTimeSeries); + } + return message; + }; + + /** + * Creates a plain object from a CalculateStatsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} message CalculateStatsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CalculateStatsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.smartHighlighterMatches = {}; + object.customHighlighterMatches = {}; + object.issueMatches = {}; + object.issueMatchesStats = {}; + } + if (options.defaults) { + object.averageDuration = null; + object.averageTurnCount = 0; + object.conversationCount = 0; + object.conversationCountTimeSeries = null; + } + if (message.averageDuration != null && message.hasOwnProperty("averageDuration")) + object.averageDuration = $root.google.protobuf.Duration.toObject(message.averageDuration, options); + if (message.averageTurnCount != null && message.hasOwnProperty("averageTurnCount")) + object.averageTurnCount = message.averageTurnCount; + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) + object.conversationCount = message.conversationCount; + var keys2; + if (message.smartHighlighterMatches && (keys2 = Object.keys(message.smartHighlighterMatches)).length) { + object.smartHighlighterMatches = {}; + for (var j = 0; j < keys2.length; ++j) + object.smartHighlighterMatches[keys2[j]] = message.smartHighlighterMatches[keys2[j]]; + } + if (message.customHighlighterMatches && (keys2 = Object.keys(message.customHighlighterMatches)).length) { + object.customHighlighterMatches = {}; + for (var j = 0; j < keys2.length; ++j) + object.customHighlighterMatches[keys2[j]] = message.customHighlighterMatches[keys2[j]]; + } + if (message.issueMatches && (keys2 = Object.keys(message.issueMatches)).length) { + object.issueMatches = {}; + for (var j = 0; j < keys2.length; ++j) + object.issueMatches[keys2[j]] = message.issueMatches[keys2[j]]; + } + if (message.conversationCountTimeSeries != null && message.hasOwnProperty("conversationCountTimeSeries")) + object.conversationCountTimeSeries = $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.toObject(message.conversationCountTimeSeries, options); + if (message.issueMatchesStats && (keys2 = Object.keys(message.issueMatchesStats)).length) { + object.issueMatchesStats = {}; + for (var j = 0; j < keys2.length; ++j) + object.issueMatchesStats[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.toObject(message.issueMatchesStats[keys2[j]], options); + } + return object; + }; + + /** + * Converts this CalculateStatsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + * @returns {Object.} JSON object + */ + CalculateStatsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CalculateStatsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CalculateStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateStatsResponse"; + }; + + CalculateStatsResponse.TimeSeries = (function() { + + /** + * Properties of a TimeSeries. + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @interface ITimeSeries + * @property {google.protobuf.IDuration|null} [intervalDuration] TimeSeries intervalDuration + * @property {Array.|null} [points] TimeSeries points + */ + + /** + * Constructs a new TimeSeries. + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @classdesc Represents a TimeSeries. + * @implements ITimeSeries + * @constructor + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries=} [properties] Properties to set + */ + function TimeSeries(properties) { + this.points = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeries intervalDuration. + * @member {google.protobuf.IDuration|null|undefined} intervalDuration + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @instance + */ + TimeSeries.prototype.intervalDuration = null; + + /** + * TimeSeries points. + * @member {Array.} points + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @instance + */ + TimeSeries.prototype.points = $util.emptyArray; + + /** + * Creates a new TimeSeries instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries} TimeSeries instance + */ + TimeSeries.create = function create(properties) { + return new TimeSeries(properties); + }; + + /** + * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries} message TimeSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeries.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.intervalDuration != null && Object.hasOwnProperty.call(message, "intervalDuration")) + $root.google.protobuf.Duration.encode(message.intervalDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.points != null && message.points.length) + for (var i = 0; i < message.points.length; ++i) + $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.encode(message.points[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries} message TimeSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries} TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeries.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.intervalDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.points && message.points.length)) + message.points = []; + message.points.push($root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries} TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeries.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeries message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeries.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.intervalDuration != null && message.hasOwnProperty("intervalDuration")) { + var error = $root.google.protobuf.Duration.verify(message.intervalDuration); + if (error) + return "intervalDuration." + error; + } + if (message.points != null && message.hasOwnProperty("points")) { + if (!Array.isArray(message.points)) + return "points: array expected"; + for (var i = 0; i < message.points.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.verify(message.points[i]); + if (error) + return "points." + error; + } + } + return null; + }; + + /** + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries} TimeSeries + */ + TimeSeries.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries(); + if (object.intervalDuration != null) { + if (typeof object.intervalDuration !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.intervalDuration: object expected"); + message.intervalDuration = $root.google.protobuf.Duration.fromObject(object.intervalDuration); + } + if (object.points) { + if (!Array.isArray(object.points)) + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.points: array expected"); + message.points = []; + for (var i = 0; i < object.points.length; ++i) { + if (typeof object.points[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.points: object expected"); + message.points[i] = $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.fromObject(object.points[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries} message TimeSeries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeries.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.points = []; + if (options.defaults) + object.intervalDuration = null; + if (message.intervalDuration != null && message.hasOwnProperty("intervalDuration")) + object.intervalDuration = $root.google.protobuf.Duration.toObject(message.intervalDuration, options); + if (message.points && message.points.length) { + object.points = []; + for (var j = 0; j < message.points.length; ++j) + object.points[j] = $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.toObject(message.points[j], options); + } + return object; + }; + + /** + * Converts this TimeSeries to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @instance + * @returns {Object.} JSON object + */ + TimeSeries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeSeries + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries"; + }; + + TimeSeries.Interval = (function() { + + /** + * Properties of an Interval. + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @interface IInterval + * @property {google.protobuf.ITimestamp|null} [startTime] Interval startTime + * @property {number|null} [conversationCount] Interval conversationCount + */ + + /** + * Constructs a new Interval. + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries + * @classdesc Represents an Interval. + * @implements IInterval + * @constructor + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval=} [properties] Properties to set + */ + function Interval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Interval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @instance + */ + Interval.prototype.startTime = null; + + /** + * Interval conversationCount. + * @member {number} conversationCount + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @instance + */ + Interval.prototype.conversationCount = 0; + + /** + * Creates a new Interval instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval} Interval instance + */ + Interval.create = function create(properties) { + return new Interval(properties); + }; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.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.conversationCount != null && Object.hasOwnProperty.call(message, "conversationCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.conversationCount); + return writer; + }; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.conversationCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interval message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) + if (!$util.isInteger(message.conversationCount)) + return "conversationCount: integer expected"; + return null; + }; + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval} Interval + */ + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.conversationCount != null) + message.conversationCount = object.conversationCount | 0; + return message; + }; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval} message Interval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.conversationCount = 0; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) + object.conversationCount = message.conversationCount; + return object; + }; + + /** + * Converts this Interval to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @instance + * @returns {Object.} JSON object + */ + Interval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interval + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval"; + }; + + return Interval; + })(); + + return TimeSeries; + })(); + + return CalculateStatsResponse; + })(); + + v1.CreateAnalysisOperationMetadata = (function() { + + /** + * Properties of a CreateAnalysisOperationMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateAnalysisOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] CreateAnalysisOperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] CreateAnalysisOperationMetadata endTime + * @property {string|null} [conversation] CreateAnalysisOperationMetadata conversation + */ + + /** + * Constructs a new CreateAnalysisOperationMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateAnalysisOperationMetadata. + * @implements ICreateAnalysisOperationMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata=} [properties] Properties to set + */ + function CreateAnalysisOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAnalysisOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @instance + */ + CreateAnalysisOperationMetadata.prototype.createTime = null; + + /** + * CreateAnalysisOperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @instance + */ + CreateAnalysisOperationMetadata.prototype.endTime = null; + + /** + * CreateAnalysisOperationMetadata conversation. + * @member {string} conversation + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @instance + */ + CreateAnalysisOperationMetadata.prototype.conversation = ""; + + /** + * Creates a new CreateAnalysisOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata} CreateAnalysisOperationMetadata instance + */ + CreateAnalysisOperationMetadata.create = function create(properties) { + return new CreateAnalysisOperationMetadata(properties); + }; + + /** + * Encodes the specified CreateAnalysisOperationMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata} message CreateAnalysisOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAnalysisOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, 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.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.conversation); + return writer; + }; + + /** + * Encodes the specified CreateAnalysisOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata} message CreateAnalysisOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAnalysisOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAnalysisOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata} CreateAnalysisOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAnalysisOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.conversation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAnalysisOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata} CreateAnalysisOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAnalysisOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAnalysisOperationMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAnalysisOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: string expected"; + return null; + }; + + /** + * Creates a CreateAnalysisOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata} CreateAnalysisOperationMetadata + */ + CreateAnalysisOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.conversation != null) + message.conversation = String(object.conversation); + return message; + }; + + /** + * Creates a plain object from a CreateAnalysisOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata} message CreateAnalysisOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAnalysisOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.conversation = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + return object; + }; + + /** + * Converts this CreateAnalysisOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateAnalysisOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAnalysisOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAnalysisOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata"; + }; + + return CreateAnalysisOperationMetadata; + })(); + + v1.CreateConversationRequest = (function() { + + /** + * Properties of a CreateConversationRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateConversationRequest + * @property {string|null} [parent] CreateConversationRequest parent + * @property {google.cloud.contactcenterinsights.v1.IConversation|null} [conversation] CreateConversationRequest conversation + * @property {string|null} [conversationId] CreateConversationRequest conversationId + */ + + /** + * Constructs a new CreateConversationRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateConversationRequest. + * @implements ICreateConversationRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateConversationRequest=} [properties] Properties to set + */ + function CreateConversationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConversationRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.parent = ""; + + /** + * CreateConversationRequest conversation. + * @member {google.cloud.contactcenterinsights.v1.IConversation|null|undefined} conversation + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.conversation = null; + + /** + * CreateConversationRequest conversationId. + * @member {string} conversationId + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @instance + */ + CreateConversationRequest.prototype.conversationId = ""; + + /** + * Creates a new CreateConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateConversationRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateConversationRequest} CreateConversationRequest instance + */ + CreateConversationRequest.create = function create(properties) { + return new CreateConversationRequest(properties); + }; + + /** + * Encodes the specified CreateConversationRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversationRequest.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.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + $root.google.cloud.contactcenterinsights.v1.Conversation.encode(message.conversation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.conversationId != null && Object.hasOwnProperty.call(message, "conversationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.conversationId); + return writer; + }; + + /** + * Encodes the specified CreateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateConversationRequest} message CreateConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateConversationRequest} CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateConversationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.conversation = $root.google.cloud.contactcenterinsights.v1.Conversation.decode(reader, reader.uint32()); + break; + } + case 3: { + message.conversationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateConversationRequest} CreateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConversationRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConversationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.conversation != null && message.hasOwnProperty("conversation")) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.verify(message.conversation); + if (error) + return "conversation." + error; + } + if (message.conversationId != null && message.hasOwnProperty("conversationId")) + if (!$util.isString(message.conversationId)) + return "conversationId: string expected"; + return null; + }; + + /** + * Creates a CreateConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateConversationRequest} CreateConversationRequest + */ + CreateConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateConversationRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateConversationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.conversation != null) { + if (typeof object.conversation !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateConversationRequest.conversation: object expected"); + message.conversation = $root.google.cloud.contactcenterinsights.v1.Conversation.fromObject(object.conversation); + } + if (object.conversationId != null) + message.conversationId = String(object.conversationId); + return message; + }; + + /** + * Creates a plain object from a CreateConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateConversationRequest} message CreateConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConversationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.conversation = null; + object.conversationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = $root.google.cloud.contactcenterinsights.v1.Conversation.toObject(message.conversation, options); + if (message.conversationId != null && message.hasOwnProperty("conversationId")) + object.conversationId = message.conversationId; + return object; + }; + + /** + * Converts this CreateConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConversationRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateConversationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConversationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateConversationRequest"; + }; + + return CreateConversationRequest; + })(); + + v1.ListConversationsRequest = (function() { + + /** + * Properties of a ListConversationsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListConversationsRequest + * @property {string|null} [parent] ListConversationsRequest parent + * @property {number|null} [pageSize] ListConversationsRequest pageSize + * @property {string|null} [pageToken] ListConversationsRequest pageToken + * @property {string|null} [filter] ListConversationsRequest filter + * @property {google.cloud.contactcenterinsights.v1.ConversationView|null} [view] ListConversationsRequest view + */ + + /** + * Constructs a new ListConversationsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListConversationsRequest. + * @implements IListConversationsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListConversationsRequest=} [properties] Properties to set + */ + function ListConversationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversationsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.parent = ""; + + /** + * ListConversationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.pageSize = 0; + + /** + * ListConversationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.pageToken = ""; + + /** + * ListConversationsRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.filter = ""; + + /** + * ListConversationsRequest view. + * @member {google.cloud.contactcenterinsights.v1.ConversationView} view + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.view = 0; + + /** + * Creates a new ListConversationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListConversationsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListConversationsRequest} ListConversationsRequest instance + */ + ListConversationsRequest.create = function create(properties) { + return new ListConversationsRequest(properties); + }; + + /** + * Encodes the specified ListConversationsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListConversationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListConversationsRequest} message ListConversationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListConversationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListConversationsRequest} message ListConversationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListConversationsRequest} ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListConversationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + } + case 5: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListConversationsRequest} ListConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversationsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 2: + case 1: + break; + } + return null; + }; + + /** + * Creates a ListConversationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListConversationsRequest} ListConversationsRequest + */ + ListConversationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListConversationsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListConversationsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "CONVERSATION_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "FULL": + case 2: + message.view = 2; + break; + case "BASIC": + case 1: + message.view = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListConversationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListConversationsRequest} message ListConversationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.view = options.enums === String ? "CONVERSATION_VIEW_UNSPECIFIED" : 0; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ConversationView[message.view] === undefined ? message.view : $root.google.cloud.contactcenterinsights.v1.ConversationView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListConversationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConversationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversationsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListConversationsRequest"; + }; + + return ListConversationsRequest; + })(); + + v1.ListConversationsResponse = (function() { + + /** + * Properties of a ListConversationsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListConversationsResponse + * @property {Array.|null} [conversations] ListConversationsResponse conversations + * @property {string|null} [nextPageToken] ListConversationsResponse nextPageToken + */ + + /** + * Constructs a new ListConversationsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListConversationsResponse. + * @implements IListConversationsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListConversationsResponse=} [properties] Properties to set + */ + function ListConversationsResponse(properties) { + this.conversations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversationsResponse conversations. + * @member {Array.} conversations + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @instance + */ + ListConversationsResponse.prototype.conversations = $util.emptyArray; + + /** + * ListConversationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @instance + */ + ListConversationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConversationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListConversationsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListConversationsResponse} ListConversationsResponse instance + */ + ListConversationsResponse.create = function create(properties) { + return new ListConversationsResponse(properties); + }; + + /** + * Encodes the specified ListConversationsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListConversationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListConversationsResponse} message ListConversationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversations != null && message.conversations.length) + for (var i = 0; i < message.conversations.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Conversation.encode(message.conversations[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 ListConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListConversationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListConversationsResponse} message ListConversationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListConversationsResponse} ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListConversationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.conversations && message.conversations.length)) + message.conversations = []; + message.conversations.push($root.google.cloud.contactcenterinsights.v1.Conversation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListConversationsResponse} ListConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversationsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversations != null && message.hasOwnProperty("conversations")) { + if (!Array.isArray(message.conversations)) + return "conversations: array expected"; + for (var i = 0; i < message.conversations.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.verify(message.conversations[i]); + if (error) + return "conversations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListConversationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListConversationsResponse} ListConversationsResponse + */ + ListConversationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListConversationsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListConversationsResponse(); + if (object.conversations) { + if (!Array.isArray(object.conversations)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListConversationsResponse.conversations: array expected"); + message.conversations = []; + for (var i = 0; i < object.conversations.length; ++i) { + if (typeof object.conversations[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListConversationsResponse.conversations: object expected"); + message.conversations[i] = $root.google.cloud.contactcenterinsights.v1.Conversation.fromObject(object.conversations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListConversationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListConversationsResponse} message ListConversationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conversations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.conversations && message.conversations.length) { + object.conversations = []; + for (var j = 0; j < message.conversations.length; ++j) + object.conversations[j] = $root.google.cloud.contactcenterinsights.v1.Conversation.toObject(message.conversations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListConversationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConversationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversationsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListConversationsResponse"; + }; + + return ListConversationsResponse; + })(); + + v1.GetConversationRequest = (function() { + + /** + * Properties of a GetConversationRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetConversationRequest + * @property {string|null} [name] GetConversationRequest name + * @property {google.cloud.contactcenterinsights.v1.ConversationView|null} [view] GetConversationRequest view + */ + + /** + * Constructs a new GetConversationRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetConversationRequest. + * @implements IGetConversationRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetConversationRequest=} [properties] Properties to set + */ + function GetConversationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConversationRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @instance + */ + GetConversationRequest.prototype.name = ""; + + /** + * GetConversationRequest view. + * @member {google.cloud.contactcenterinsights.v1.ConversationView} view + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @instance + */ + GetConversationRequest.prototype.view = 0; + + /** + * Creates a new GetConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetConversationRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetConversationRequest} GetConversationRequest instance + */ + GetConversationRequest.create = function create(properties) { + return new GetConversationRequest(properties); + }; + + /** + * Encodes the specified GetConversationRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetConversationRequest} message GetConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetConversationRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetConversationRequest} message GetConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetConversationRequest} GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetConversationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetConversationRequest} GetConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConversationRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConversationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 2: + case 1: + break; + } + return null; + }; + + /** + * Creates a GetConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetConversationRequest} GetConversationRequest + */ + GetConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetConversationRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetConversationRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "CONVERSATION_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "FULL": + case 2: + message.view = 2; + break; + case "BASIC": + case 1: + message.view = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetConversationRequest} message GetConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConversationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "CONVERSATION_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ConversationView[message.view] === undefined ? message.view : $root.google.cloud.contactcenterinsights.v1.ConversationView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @instance + * @returns {Object.} JSON object + */ + GetConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConversationRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetConversationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConversationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetConversationRequest"; + }; + + return GetConversationRequest; + })(); + + v1.UpdateConversationRequest = (function() { + + /** + * Properties of an UpdateConversationRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateConversationRequest + * @property {google.cloud.contactcenterinsights.v1.IConversation|null} [conversation] UpdateConversationRequest conversation + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConversationRequest updateMask + */ + + /** + * Constructs a new UpdateConversationRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateConversationRequest. + * @implements IUpdateConversationRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateConversationRequest=} [properties] Properties to set + */ + function UpdateConversationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConversationRequest conversation. + * @member {google.cloud.contactcenterinsights.v1.IConversation|null|undefined} conversation + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @instance + */ + UpdateConversationRequest.prototype.conversation = null; + + /** + * UpdateConversationRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @instance + */ + UpdateConversationRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateConversationRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateConversationRequest} UpdateConversationRequest instance + */ + UpdateConversationRequest.create = function create(properties) { + return new UpdateConversationRequest(properties); + }; + + /** + * Encodes the specified UpdateConversationRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateConversationRequest} message UpdateConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConversationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + $root.google.cloud.contactcenterinsights.v1.Conversation.encode(message.conversation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateConversationRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateConversationRequest} message UpdateConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateConversationRequest} UpdateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConversationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateConversationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversation = $root.google.cloud.contactcenterinsights.v1.Conversation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateConversationRequest} UpdateConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConversationRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConversationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversation != null && message.hasOwnProperty("conversation")) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.verify(message.conversation); + if (error) + return "conversation." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateConversationRequest} UpdateConversationRequest + */ + UpdateConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateConversationRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateConversationRequest(); + if (object.conversation != null) { + if (typeof object.conversation !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateConversationRequest.conversation: object expected"); + message.conversation = $root.google.cloud.contactcenterinsights.v1.Conversation.fromObject(object.conversation); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateConversationRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateConversationRequest} message UpdateConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConversationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversation = null; + object.updateMask = null; + } + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = $root.google.cloud.contactcenterinsights.v1.Conversation.toObject(message.conversation, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConversationRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateConversationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConversationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateConversationRequest"; + }; + + return UpdateConversationRequest; + })(); + + v1.DeleteConversationRequest = (function() { + + /** + * Properties of a DeleteConversationRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteConversationRequest + * @property {string|null} [name] DeleteConversationRequest name + * @property {boolean|null} [force] DeleteConversationRequest force + */ + + /** + * Constructs a new DeleteConversationRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteConversationRequest. + * @implements IDeleteConversationRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteConversationRequest=} [properties] Properties to set + */ + function DeleteConversationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConversationRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @instance + */ + DeleteConversationRequest.prototype.name = ""; + + /** + * DeleteConversationRequest force. + * @member {boolean} force + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @instance + */ + DeleteConversationRequest.prototype.force = false; + + /** + * Creates a new DeleteConversationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteConversationRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteConversationRequest} DeleteConversationRequest instance + */ + DeleteConversationRequest.create = function create(properties) { + return new DeleteConversationRequest(properties); + }; + + /** + * Encodes the specified DeleteConversationRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteConversationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteConversationRequest} message DeleteConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversationRequest.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.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteConversationRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteConversationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteConversationRequest} message DeleteConversationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConversationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteConversationRequest} DeleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteConversationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConversationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteConversationRequest} DeleteConversationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConversationRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConversationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteConversationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteConversationRequest} DeleteConversationRequest + */ + DeleteConversationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteConversationRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteConversationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteConversationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteConversationRequest} message DeleteConversationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConversationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteConversationRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConversationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConversationRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteConversationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConversationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteConversationRequest"; + }; + + return DeleteConversationRequest; + })(); + + v1.CreateAnalysisRequest = (function() { + + /** + * Properties of a CreateAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateAnalysisRequest + * @property {string|null} [parent] CreateAnalysisRequest parent + * @property {google.cloud.contactcenterinsights.v1.IAnalysis|null} [analysis] CreateAnalysisRequest analysis + */ + + /** + * Constructs a new CreateAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateAnalysisRequest. + * @implements ICreateAnalysisRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest=} [properties] Properties to set + */ + function CreateAnalysisRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAnalysisRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @instance + */ + CreateAnalysisRequest.prototype.parent = ""; + + /** + * CreateAnalysisRequest analysis. + * @member {google.cloud.contactcenterinsights.v1.IAnalysis|null|undefined} analysis + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @instance + */ + CreateAnalysisRequest.prototype.analysis = null; + + /** + * Creates a new CreateAnalysisRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest instance + */ + CreateAnalysisRequest.create = function create(properties) { + return new CreateAnalysisRequest(properties); + }; + + /** + * Encodes the specified CreateAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest} message CreateAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAnalysisRequest.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.analysis != null && Object.hasOwnProperty.call(message, "analysis")) + $root.google.cloud.contactcenterinsights.v1.Analysis.encode(message.analysis, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest} message CreateAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAnalysisRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAnalysisRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAnalysisRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.analysis = $root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAnalysisRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAnalysisRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAnalysisRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAnalysisRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.analysis != null && message.hasOwnProperty("analysis")) { + var error = $root.google.cloud.contactcenterinsights.v1.Analysis.verify(message.analysis); + if (error) + return "analysis." + error; + } + return null; + }; + + /** + * Creates a CreateAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest + */ + CreateAnalysisRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.analysis != null) { + if (typeof object.analysis !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.analysis: object expected"); + message.analysis = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.analysis); + } + return message; + }; + + /** + * Creates a plain object from a CreateAnalysisRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} message CreateAnalysisRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAnalysisRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.analysis = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.analysis != null && message.hasOwnProperty("analysis")) + object.analysis = $root.google.cloud.contactcenterinsights.v1.Analysis.toObject(message.analysis, options); + return object; + }; + + /** + * Converts this CreateAnalysisRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAnalysisRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAnalysisRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAnalysisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateAnalysisRequest"; + }; + + return CreateAnalysisRequest; + })(); + + v1.ListAnalysesRequest = (function() { + + /** + * Properties of a ListAnalysesRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListAnalysesRequest + * @property {string|null} [parent] ListAnalysesRequest parent + * @property {number|null} [pageSize] ListAnalysesRequest pageSize + * @property {string|null} [pageToken] ListAnalysesRequest pageToken + * @property {string|null} [filter] ListAnalysesRequest filter + */ + + /** + * Constructs a new ListAnalysesRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListAnalysesRequest. + * @implements IListAnalysesRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest=} [properties] Properties to set + */ + function ListAnalysesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAnalysesRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + */ + ListAnalysesRequest.prototype.parent = ""; + + /** + * ListAnalysesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + */ + ListAnalysesRequest.prototype.pageSize = 0; + + /** + * ListAnalysesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + */ + ListAnalysesRequest.prototype.pageToken = ""; + + /** + * ListAnalysesRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + */ + ListAnalysesRequest.prototype.filter = ""; + + /** + * Creates a new ListAnalysesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest instance + */ + ListAnalysesRequest.create = function create(properties) { + return new ListAnalysesRequest(properties); + }; + + /** + * Encodes the specified ListAnalysesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest} message ListAnalysesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalysesRequest.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 ListAnalysesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest} message ListAnalysesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalysesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAnalysesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalysesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + break; + } + } + return message; + }; + + /** + * Decodes a ListAnalysesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalysesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAnalysesRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAnalysesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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 ListAnalysesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest + */ + ListAnalysesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest(); + 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 ListAnalysesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} message ListAnalysesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAnalysesRequest.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 ListAnalysesRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + * @returns {Object.} JSON object + */ + ListAnalysesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAnalysesRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAnalysesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAnalysesRequest"; + }; + + return ListAnalysesRequest; + })(); + + v1.ListAnalysesResponse = (function() { + + /** + * Properties of a ListAnalysesResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListAnalysesResponse + * @property {Array.|null} [analyses] ListAnalysesResponse analyses + * @property {string|null} [nextPageToken] ListAnalysesResponse nextPageToken + */ + + /** + * Constructs a new ListAnalysesResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListAnalysesResponse. + * @implements IListAnalysesResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse=} [properties] Properties to set + */ + function ListAnalysesResponse(properties) { + this.analyses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAnalysesResponse analyses. + * @member {Array.} analyses + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @instance + */ + ListAnalysesResponse.prototype.analyses = $util.emptyArray; + + /** + * ListAnalysesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @instance + */ + ListAnalysesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAnalysesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse instance + */ + ListAnalysesResponse.create = function create(properties) { + return new ListAnalysesResponse(properties); + }; + + /** + * Encodes the specified ListAnalysesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse} message ListAnalysesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalysesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.analyses != null && message.analyses.length) + for (var i = 0; i < message.analyses.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Analysis.encode(message.analyses[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 ListAnalysesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse} message ListAnalysesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalysesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAnalysesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalysesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.analyses && message.analyses.length)) + message.analyses = []; + message.analyses.push($root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAnalysesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalysesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAnalysesResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAnalysesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.analyses != null && message.hasOwnProperty("analyses")) { + if (!Array.isArray(message.analyses)) + return "analyses: array expected"; + for (var i = 0; i < message.analyses.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Analysis.verify(message.analyses[i]); + if (error) + return "analyses." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAnalysesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse + */ + ListAnalysesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse(); + if (object.analyses) { + if (!Array.isArray(object.analyses)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListAnalysesResponse.analyses: array expected"); + message.analyses = []; + for (var i = 0; i < object.analyses.length; ++i) { + if (typeof object.analyses[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListAnalysesResponse.analyses: object expected"); + message.analyses[i] = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.analyses[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAnalysesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} message ListAnalysesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAnalysesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.analyses = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.analyses && message.analyses.length) { + object.analyses = []; + for (var j = 0; j < message.analyses.length; ++j) + object.analyses[j] = $root.google.cloud.contactcenterinsights.v1.Analysis.toObject(message.analyses[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAnalysesResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @instance + * @returns {Object.} JSON object + */ + ListAnalysesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAnalysesResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAnalysesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAnalysesResponse"; + }; + + return ListAnalysesResponse; + })(); + + v1.GetAnalysisRequest = (function() { + + /** + * Properties of a GetAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetAnalysisRequest + * @property {string|null} [name] GetAnalysisRequest name + */ + + /** + * Constructs a new GetAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetAnalysisRequest. + * @implements IGetAnalysisRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest=} [properties] Properties to set + */ + function GetAnalysisRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAnalysisRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @instance + */ + GetAnalysisRequest.prototype.name = ""; + + /** + * Creates a new GetAnalysisRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest instance + */ + GetAnalysisRequest.create = function create(properties) { + return new GetAnalysisRequest(properties); + }; + + /** + * Encodes the specified GetAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest} message GetAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAnalysisRequest.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 GetAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest} message GetAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAnalysisRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAnalysisRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAnalysisRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAnalysisRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAnalysisRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAnalysisRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAnalysisRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest + */ + GetAnalysisRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAnalysisRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} message GetAnalysisRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAnalysisRequest.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 GetAnalysisRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @instance + * @returns {Object.} JSON object + */ + GetAnalysisRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAnalysisRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAnalysisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetAnalysisRequest"; + }; + + return GetAnalysisRequest; + })(); + + v1.DeleteAnalysisRequest = (function() { + + /** + * Properties of a DeleteAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteAnalysisRequest + * @property {string|null} [name] DeleteAnalysisRequest name + */ + + /** + * Constructs a new DeleteAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteAnalysisRequest. + * @implements IDeleteAnalysisRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest=} [properties] Properties to set + */ + function DeleteAnalysisRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAnalysisRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @instance + */ + DeleteAnalysisRequest.prototype.name = ""; + + /** + * Creates a new DeleteAnalysisRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest instance + */ + DeleteAnalysisRequest.create = function create(properties) { + return new DeleteAnalysisRequest(properties); + }; + + /** + * Encodes the specified DeleteAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest} message DeleteAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAnalysisRequest.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 DeleteAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest} message DeleteAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAnalysisRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAnalysisRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAnalysisRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAnalysisRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAnalysisRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAnalysisRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAnalysisRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest + */ + DeleteAnalysisRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAnalysisRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} message DeleteAnalysisRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAnalysisRequest.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 DeleteAnalysisRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAnalysisRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAnalysisRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAnalysisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest"; + }; + + return DeleteAnalysisRequest; + })(); + + v1.ExportInsightsDataRequest = (function() { + + /** + * Properties of an ExportInsightsDataRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IExportInsightsDataRequest + * @property {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination|null} [bigQueryDestination] ExportInsightsDataRequest bigQueryDestination + * @property {string|null} [parent] ExportInsightsDataRequest parent + * @property {string|null} [filter] ExportInsightsDataRequest filter + * @property {string|null} [kmsKey] ExportInsightsDataRequest kmsKey + * @property {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition|null} [writeDisposition] ExportInsightsDataRequest writeDisposition + */ + + /** + * Constructs a new ExportInsightsDataRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an ExportInsightsDataRequest. + * @implements IExportInsightsDataRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest=} [properties] Properties to set + */ + function ExportInsightsDataRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportInsightsDataRequest bigQueryDestination. + * @member {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination|null|undefined} bigQueryDestination + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @instance + */ + ExportInsightsDataRequest.prototype.bigQueryDestination = null; + + /** + * ExportInsightsDataRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @instance + */ + ExportInsightsDataRequest.prototype.parent = ""; + + /** + * ExportInsightsDataRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @instance + */ + ExportInsightsDataRequest.prototype.filter = ""; + + /** + * ExportInsightsDataRequest kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @instance + */ + ExportInsightsDataRequest.prototype.kmsKey = ""; + + /** + * ExportInsightsDataRequest writeDisposition. + * @member {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition} writeDisposition + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @instance + */ + ExportInsightsDataRequest.prototype.writeDisposition = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExportInsightsDataRequest destination. + * @member {"bigQueryDestination"|undefined} destination + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @instance + */ + Object.defineProperty(ExportInsightsDataRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["bigQueryDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportInsightsDataRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest} ExportInsightsDataRequest instance + */ + ExportInsightsDataRequest.create = function create(properties) { + return new ExportInsightsDataRequest(properties); + }; + + /** + * Encodes the specified ExportInsightsDataRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest} message ExportInsightsDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportInsightsDataRequest.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.bigQueryDestination != null && Object.hasOwnProperty.call(message, "bigQueryDestination")) + $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination.encode(message.bigQueryDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKey); + if (message.writeDisposition != null && Object.hasOwnProperty.call(message, "writeDisposition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.writeDisposition); + return writer; + }; + + /** + * Encodes the specified ExportInsightsDataRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest} message ExportInsightsDataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportInsightsDataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportInsightsDataRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest} ExportInsightsDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportInsightsDataRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.bigQueryDestination = $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination.decode(reader, reader.uint32()); + break; + } + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + case 4: { + message.kmsKey = reader.string(); + break; + } + case 5: { + message.writeDisposition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportInsightsDataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest} ExportInsightsDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportInsightsDataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportInsightsDataRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportInsightsDataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigQueryDestination != null && message.hasOwnProperty("bigQueryDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination.verify(message.bigQueryDestination); + if (error) + return "bigQueryDestination." + error; + } + } + 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.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; + if (message.writeDisposition != null && message.hasOwnProperty("writeDisposition")) + switch (message.writeDisposition) { + default: + return "writeDisposition: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an ExportInsightsDataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest} ExportInsightsDataRequest + */ + ExportInsightsDataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest(); + if (object.bigQueryDestination != null) { + if (typeof object.bigQueryDestination !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.bigQueryDestination: object expected"); + message.bigQueryDestination = $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination.fromObject(object.bigQueryDestination); + } + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); + switch (object.writeDisposition) { + default: + if (typeof object.writeDisposition === "number") { + message.writeDisposition = object.writeDisposition; + break; + } + break; + case "WRITE_DISPOSITION_UNSPECIFIED": + case 0: + message.writeDisposition = 0; + break; + case "WRITE_TRUNCATE": + case 1: + message.writeDisposition = 1; + break; + case "WRITE_APPEND": + case 2: + message.writeDisposition = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExportInsightsDataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest} message ExportInsightsDataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportInsightsDataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.kmsKey = ""; + object.writeDisposition = options.enums === String ? "WRITE_DISPOSITION_UNSPECIFIED" : 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.bigQueryDestination != null && message.hasOwnProperty("bigQueryDestination")) { + object.bigQueryDestination = $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination.toObject(message.bigQueryDestination, options); + if (options.oneofs) + object.destination = "bigQueryDestination"; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; + if (message.writeDisposition != null && message.hasOwnProperty("writeDisposition")) + object.writeDisposition = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition[message.writeDisposition] === undefined ? message.writeDisposition : $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition[message.writeDisposition] : message.writeDisposition; + return object; + }; + + /** + * Converts this ExportInsightsDataRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @instance + * @returns {Object.} JSON object + */ + ExportInsightsDataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportInsightsDataRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportInsightsDataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest"; + }; + + ExportInsightsDataRequest.BigQueryDestination = (function() { + + /** + * Properties of a BigQueryDestination. + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @interface IBigQueryDestination + * @property {string|null} [projectId] BigQueryDestination projectId + * @property {string|null} [dataset] BigQueryDestination dataset + * @property {string|null} [table] BigQueryDestination table + */ + + /** + * Constructs a new BigQueryDestination. + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest + * @classdesc Represents a BigQueryDestination. + * @implements IBigQueryDestination + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination=} [properties] Properties to set + */ + function BigQueryDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryDestination projectId. + * @member {string} projectId + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @instance + */ + BigQueryDestination.prototype.projectId = ""; + + /** + * BigQueryDestination dataset. + * @member {string} dataset + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @instance + */ + BigQueryDestination.prototype.dataset = ""; + + /** + * BigQueryDestination table. + * @member {string} table + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @instance + */ + BigQueryDestination.prototype.table = ""; + + /** + * Creates a new BigQueryDestination instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination} BigQueryDestination instance + */ + BigQueryDestination.create = function create(properties) { + return new BigQueryDestination(properties); + }; + + /** + * Encodes the specified BigQueryDestination message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.table); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectId); + return writer; + }; + + /** + * Encodes the specified BigQueryDestination message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.IBigQueryDestination} message BigQueryDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination} BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.projectId = reader.string(); + break; + } + case 1: { + message.dataset = reader.string(); + break; + } + case 2: { + message.table = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination} BigQueryDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDestination message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.dataset != null && message.hasOwnProperty("dataset")) + if (!$util.isString(message.dataset)) + return "dataset: string expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + return null; + }; + + /** + * Creates a BigQueryDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination} BigQueryDestination + */ + BigQueryDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.dataset != null) + message.dataset = String(object.dataset); + if (object.table != null) + message.table = String(object.table); + return message; + }; + + /** + * Creates a plain object from a BigQueryDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination} message BigQueryDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataset = ""; + object.table = ""; + object.projectId = ""; + } + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = message.dataset; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + return object; + }; + + /** + * Converts this BigQueryDestination to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @instance + * @returns {Object.} JSON object + */ + BigQueryDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryDestination + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination"; + }; + + return BigQueryDestination; + })(); + + /** + * WriteDisposition enum. + * @name google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition + * @enum {number} + * @property {number} WRITE_DISPOSITION_UNSPECIFIED=0 WRITE_DISPOSITION_UNSPECIFIED value + * @property {number} WRITE_TRUNCATE=1 WRITE_TRUNCATE value + * @property {number} WRITE_APPEND=2 WRITE_APPEND value + */ + ExportInsightsDataRequest.WriteDisposition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WRITE_DISPOSITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "WRITE_TRUNCATE"] = 1; + values[valuesById[2] = "WRITE_APPEND"] = 2; + return values; + })(); + + return ExportInsightsDataRequest; + })(); + + v1.ExportInsightsDataMetadata = (function() { + + /** + * Properties of an ExportInsightsDataMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IExportInsightsDataMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ExportInsightsDataMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] ExportInsightsDataMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest|null} [request] ExportInsightsDataMetadata request + * @property {Array.|null} [partialErrors] ExportInsightsDataMetadata partialErrors + */ + + /** + * Constructs a new ExportInsightsDataMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an ExportInsightsDataMetadata. + * @implements IExportInsightsDataMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata=} [properties] Properties to set + */ + function ExportInsightsDataMetadata(properties) { + this.partialErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExportInsightsDataMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @instance + */ + ExportInsightsDataMetadata.prototype.createTime = null; + + /** + * ExportInsightsDataMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @instance + */ + ExportInsightsDataMetadata.prototype.endTime = null; + + /** + * ExportInsightsDataMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @instance + */ + ExportInsightsDataMetadata.prototype.request = null; + + /** + * ExportInsightsDataMetadata partialErrors. + * @member {Array.} partialErrors + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @instance + */ + ExportInsightsDataMetadata.prototype.partialErrors = $util.emptyArray; + + /** + * Creates a new ExportInsightsDataMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata} ExportInsightsDataMetadata instance + */ + ExportInsightsDataMetadata.create = function create(properties) { + return new ExportInsightsDataMetadata(properties); + }; + + /** + * Encodes the specified ExportInsightsDataMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata} message ExportInsightsDataMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportInsightsDataMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, 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.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partialErrors != null && message.partialErrors.length) + for (var i = 0; i < message.partialErrors.length; ++i) + $root.google.rpc.Status.encode(message.partialErrors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExportInsightsDataMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata} message ExportInsightsDataMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportInsightsDataMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportInsightsDataMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata} ExportInsightsDataMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportInsightsDataMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.partialErrors && message.partialErrors.length)) + message.partialErrors = []; + message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportInsightsDataMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata} ExportInsightsDataMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportInsightsDataMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportInsightsDataMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportInsightsDataMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.verify(message.request); + if (error) + return "request." + error; + } + if (message.partialErrors != null && message.hasOwnProperty("partialErrors")) { + if (!Array.isArray(message.partialErrors)) + return "partialErrors: array expected"; + for (var i = 0; i < message.partialErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialErrors[i]); + if (error) + return "partialErrors." + error; + } + } + return null; + }; + + /** + * Creates an ExportInsightsDataMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata} ExportInsightsDataMetadata + */ + ExportInsightsDataMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.fromObject(object.request); + } + if (object.partialErrors) { + if (!Array.isArray(object.partialErrors)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata.partialErrors: array expected"); + message.partialErrors = []; + for (var i = 0; i < object.partialErrors.length; ++i) { + if (typeof object.partialErrors[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata.partialErrors: object expected"); + message.partialErrors[i] = $root.google.rpc.Status.fromObject(object.partialErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExportInsightsDataMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata} message ExportInsightsDataMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportInsightsDataMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partialErrors = []; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.toObject(message.request, options); + if (message.partialErrors && message.partialErrors.length) { + object.partialErrors = []; + for (var j = 0; j < message.partialErrors.length; ++j) + object.partialErrors[j] = $root.google.rpc.Status.toObject(message.partialErrors[j], options); + } + return object; + }; + + /** + * Converts this ExportInsightsDataMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @instance + * @returns {Object.} JSON object + */ + ExportInsightsDataMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportInsightsDataMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportInsightsDataMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata"; + }; + + return ExportInsightsDataMetadata; + })(); + + v1.ExportInsightsDataResponse = (function() { + + /** + * Properties of an ExportInsightsDataResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IExportInsightsDataResponse + */ + + /** + * Constructs a new ExportInsightsDataResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an ExportInsightsDataResponse. + * @implements IExportInsightsDataResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse=} [properties] Properties to set + */ + function ExportInsightsDataResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ExportInsightsDataResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse} ExportInsightsDataResponse instance + */ + ExportInsightsDataResponse.create = function create(properties) { + return new ExportInsightsDataResponse(properties); + }; + + /** + * Encodes the specified ExportInsightsDataResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse} message ExportInsightsDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportInsightsDataResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ExportInsightsDataResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse} message ExportInsightsDataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExportInsightsDataResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExportInsightsDataResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse} ExportInsightsDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportInsightsDataResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExportInsightsDataResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse} ExportInsightsDataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExportInsightsDataResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExportInsightsDataResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExportInsightsDataResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an ExportInsightsDataResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse} ExportInsightsDataResponse + */ + ExportInsightsDataResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse) + return object; + return new $root.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse(); + }; + + /** + * Creates a plain object from an ExportInsightsDataResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse} message ExportInsightsDataResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportInsightsDataResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ExportInsightsDataResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @instance + * @returns {Object.} JSON object + */ + ExportInsightsDataResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExportInsightsDataResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportInsightsDataResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse"; + }; + + return ExportInsightsDataResponse; + })(); + + v1.CreateIssueModelRequest = (function() { + + /** + * Properties of a CreateIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateIssueModelRequest + * @property {string|null} [parent] CreateIssueModelRequest parent + * @property {google.cloud.contactcenterinsights.v1.IIssueModel|null} [issueModel] CreateIssueModelRequest issueModel + */ + + /** + * Constructs a new CreateIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateIssueModelRequest. + * @implements ICreateIssueModelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest=} [properties] Properties to set + */ + function CreateIssueModelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateIssueModelRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @instance + */ + CreateIssueModelRequest.prototype.parent = ""; + + /** + * CreateIssueModelRequest issueModel. + * @member {google.cloud.contactcenterinsights.v1.IIssueModel|null|undefined} issueModel + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @instance + */ + CreateIssueModelRequest.prototype.issueModel = null; + + /** + * Creates a new CreateIssueModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateIssueModelRequest} CreateIssueModelRequest instance + */ + CreateIssueModelRequest.create = function create(properties) { + return new CreateIssueModelRequest(properties); + }; + + /** + * Encodes the specified CreateIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest} message CreateIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateIssueModelRequest.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.issueModel != null && Object.hasOwnProperty.call(message, "issueModel")) + $root.google.cloud.contactcenterinsights.v1.IssueModel.encode(message.issueModel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest} message CreateIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateIssueModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateIssueModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateIssueModelRequest} CreateIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateIssueModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.issueModel = $root.google.cloud.contactcenterinsights.v1.IssueModel.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateIssueModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateIssueModelRequest} CreateIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateIssueModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateIssueModelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateIssueModelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModel.verify(message.issueModel); + if (error) + return "issueModel." + error; + } + return null; + }; + + /** + * Creates a CreateIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateIssueModelRequest} CreateIssueModelRequest + */ + CreateIssueModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.issueModel != null) { + if (typeof object.issueModel !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.issueModel: object expected"); + message.issueModel = $root.google.cloud.contactcenterinsights.v1.IssueModel.fromObject(object.issueModel); + } + return message; + }; + + /** + * Creates a plain object from a CreateIssueModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateIssueModelRequest} message CreateIssueModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateIssueModelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.issueModel = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + object.issueModel = $root.google.cloud.contactcenterinsights.v1.IssueModel.toObject(message.issueModel, options); + return object; + }; + + /** + * Converts this CreateIssueModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @instance + * @returns {Object.} JSON object + */ + CreateIssueModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateIssueModelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateIssueModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateIssueModelRequest"; + }; + + return CreateIssueModelRequest; + })(); + + v1.CreateIssueModelMetadata = (function() { + + /** + * Properties of a CreateIssueModelMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateIssueModelMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] CreateIssueModelMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] CreateIssueModelMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest|null} [request] CreateIssueModelMetadata request + */ + + /** + * Constructs a new CreateIssueModelMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateIssueModelMetadata. + * @implements ICreateIssueModelMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata=} [properties] Properties to set + */ + function CreateIssueModelMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateIssueModelMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @instance + */ + CreateIssueModelMetadata.prototype.createTime = null; + + /** + * CreateIssueModelMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @instance + */ + CreateIssueModelMetadata.prototype.endTime = null; + + /** + * CreateIssueModelMetadata request. + * @member {google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @instance + */ + CreateIssueModelMetadata.prototype.request = null; + + /** + * Creates a new CreateIssueModelMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata} CreateIssueModelMetadata instance + */ + CreateIssueModelMetadata.create = function create(properties) { + return new CreateIssueModelMetadata(properties); + }; + + /** + * Encodes the specified CreateIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata} message CreateIssueModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateIssueModelMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, 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.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata} message CreateIssueModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateIssueModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateIssueModelMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata} CreateIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateIssueModelMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateIssueModelMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata} CreateIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateIssueModelMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateIssueModelMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateIssueModelMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.verify(message.request); + if (error) + return "request." + error; + } + return null; + }; + + /** + * Creates a CreateIssueModelMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata} CreateIssueModelMetadata + */ + CreateIssueModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.fromObject(object.request); + } + return message; + }; + + /** + * Creates a plain object from a CreateIssueModelMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata} message CreateIssueModelMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateIssueModelMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest.toObject(message.request, options); + return object; + }; + + /** + * Converts this CreateIssueModelMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateIssueModelMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateIssueModelMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateIssueModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata"; + }; + + return CreateIssueModelMetadata; + })(); + + v1.UpdateIssueModelRequest = (function() { + + /** + * Properties of an UpdateIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateIssueModelRequest + * @property {google.cloud.contactcenterinsights.v1.IIssueModel|null} [issueModel] UpdateIssueModelRequest issueModel + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIssueModelRequest updateMask + */ + + /** + * Constructs a new UpdateIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateIssueModelRequest. + * @implements IUpdateIssueModelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest=} [properties] Properties to set + */ + function UpdateIssueModelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateIssueModelRequest issueModel. + * @member {google.cloud.contactcenterinsights.v1.IIssueModel|null|undefined} issueModel + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @instance + */ + UpdateIssueModelRequest.prototype.issueModel = null; + + /** + * UpdateIssueModelRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @instance + */ + UpdateIssueModelRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateIssueModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest} UpdateIssueModelRequest instance + */ + UpdateIssueModelRequest.create = function create(properties) { + return new UpdateIssueModelRequest(properties); + }; + + /** + * Encodes the specified UpdateIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest} message UpdateIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIssueModelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueModel != null && Object.hasOwnProperty.call(message, "issueModel")) + $root.google.cloud.contactcenterinsights.v1.IssueModel.encode(message.issueModel, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest} message UpdateIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIssueModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateIssueModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest} UpdateIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateIssueModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issueModel = $root.google.cloud.contactcenterinsights.v1.IssueModel.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateIssueModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest} UpdateIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateIssueModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateIssueModelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateIssueModelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModel.verify(message.issueModel); + if (error) + return "issueModel." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest} UpdateIssueModelRequest + */ + UpdateIssueModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest(); + if (object.issueModel != null) { + if (typeof object.issueModel !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest.issueModel: object expected"); + message.issueModel = $root.google.cloud.contactcenterinsights.v1.IssueModel.fromObject(object.issueModel); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateIssueModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest} message UpdateIssueModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateIssueModelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.issueModel = null; + object.updateMask = null; + } + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + object.issueModel = $root.google.cloud.contactcenterinsights.v1.IssueModel.toObject(message.issueModel, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateIssueModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateIssueModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateIssueModelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateIssueModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest"; + }; + + return UpdateIssueModelRequest; + })(); + + v1.ListIssueModelsRequest = (function() { + + /** + * Properties of a ListIssueModelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListIssueModelsRequest + * @property {string|null} [parent] ListIssueModelsRequest parent + */ + + /** + * Constructs a new ListIssueModelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListIssueModelsRequest. + * @implements IListIssueModelsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsRequest=} [properties] Properties to set + */ + function ListIssueModelsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListIssueModelsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @instance + */ + ListIssueModelsRequest.prototype.parent = ""; + + /** + * Creates a new ListIssueModelsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListIssueModelsRequest} ListIssueModelsRequest instance + */ + ListIssueModelsRequest.create = function create(properties) { + return new ListIssueModelsRequest(properties); + }; + + /** + * Encodes the specified ListIssueModelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssueModelsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsRequest} message ListIssueModelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssueModelsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListIssueModelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssueModelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsRequest} message ListIssueModelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssueModelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListIssueModelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListIssueModelsRequest} ListIssueModelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssueModelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListIssueModelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListIssueModelsRequest} ListIssueModelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssueModelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListIssueModelsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListIssueModelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a ListIssueModelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListIssueModelsRequest} ListIssueModelsRequest + */ + ListIssueModelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListIssueModelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListIssueModelsRequest} message ListIssueModelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIssueModelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListIssueModelsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @instance + * @returns {Object.} JSON object + */ + ListIssueModelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListIssueModelsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListIssueModelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListIssueModelsRequest"; + }; + + return ListIssueModelsRequest; + })(); + + v1.ListIssueModelsResponse = (function() { + + /** + * Properties of a ListIssueModelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListIssueModelsResponse + * @property {Array.|null} [issueModels] ListIssueModelsResponse issueModels + */ + + /** + * Constructs a new ListIssueModelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListIssueModelsResponse. + * @implements IListIssueModelsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsResponse=} [properties] Properties to set + */ + function ListIssueModelsResponse(properties) { + this.issueModels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListIssueModelsResponse issueModels. + * @member {Array.} issueModels + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @instance + */ + ListIssueModelsResponse.prototype.issueModels = $util.emptyArray; + + /** + * Creates a new ListIssueModelsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListIssueModelsResponse} ListIssueModelsResponse instance + */ + ListIssueModelsResponse.create = function create(properties) { + return new ListIssueModelsResponse(properties); + }; + + /** + * Encodes the specified ListIssueModelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssueModelsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsResponse} message ListIssueModelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssueModelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueModels != null && message.issueModels.length) + for (var i = 0; i < message.issueModels.length; ++i) + $root.google.cloud.contactcenterinsights.v1.IssueModel.encode(message.issueModels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListIssueModelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssueModelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssueModelsResponse} message ListIssueModelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssueModelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListIssueModelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListIssueModelsResponse} ListIssueModelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssueModelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListIssueModelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.issueModels && message.issueModels.length)) + message.issueModels = []; + message.issueModels.push($root.google.cloud.contactcenterinsights.v1.IssueModel.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListIssueModelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListIssueModelsResponse} ListIssueModelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssueModelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListIssueModelsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListIssueModelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueModels != null && message.hasOwnProperty("issueModels")) { + if (!Array.isArray(message.issueModels)) + return "issueModels: array expected"; + for (var i = 0; i < message.issueModels.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModel.verify(message.issueModels[i]); + if (error) + return "issueModels." + error; + } + } + return null; + }; + + /** + * Creates a ListIssueModelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListIssueModelsResponse} ListIssueModelsResponse + */ + ListIssueModelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListIssueModelsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListIssueModelsResponse(); + if (object.issueModels) { + if (!Array.isArray(object.issueModels)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListIssueModelsResponse.issueModels: array expected"); + message.issueModels = []; + for (var i = 0; i < object.issueModels.length; ++i) { + if (typeof object.issueModels[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListIssueModelsResponse.issueModels: object expected"); + message.issueModels[i] = $root.google.cloud.contactcenterinsights.v1.IssueModel.fromObject(object.issueModels[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListIssueModelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListIssueModelsResponse} message ListIssueModelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIssueModelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.issueModels = []; + if (message.issueModels && message.issueModels.length) { + object.issueModels = []; + for (var j = 0; j < message.issueModels.length; ++j) + object.issueModels[j] = $root.google.cloud.contactcenterinsights.v1.IssueModel.toObject(message.issueModels[j], options); + } + return object; + }; + + /** + * Converts this ListIssueModelsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @instance + * @returns {Object.} JSON object + */ + ListIssueModelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListIssueModelsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListIssueModelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListIssueModelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListIssueModelsResponse"; + }; + + return ListIssueModelsResponse; + })(); + + v1.GetIssueModelRequest = (function() { + + /** + * Properties of a GetIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetIssueModelRequest + * @property {string|null} [name] GetIssueModelRequest name + */ + + /** + * Constructs a new GetIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetIssueModelRequest. + * @implements IGetIssueModelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetIssueModelRequest=} [properties] Properties to set + */ + function GetIssueModelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetIssueModelRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @instance + */ + GetIssueModelRequest.prototype.name = ""; + + /** + * Creates a new GetIssueModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetIssueModelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetIssueModelRequest} GetIssueModelRequest instance + */ + GetIssueModelRequest.create = function create(properties) { + return new GetIssueModelRequest(properties); + }; + + /** + * Encodes the specified GetIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetIssueModelRequest} message GetIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIssueModelRequest.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 GetIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetIssueModelRequest} message GetIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIssueModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIssueModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetIssueModelRequest} GetIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIssueModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetIssueModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIssueModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetIssueModelRequest} GetIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIssueModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIssueModelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIssueModelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetIssueModelRequest} GetIssueModelRequest + */ + GetIssueModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetIssueModelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetIssueModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetIssueModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetIssueModelRequest} message GetIssueModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIssueModelRequest.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 GetIssueModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @instance + * @returns {Object.} JSON object + */ + GetIssueModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetIssueModelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetIssueModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIssueModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetIssueModelRequest"; + }; + + return GetIssueModelRequest; + })(); + + v1.DeleteIssueModelRequest = (function() { + + /** + * Properties of a DeleteIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteIssueModelRequest + * @property {string|null} [name] DeleteIssueModelRequest name + */ + + /** + * Constructs a new DeleteIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteIssueModelRequest. + * @implements IDeleteIssueModelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest=} [properties] Properties to set + */ + function DeleteIssueModelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteIssueModelRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @instance + */ + DeleteIssueModelRequest.prototype.name = ""; + + /** + * Creates a new DeleteIssueModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest} DeleteIssueModelRequest instance + */ + DeleteIssueModelRequest.create = function create(properties) { + return new DeleteIssueModelRequest(properties); + }; + + /** + * Encodes the specified DeleteIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest} message DeleteIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIssueModelRequest.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 DeleteIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest} message DeleteIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIssueModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteIssueModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest} DeleteIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteIssueModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteIssueModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest} DeleteIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteIssueModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteIssueModelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteIssueModelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest} DeleteIssueModelRequest + */ + DeleteIssueModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteIssueModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest} message DeleteIssueModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteIssueModelRequest.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 DeleteIssueModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteIssueModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteIssueModelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteIssueModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest"; + }; + + return DeleteIssueModelRequest; + })(); + + v1.DeleteIssueModelMetadata = (function() { + + /** + * Properties of a DeleteIssueModelMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteIssueModelMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] DeleteIssueModelMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] DeleteIssueModelMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest|null} [request] DeleteIssueModelMetadata request + */ + + /** + * Constructs a new DeleteIssueModelMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteIssueModelMetadata. + * @implements IDeleteIssueModelMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata=} [properties] Properties to set + */ + function DeleteIssueModelMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteIssueModelMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @instance + */ + DeleteIssueModelMetadata.prototype.createTime = null; + + /** + * DeleteIssueModelMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @instance + */ + DeleteIssueModelMetadata.prototype.endTime = null; + + /** + * DeleteIssueModelMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @instance + */ + DeleteIssueModelMetadata.prototype.request = null; + + /** + * Creates a new DeleteIssueModelMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata} DeleteIssueModelMetadata instance + */ + DeleteIssueModelMetadata.create = function create(properties) { + return new DeleteIssueModelMetadata(properties); + }; + + /** + * Encodes the specified DeleteIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata} message DeleteIssueModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIssueModelMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, 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.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata} message DeleteIssueModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIssueModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteIssueModelMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata} DeleteIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteIssueModelMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteIssueModelMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata} DeleteIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteIssueModelMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteIssueModelMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteIssueModelMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest.verify(message.request); + if (error) + return "request." + error; + } + return null; + }; + + /** + * Creates a DeleteIssueModelMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata} DeleteIssueModelMetadata + */ + DeleteIssueModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest.fromObject(object.request); + } + return message; + }; + + /** + * Creates a plain object from a DeleteIssueModelMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata} message DeleteIssueModelMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteIssueModelMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest.toObject(message.request, options); + return object; + }; + + /** + * Converts this DeleteIssueModelMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @instance + * @returns {Object.} JSON object + */ + DeleteIssueModelMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteIssueModelMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteIssueModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata"; + }; + + return DeleteIssueModelMetadata; + })(); + + v1.DeployIssueModelRequest = (function() { + + /** + * Properties of a DeployIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeployIssueModelRequest + * @property {string|null} [name] DeployIssueModelRequest name + */ + + /** + * Constructs a new DeployIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeployIssueModelRequest. + * @implements IDeployIssueModelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest=} [properties] Properties to set + */ + function DeployIssueModelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployIssueModelRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @instance + */ + DeployIssueModelRequest.prototype.name = ""; + + /** + * Creates a new DeployIssueModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelRequest} DeployIssueModelRequest instance + */ + DeployIssueModelRequest.create = function create(properties) { + return new DeployIssueModelRequest(properties); + }; + + /** + * Encodes the specified DeployIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest} message DeployIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployIssueModelRequest.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 DeployIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest} message DeployIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployIssueModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployIssueModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelRequest} DeployIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployIssueModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployIssueModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelRequest} DeployIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployIssueModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployIssueModelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployIssueModelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeployIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelRequest} DeployIssueModelRequest + */ + DeployIssueModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeployIssueModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeployIssueModelRequest} message DeployIssueModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployIssueModelRequest.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 DeployIssueModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @instance + * @returns {Object.} JSON object + */ + DeployIssueModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployIssueModelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployIssueModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeployIssueModelRequest"; + }; + + return DeployIssueModelRequest; + })(); + + v1.DeployIssueModelResponse = (function() { + + /** + * Properties of a DeployIssueModelResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeployIssueModelResponse + */ + + /** + * Constructs a new DeployIssueModelResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeployIssueModelResponse. + * @implements IDeployIssueModelResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse=} [properties] Properties to set + */ + function DeployIssueModelResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new DeployIssueModelResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelResponse} DeployIssueModelResponse instance + */ + DeployIssueModelResponse.create = function create(properties) { + return new DeployIssueModelResponse(properties); + }; + + /** + * Encodes the specified DeployIssueModelResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse} message DeployIssueModelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployIssueModelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DeployIssueModelResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse} message DeployIssueModelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployIssueModelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployIssueModelResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelResponse} DeployIssueModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployIssueModelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployIssueModelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelResponse} DeployIssueModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployIssueModelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployIssueModelResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployIssueModelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DeployIssueModelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelResponse} DeployIssueModelResponse + */ + DeployIssueModelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse) + return object; + return new $root.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse(); + }; + + /** + * Creates a plain object from a DeployIssueModelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.DeployIssueModelResponse} message DeployIssueModelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployIssueModelResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DeployIssueModelResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @instance + * @returns {Object.} JSON object + */ + DeployIssueModelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployIssueModelResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployIssueModelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeployIssueModelResponse"; + }; + + return DeployIssueModelResponse; + })(); + + v1.DeployIssueModelMetadata = (function() { + + /** + * Properties of a DeployIssueModelMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeployIssueModelMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] DeployIssueModelMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] DeployIssueModelMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest|null} [request] DeployIssueModelMetadata request + */ + + /** + * Constructs a new DeployIssueModelMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeployIssueModelMetadata. + * @implements IDeployIssueModelMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata=} [properties] Properties to set + */ + function DeployIssueModelMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployIssueModelMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @instance + */ + DeployIssueModelMetadata.prototype.createTime = null; + + /** + * DeployIssueModelMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @instance + */ + DeployIssueModelMetadata.prototype.endTime = null; + + /** + * DeployIssueModelMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @instance + */ + DeployIssueModelMetadata.prototype.request = null; + + /** + * Creates a new DeployIssueModelMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata} DeployIssueModelMetadata instance + */ + DeployIssueModelMetadata.create = function create(properties) { + return new DeployIssueModelMetadata(properties); + }; + + /** + * Encodes the specified DeployIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata} message DeployIssueModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployIssueModelMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, 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.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeployIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata} message DeployIssueModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployIssueModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployIssueModelMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata} DeployIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployIssueModelMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployIssueModelMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata} DeployIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployIssueModelMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployIssueModelMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployIssueModelMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest.verify(message.request); + if (error) + return "request." + error; + } + return null; + }; + + /** + * Creates a DeployIssueModelMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata} DeployIssueModelMetadata + */ + DeployIssueModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest.fromObject(object.request); + } + return message; + }; + + /** + * Creates a plain object from a DeployIssueModelMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata} message DeployIssueModelMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployIssueModelMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest.toObject(message.request, options); + return object; + }; + + /** + * Converts this DeployIssueModelMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @instance + * @returns {Object.} JSON object + */ + DeployIssueModelMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployIssueModelMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployIssueModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata"; + }; + + return DeployIssueModelMetadata; + })(); + + v1.UndeployIssueModelRequest = (function() { + + /** + * Properties of an UndeployIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUndeployIssueModelRequest + * @property {string|null} [name] UndeployIssueModelRequest name + */ + + /** + * Constructs a new UndeployIssueModelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UndeployIssueModelRequest. + * @implements IUndeployIssueModelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest=} [properties] Properties to set + */ + function UndeployIssueModelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UndeployIssueModelRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @instance + */ + UndeployIssueModelRequest.prototype.name = ""; + + /** + * Creates a new UndeployIssueModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest} UndeployIssueModelRequest instance + */ + UndeployIssueModelRequest.create = function create(properties) { + return new UndeployIssueModelRequest(properties); + }; + + /** + * Encodes the specified UndeployIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest} message UndeployIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployIssueModelRequest.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 UndeployIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest} message UndeployIssueModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployIssueModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UndeployIssueModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest} UndeployIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployIssueModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UndeployIssueModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest} UndeployIssueModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployIssueModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeployIssueModelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeployIssueModelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an UndeployIssueModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest} UndeployIssueModelRequest + */ + UndeployIssueModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an UndeployIssueModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest} message UndeployIssueModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeployIssueModelRequest.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 UndeployIssueModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @instance + * @returns {Object.} JSON object + */ + UndeployIssueModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UndeployIssueModelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeployIssueModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest"; + }; + + return UndeployIssueModelRequest; + })(); + + v1.UndeployIssueModelResponse = (function() { + + /** + * Properties of an UndeployIssueModelResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUndeployIssueModelResponse + */ + + /** + * Constructs a new UndeployIssueModelResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UndeployIssueModelResponse. + * @implements IUndeployIssueModelResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse=} [properties] Properties to set + */ + function UndeployIssueModelResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new UndeployIssueModelResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse} UndeployIssueModelResponse instance + */ + UndeployIssueModelResponse.create = function create(properties) { + return new UndeployIssueModelResponse(properties); + }; + + /** + * Encodes the specified UndeployIssueModelResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse} message UndeployIssueModelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployIssueModelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified UndeployIssueModelResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse} message UndeployIssueModelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployIssueModelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UndeployIssueModelResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse} UndeployIssueModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployIssueModelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UndeployIssueModelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse} UndeployIssueModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployIssueModelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeployIssueModelResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeployIssueModelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an UndeployIssueModelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse} UndeployIssueModelResponse + */ + UndeployIssueModelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse) + return object; + return new $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse(); + }; + + /** + * Creates a plain object from an UndeployIssueModelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse} message UndeployIssueModelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeployIssueModelResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this UndeployIssueModelResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @instance + * @returns {Object.} JSON object + */ + UndeployIssueModelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UndeployIssueModelResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeployIssueModelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse"; + }; + + return UndeployIssueModelResponse; + })(); + + v1.UndeployIssueModelMetadata = (function() { + + /** + * Properties of an UndeployIssueModelMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUndeployIssueModelMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] UndeployIssueModelMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] UndeployIssueModelMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest|null} [request] UndeployIssueModelMetadata request + */ + + /** + * Constructs a new UndeployIssueModelMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UndeployIssueModelMetadata. + * @implements IUndeployIssueModelMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata=} [properties] Properties to set + */ + function UndeployIssueModelMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UndeployIssueModelMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @instance + */ + UndeployIssueModelMetadata.prototype.createTime = null; + + /** + * UndeployIssueModelMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @instance + */ + UndeployIssueModelMetadata.prototype.endTime = null; + + /** + * UndeployIssueModelMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @instance + */ + UndeployIssueModelMetadata.prototype.request = null; + + /** + * Creates a new UndeployIssueModelMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata} UndeployIssueModelMetadata instance + */ + UndeployIssueModelMetadata.create = function create(properties) { + return new UndeployIssueModelMetadata(properties); + }; + + /** + * Encodes the specified UndeployIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata} message UndeployIssueModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployIssueModelMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, 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.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UndeployIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata} message UndeployIssueModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployIssueModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UndeployIssueModelMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata} UndeployIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployIssueModelMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UndeployIssueModelMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata} UndeployIssueModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployIssueModelMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeployIssueModelMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeployIssueModelMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest.verify(message.request); + if (error) + return "request." + error; + } + return null; + }; + + /** + * Creates an UndeployIssueModelMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata} UndeployIssueModelMetadata + */ + UndeployIssueModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest.fromObject(object.request); + } + return message; + }; + + /** + * Creates a plain object from an UndeployIssueModelMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata} message UndeployIssueModelMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeployIssueModelMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest.toObject(message.request, options); + return object; + }; + + /** + * Converts this UndeployIssueModelMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @instance + * @returns {Object.} JSON object + */ + UndeployIssueModelMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UndeployIssueModelMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeployIssueModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata"; + }; + + return UndeployIssueModelMetadata; + })(); + + v1.GetIssueRequest = (function() { + + /** + * Properties of a GetIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetIssueRequest + * @property {string|null} [name] GetIssueRequest name + */ + + /** + * Constructs a new GetIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetIssueRequest. + * @implements IGetIssueRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest=} [properties] Properties to set + */ + function GetIssueRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetIssueRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @instance + */ + GetIssueRequest.prototype.name = ""; + + /** + * Creates a new GetIssueRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest instance + */ + GetIssueRequest.create = function create(properties) { + return new GetIssueRequest(properties); + }; + + /** + * Encodes the specified GetIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest} message GetIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIssueRequest.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 GetIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest} message GetIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIssueRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIssueRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetIssueRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIssueRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIssueRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIssueRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIssueRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetIssueRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest + */ + GetIssueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetIssueRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetIssueRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetIssueRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetIssueRequest} message GetIssueRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIssueRequest.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 GetIssueRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @instance + * @returns {Object.} JSON object + */ + GetIssueRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetIssueRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetIssueRequest"; + }; + + return GetIssueRequest; + })(); + + v1.ListIssuesRequest = (function() { + + /** + * Properties of a ListIssuesRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListIssuesRequest + * @property {string|null} [parent] ListIssuesRequest parent + */ + + /** + * Constructs a new ListIssuesRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListIssuesRequest. + * @implements IListIssuesRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest=} [properties] Properties to set + */ + function ListIssuesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListIssuesRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @instance + */ + ListIssuesRequest.prototype.parent = ""; + + /** + * Creates a new ListIssuesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest instance + */ + ListIssuesRequest.create = function create(properties) { + return new ListIssuesRequest(properties); + }; + + /** + * Encodes the specified ListIssuesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest} message ListIssuesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssuesRequest.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); + return writer; + }; + + /** + * Encodes the specified ListIssuesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest} message ListIssuesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssuesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListIssuesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssuesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListIssuesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssuesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListIssuesRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListIssuesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a ListIssuesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest + */ + ListIssuesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListIssuesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListIssuesRequest} message ListIssuesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIssuesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListIssuesRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @instance + * @returns {Object.} JSON object + */ + ListIssuesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListIssuesRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListIssuesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListIssuesRequest"; + }; + + return ListIssuesRequest; + })(); + + v1.ListIssuesResponse = (function() { + + /** + * Properties of a ListIssuesResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListIssuesResponse + * @property {Array.|null} [issues] ListIssuesResponse issues + */ + + /** + * Constructs a new ListIssuesResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListIssuesResponse. + * @implements IListIssuesResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse=} [properties] Properties to set + */ + function ListIssuesResponse(properties) { + this.issues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListIssuesResponse issues. + * @member {Array.} issues + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @instance + */ + ListIssuesResponse.prototype.issues = $util.emptyArray; + + /** + * Creates a new ListIssuesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse instance + */ + ListIssuesResponse.create = function create(properties) { + return new ListIssuesResponse(properties); + }; + + /** + * Encodes the specified ListIssuesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse} message ListIssuesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssuesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issues != null && message.issues.length) + for (var i = 0; i < message.issues.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Issue.encode(message.issues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListIssuesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse} message ListIssuesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssuesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListIssuesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssuesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.issues && message.issues.length)) + message.issues = []; + message.issues.push($root.google.cloud.contactcenterinsights.v1.Issue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListIssuesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssuesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListIssuesResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListIssuesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issues != null && message.hasOwnProperty("issues")) { + if (!Array.isArray(message.issues)) + return "issues: array expected"; + for (var i = 0; i < message.issues.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Issue.verify(message.issues[i]); + if (error) + return "issues." + error; + } + } + return null; + }; + + /** + * Creates a ListIssuesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse + */ + ListIssuesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse(); + if (object.issues) { + if (!Array.isArray(object.issues)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListIssuesResponse.issues: array expected"); + message.issues = []; + for (var i = 0; i < object.issues.length; ++i) { + if (typeof object.issues[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListIssuesResponse.issues: object expected"); + message.issues[i] = $root.google.cloud.contactcenterinsights.v1.Issue.fromObject(object.issues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListIssuesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListIssuesResponse} message ListIssuesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIssuesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.issues = []; + if (message.issues && message.issues.length) { + object.issues = []; + for (var j = 0; j < message.issues.length; ++j) + object.issues[j] = $root.google.cloud.contactcenterinsights.v1.Issue.toObject(message.issues[j], options); + } + return object; + }; + + /** + * Converts this ListIssuesResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @instance + * @returns {Object.} JSON object + */ + ListIssuesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListIssuesResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListIssuesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListIssuesResponse"; + }; + + return ListIssuesResponse; + })(); + + v1.UpdateIssueRequest = (function() { + + /** + * Properties of an UpdateIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateIssueRequest + * @property {google.cloud.contactcenterinsights.v1.IIssue|null} [issue] UpdateIssueRequest issue + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIssueRequest updateMask + */ + + /** + * Constructs a new UpdateIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateIssueRequest. + * @implements IUpdateIssueRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest=} [properties] Properties to set + */ + function UpdateIssueRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateIssueRequest issue. + * @member {google.cloud.contactcenterinsights.v1.IIssue|null|undefined} issue + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @instance + */ + UpdateIssueRequest.prototype.issue = null; + + /** + * UpdateIssueRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @instance + */ + UpdateIssueRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateIssueRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest instance + */ + UpdateIssueRequest.create = function create(properties) { + return new UpdateIssueRequest(properties); + }; + + /** + * Encodes the specified UpdateIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIssueRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + $root.google.cloud.contactcenterinsights.v1.Issue.encode(message.issue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateIssueRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateIssueRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateIssueRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateIssueRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateIssueRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateIssueRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issue != null && message.hasOwnProperty("issue")) { + var error = $root.google.cloud.contactcenterinsights.v1.Issue.verify(message.issue); + if (error) + return "issue." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateIssueRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + */ + UpdateIssueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); + if (object.issue != null) { + if (typeof object.issue !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.issue: object expected"); + message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.fromObject(object.issue); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateIssueRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} message UpdateIssueRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateIssueRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.issue = null; + object.updateMask = null; + } + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = $root.google.cloud.contactcenterinsights.v1.Issue.toObject(message.issue, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateIssueRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateIssueRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateIssueRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateIssueRequest"; + }; + + return UpdateIssueRequest; + })(); + + v1.CalculateIssueModelStatsRequest = (function() { + + /** + * Properties of a CalculateIssueModelStatsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICalculateIssueModelStatsRequest + * @property {string|null} [issueModel] CalculateIssueModelStatsRequest issueModel + */ + + /** + * Constructs a new CalculateIssueModelStatsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CalculateIssueModelStatsRequest. + * @implements ICalculateIssueModelStatsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest=} [properties] Properties to set + */ + function CalculateIssueModelStatsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateIssueModelStatsRequest issueModel. + * @member {string} issueModel + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @instance + */ + CalculateIssueModelStatsRequest.prototype.issueModel = ""; + + /** + * Creates a new CalculateIssueModelStatsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest instance + */ + CalculateIssueModelStatsRequest.create = function create(properties) { + return new CalculateIssueModelStatsRequest(properties); + }; + + /** + * Encodes the specified CalculateIssueModelStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest} message CalculateIssueModelStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateIssueModelStatsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueModel != null && Object.hasOwnProperty.call(message, "issueModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issueModel); + return writer; + }; + + /** + * Encodes the specified CalculateIssueModelStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest} message CalculateIssueModelStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateIssueModelStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateIssueModelStatsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issueModel = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateIssueModelStatsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CalculateIssueModelStatsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CalculateIssueModelStatsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + if (!$util.isString(message.issueModel)) + return "issueModel: string expected"; + return null; + }; + + /** + * Creates a CalculateIssueModelStatsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest + */ + CalculateIssueModelStatsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest(); + if (object.issueModel != null) + message.issueModel = String(object.issueModel); + return message; + }; + + /** + * Creates a plain object from a CalculateIssueModelStatsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} message CalculateIssueModelStatsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CalculateIssueModelStatsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.issueModel = ""; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + object.issueModel = message.issueModel; + return object; + }; + + /** + * Converts this CalculateIssueModelStatsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @instance + * @returns {Object.} JSON object + */ + CalculateIssueModelStatsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CalculateIssueModelStatsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CalculateIssueModelStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest"; + }; + + return CalculateIssueModelStatsRequest; + })(); + + v1.CalculateIssueModelStatsResponse = (function() { + + /** + * Properties of a CalculateIssueModelStatsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICalculateIssueModelStatsResponse + * @property {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null} [currentStats] CalculateIssueModelStatsResponse currentStats + */ + + /** + * Constructs a new CalculateIssueModelStatsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CalculateIssueModelStatsResponse. + * @implements ICalculateIssueModelStatsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse=} [properties] Properties to set + */ + function CalculateIssueModelStatsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateIssueModelStatsResponse currentStats. + * @member {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null|undefined} currentStats + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @instance + */ + CalculateIssueModelStatsResponse.prototype.currentStats = null; + + /** + * Creates a new CalculateIssueModelStatsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse instance + */ + CalculateIssueModelStatsResponse.create = function create(properties) { + return new CalculateIssueModelStatsResponse(properties); + }; + + /** + * Encodes the specified CalculateIssueModelStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse} message CalculateIssueModelStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateIssueModelStatsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currentStats != null && Object.hasOwnProperty.call(message, "currentStats")) + $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.encode(message.currentStats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CalculateIssueModelStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse} message CalculateIssueModelStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateIssueModelStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateIssueModelStatsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.currentStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateIssueModelStatsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CalculateIssueModelStatsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CalculateIssueModelStatsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currentStats != null && message.hasOwnProperty("currentStats")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify(message.currentStats); + if (error) + return "currentStats." + error; + } + return null; + }; + + /** + * Creates a CalculateIssueModelStatsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse + */ + CalculateIssueModelStatsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse(); + if (object.currentStats != null) { + if (typeof object.currentStats !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.currentStats: object expected"); + message.currentStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.fromObject(object.currentStats); + } + return message; + }; + + /** + * Creates a plain object from a CalculateIssueModelStatsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} message CalculateIssueModelStatsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CalculateIssueModelStatsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.currentStats = null; + if (message.currentStats != null && message.hasOwnProperty("currentStats")) + object.currentStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.toObject(message.currentStats, options); + return object; + }; + + /** + * Converts this CalculateIssueModelStatsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @instance + * @returns {Object.} JSON object + */ + CalculateIssueModelStatsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CalculateIssueModelStatsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CalculateIssueModelStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse"; + }; + + return CalculateIssueModelStatsResponse; + })(); + + v1.CreatePhraseMatcherRequest = (function() { + + /** + * Properties of a CreatePhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreatePhraseMatcherRequest + * @property {string|null} [parent] CreatePhraseMatcherRequest parent + * @property {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null} [phraseMatcher] CreatePhraseMatcherRequest phraseMatcher + */ + + /** + * Constructs a new CreatePhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreatePhraseMatcherRequest. + * @implements ICreatePhraseMatcherRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest=} [properties] Properties to set + */ + function CreatePhraseMatcherRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePhraseMatcherRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @instance + */ + CreatePhraseMatcherRequest.prototype.parent = ""; + + /** + * CreatePhraseMatcherRequest phraseMatcher. + * @member {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null|undefined} phraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @instance + */ + CreatePhraseMatcherRequest.prototype.phraseMatcher = null; + + /** + * Creates a new CreatePhraseMatcherRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest instance + */ + CreatePhraseMatcherRequest.create = function create(properties) { + return new CreatePhraseMatcherRequest(properties); + }; + + /** + * Encodes the specified CreatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest} message CreatePhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePhraseMatcherRequest.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.phraseMatcher != null && Object.hasOwnProperty.call(message, "phraseMatcher")) + $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.encode(message.phraseMatcher, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest} message CreatePhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePhraseMatcherRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePhraseMatcherRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePhraseMatcherRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.verify(message.phraseMatcher); + if (error) + return "phraseMatcher." + error; + } + return null; + }; + + /** + * Creates a CreatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest + */ + CreatePhraseMatcherRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.phraseMatcher != null) { + if (typeof object.phraseMatcher !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.phraseMatcher: object expected"); + message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.fromObject(object.phraseMatcher); + } + return message; + }; + + /** + * Creates a plain object from a CreatePhraseMatcherRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} message CreatePhraseMatcherRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePhraseMatcherRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.phraseMatcher = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) + object.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.toObject(message.phraseMatcher, options); + return object; + }; + + /** + * Converts this CreatePhraseMatcherRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePhraseMatcherRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePhraseMatcherRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest"; + }; + + return CreatePhraseMatcherRequest; + })(); + + v1.ListPhraseMatchersRequest = (function() { + + /** + * Properties of a ListPhraseMatchersRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListPhraseMatchersRequest + * @property {string|null} [parent] ListPhraseMatchersRequest parent + * @property {number|null} [pageSize] ListPhraseMatchersRequest pageSize + * @property {string|null} [pageToken] ListPhraseMatchersRequest pageToken + * @property {string|null} [filter] ListPhraseMatchersRequest filter + */ + + /** + * Constructs a new ListPhraseMatchersRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListPhraseMatchersRequest. + * @implements IListPhraseMatchersRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest=} [properties] Properties to set + */ + function ListPhraseMatchersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPhraseMatchersRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + */ + ListPhraseMatchersRequest.prototype.parent = ""; + + /** + * ListPhraseMatchersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + */ + ListPhraseMatchersRequest.prototype.pageSize = 0; + + /** + * ListPhraseMatchersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + */ + ListPhraseMatchersRequest.prototype.pageToken = ""; + + /** + * ListPhraseMatchersRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + */ + ListPhraseMatchersRequest.prototype.filter = ""; + + /** + * Creates a new ListPhraseMatchersRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest instance + */ + ListPhraseMatchersRequest.create = function create(properties) { + return new ListPhraseMatchersRequest(properties); + }; + + /** + * Encodes the specified ListPhraseMatchersRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest} message ListPhraseMatchersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPhraseMatchersRequest.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 ListPhraseMatchersRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest} message ListPhraseMatchersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPhraseMatchersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPhraseMatchersRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + break; + } + } + return message; + }; + + /** + * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPhraseMatchersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPhraseMatchersRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPhraseMatchersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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 ListPhraseMatchersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest + */ + ListPhraseMatchersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest(); + 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 ListPhraseMatchersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} message ListPhraseMatchersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPhraseMatchersRequest.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 ListPhraseMatchersRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + * @returns {Object.} JSON object + */ + ListPhraseMatchersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPhraseMatchersRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPhraseMatchersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest"; + }; + + return ListPhraseMatchersRequest; + })(); + + v1.ListPhraseMatchersResponse = (function() { + + /** + * Properties of a ListPhraseMatchersResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListPhraseMatchersResponse + * @property {Array.|null} [phraseMatchers] ListPhraseMatchersResponse phraseMatchers + * @property {string|null} [nextPageToken] ListPhraseMatchersResponse nextPageToken + */ + + /** + * Constructs a new ListPhraseMatchersResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListPhraseMatchersResponse. + * @implements IListPhraseMatchersResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse=} [properties] Properties to set + */ + function ListPhraseMatchersResponse(properties) { + this.phraseMatchers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPhraseMatchersResponse phraseMatchers. + * @member {Array.} phraseMatchers + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @instance + */ + ListPhraseMatchersResponse.prototype.phraseMatchers = $util.emptyArray; + + /** + * ListPhraseMatchersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @instance + */ + ListPhraseMatchersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPhraseMatchersResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse instance + */ + ListPhraseMatchersResponse.create = function create(properties) { + return new ListPhraseMatchersResponse(properties); + }; + + /** + * Encodes the specified ListPhraseMatchersResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse} message ListPhraseMatchersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPhraseMatchersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phraseMatchers != null && message.phraseMatchers.length) + for (var i = 0; i < message.phraseMatchers.length; ++i) + $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.encode(message.phraseMatchers[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 ListPhraseMatchersResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse} message ListPhraseMatchersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPhraseMatchersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPhraseMatchersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.phraseMatchers && message.phraseMatchers.length)) + message.phraseMatchers = []; + message.phraseMatchers.push($root.google.cloud.contactcenterinsights.v1.PhraseMatcher.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPhraseMatchersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPhraseMatchersResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPhraseMatchersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.phraseMatchers != null && message.hasOwnProperty("phraseMatchers")) { + if (!Array.isArray(message.phraseMatchers)) + return "phraseMatchers: array expected"; + for (var i = 0; i < message.phraseMatchers.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.verify(message.phraseMatchers[i]); + if (error) + return "phraseMatchers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPhraseMatchersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse + */ + ListPhraseMatchersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse(); + if (object.phraseMatchers) { + if (!Array.isArray(object.phraseMatchers)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.phraseMatchers: array expected"); + message.phraseMatchers = []; + for (var i = 0; i < object.phraseMatchers.length; ++i) { + if (typeof object.phraseMatchers[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.phraseMatchers: object expected"); + message.phraseMatchers[i] = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.fromObject(object.phraseMatchers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPhraseMatchersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} message ListPhraseMatchersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPhraseMatchersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.phraseMatchers = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.phraseMatchers && message.phraseMatchers.length) { + object.phraseMatchers = []; + for (var j = 0; j < message.phraseMatchers.length; ++j) + object.phraseMatchers[j] = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.toObject(message.phraseMatchers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPhraseMatchersResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @instance + * @returns {Object.} JSON object + */ + ListPhraseMatchersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPhraseMatchersResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPhraseMatchersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse"; + }; + + return ListPhraseMatchersResponse; + })(); + + v1.GetPhraseMatcherRequest = (function() { + + /** + * Properties of a GetPhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetPhraseMatcherRequest + * @property {string|null} [name] GetPhraseMatcherRequest name + */ + + /** + * Constructs a new GetPhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetPhraseMatcherRequest. + * @implements IGetPhraseMatcherRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest=} [properties] Properties to set + */ + function GetPhraseMatcherRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPhraseMatcherRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @instance + */ + GetPhraseMatcherRequest.prototype.name = ""; + + /** + * Creates a new GetPhraseMatcherRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest instance + */ + GetPhraseMatcherRequest.create = function create(properties) { + return new GetPhraseMatcherRequest(properties); + }; + + /** + * Encodes the specified GetPhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest} message GetPhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPhraseMatcherRequest.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 GetPhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest} message GetPhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPhraseMatcherRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPhraseMatcherRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPhraseMatcherRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetPhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest + */ + GetPhraseMatcherRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPhraseMatcherRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} message GetPhraseMatcherRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPhraseMatcherRequest.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 GetPhraseMatcherRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @instance + * @returns {Object.} JSON object + */ + GetPhraseMatcherRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPhraseMatcherRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest"; + }; + + return GetPhraseMatcherRequest; + })(); + + v1.DeletePhraseMatcherRequest = (function() { + + /** + * Properties of a DeletePhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeletePhraseMatcherRequest + * @property {string|null} [name] DeletePhraseMatcherRequest name + */ + + /** + * Constructs a new DeletePhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeletePhraseMatcherRequest. + * @implements IDeletePhraseMatcherRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest=} [properties] Properties to set + */ + function DeletePhraseMatcherRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePhraseMatcherRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @instance + */ + DeletePhraseMatcherRequest.prototype.name = ""; + + /** + * Creates a new DeletePhraseMatcherRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest instance + */ + DeletePhraseMatcherRequest.create = function create(properties) { + return new DeletePhraseMatcherRequest(properties); + }; + + /** + * Encodes the specified DeletePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest} message DeletePhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePhraseMatcherRequest.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 DeletePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest} message DeletePhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePhraseMatcherRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePhraseMatcherRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePhraseMatcherRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeletePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest + */ + DeletePhraseMatcherRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeletePhraseMatcherRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} message DeletePhraseMatcherRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePhraseMatcherRequest.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 DeletePhraseMatcherRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePhraseMatcherRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePhraseMatcherRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest"; + }; + + return DeletePhraseMatcherRequest; + })(); + + v1.UpdatePhraseMatcherRequest = (function() { + + /** + * Properties of an UpdatePhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdatePhraseMatcherRequest + * @property {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null} [phraseMatcher] UpdatePhraseMatcherRequest phraseMatcher + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePhraseMatcherRequest updateMask + */ + + /** + * Constructs a new UpdatePhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdatePhraseMatcherRequest. + * @implements IUpdatePhraseMatcherRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest=} [properties] Properties to set + */ + function UpdatePhraseMatcherRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdatePhraseMatcherRequest phraseMatcher. + * @member {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null|undefined} phraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @instance + */ + UpdatePhraseMatcherRequest.prototype.phraseMatcher = null; + + /** + * UpdatePhraseMatcherRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @instance + */ + UpdatePhraseMatcherRequest.prototype.updateMask = null; + + /** + * Creates a new UpdatePhraseMatcherRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest instance + */ + UpdatePhraseMatcherRequest.create = function create(properties) { + return new UpdatePhraseMatcherRequest(properties); + }; + + /** + * Encodes the specified UpdatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest} message UpdatePhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePhraseMatcherRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phraseMatcher != null && Object.hasOwnProperty.call(message, "phraseMatcher")) + $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.encode(message.phraseMatcher, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest} message UpdatePhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePhraseMatcherRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePhraseMatcherRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePhraseMatcherRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.verify(message.phraseMatcher); + if (error) + return "phraseMatcher." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest + */ + UpdatePhraseMatcherRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest(); + if (object.phraseMatcher != null) { + if (typeof object.phraseMatcher !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.phraseMatcher: object expected"); + message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.fromObject(object.phraseMatcher); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePhraseMatcherRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} message UpdatePhraseMatcherRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePhraseMatcherRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.phraseMatcher = null; + object.updateMask = null; + } + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) + object.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.toObject(message.phraseMatcher, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdatePhraseMatcherRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePhraseMatcherRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePhraseMatcherRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest"; + }; + + return UpdatePhraseMatcherRequest; + })(); + + v1.GetSettingsRequest = (function() { + + /** + * Properties of a GetSettingsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetSettingsRequest + * @property {string|null} [name] GetSettingsRequest name + */ + + /** + * Constructs a new GetSettingsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetSettingsRequest. + * @implements IGetSettingsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest=} [properties] Properties to set + */ + function GetSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSettingsRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @instance + */ + GetSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetSettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest instance + */ + GetSettingsRequest.create = function create(properties) { + return new GetSettingsRequest(properties); + }; + + /** + * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSettingsRequest.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 GetSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSettingsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest + */ + GetSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetSettingsRequest} message GetSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSettingsRequest.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 GetSettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSettingsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetSettingsRequest"; + }; + + return GetSettingsRequest; + })(); + + v1.UpdateSettingsRequest = (function() { + + /** + * Properties of an UpdateSettingsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateSettingsRequest + * @property {google.cloud.contactcenterinsights.v1.ISettings|null} [settings] UpdateSettingsRequest settings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateSettingsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateSettingsRequest. + * @implements IUpdateSettingsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest=} [properties] Properties to set + */ + function UpdateSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSettingsRequest settings. + * @member {google.cloud.contactcenterinsights.v1.ISettings|null|undefined} settings + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @instance + */ + UpdateSettingsRequest.prototype.settings = null; + + /** + * UpdateSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @instance + */ + UpdateSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSettingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest instance + */ + UpdateSettingsRequest.create = function create(properties) { + return new UpdateSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) + $root.google.cloud.contactcenterinsights.v1.Settings.encode(message.settings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.settings = $root.google.cloud.contactcenterinsights.v1.Settings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSettingsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.settings != null && message.hasOwnProperty("settings")) { + var error = $root.google.cloud.contactcenterinsights.v1.Settings.verify(message.settings); + if (error) + return "settings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest + */ + UpdateSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest(); + if (object.settings != null) { + if (typeof object.settings !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.settings: object expected"); + message.settings = $root.google.cloud.contactcenterinsights.v1.Settings.fromObject(object.settings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} message UpdateSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.settings = null; + object.updateMask = null; + } + if (message.settings != null && message.hasOwnProperty("settings")) + object.settings = $root.google.cloud.contactcenterinsights.v1.Settings.toObject(message.settings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateSettingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSettingsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateSettingsRequest"; + }; + + return UpdateSettingsRequest; + })(); + + v1.CreateViewRequest = (function() { + + /** + * Properties of a CreateViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateViewRequest + * @property {string|null} [parent] CreateViewRequest parent + * @property {google.cloud.contactcenterinsights.v1.IView|null} [view] CreateViewRequest view + */ + + /** + * Constructs a new CreateViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateViewRequest. + * @implements ICreateViewRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest=} [properties] Properties to set + */ + function CreateViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateViewRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.parent = ""; + + /** + * CreateViewRequest view. + * @member {google.cloud.contactcenterinsights.v1.IView|null|undefined} view + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.view = null; + + /** + * Creates a new CreateViewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest instance + */ + CreateViewRequest.create = function create(properties) { + return new CreateViewRequest(properties); + }; + + /** + * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest} message CreateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateViewRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.cloud.contactcenterinsights.v1.View.encode(message.view, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest} message CreateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.view = $root.google.cloud.contactcenterinsights.v1.View.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateViewRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateViewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.view != null && message.hasOwnProperty("view")) { + var error = $root.google.cloud.contactcenterinsights.v1.View.verify(message.view); + if (error) + return "view." + error; + } + return null; + }; + + /** + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest + */ + CreateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateViewRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateViewRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateViewRequest.view: object expected"); + message.view = $root.google.cloud.contactcenterinsights.v1.View.fromObject(object.view); + } + return message; + }; + + /** + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateViewRequest} message CreateViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.cloud.contactcenterinsights.v1.View.toObject(message.view, options); + return object; + }; + + /** + * Converts this CreateViewRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @instance + * @returns {Object.} JSON object + */ + CreateViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateViewRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateViewRequest"; + }; + + return CreateViewRequest; + })(); + + v1.GetViewRequest = (function() { + + /** + * Properties of a GetViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetViewRequest + * @property {string|null} [name] GetViewRequest name + */ + + /** + * Constructs a new GetViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetViewRequest. + * @implements IGetViewRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest=} [properties] Properties to set + */ + function GetViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetViewRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @instance + */ + GetViewRequest.prototype.name = ""; + + /** + * Creates a new GetViewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest instance + */ + GetViewRequest.create = function create(properties) { + return new GetViewRequest(properties); + }; + + /** + * Encodes the specified GetViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest} message GetViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetViewRequest.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 GetViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest} message GetViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetViewRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetViewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest + */ + GetViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetViewRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetViewRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetViewRequest} message GetViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetViewRequest.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 GetViewRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @instance + * @returns {Object.} JSON object + */ + GetViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetViewRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetViewRequest"; + }; + + return GetViewRequest; + })(); + + v1.ListViewsRequest = (function() { + + /** + * Properties of a ListViewsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListViewsRequest + * @property {string|null} [parent] ListViewsRequest parent + * @property {number|null} [pageSize] ListViewsRequest pageSize + * @property {string|null} [pageToken] ListViewsRequest pageToken + */ + + /** + * Constructs a new ListViewsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListViewsRequest. + * @implements IListViewsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest=} [properties] Properties to set + */ + function ListViewsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListViewsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.parent = ""; + + /** + * ListViewsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.pageSize = 0; + + /** + * ListViewsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListViewsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest instance + */ + ListViewsRequest.create = function create(properties) { + return new ListViewsRequest(properties); + }; + + /** + * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListViewsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListViewsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListViewsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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"; + return null; + }; + + /** + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest + */ + ListViewsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListViewsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListViewsRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListViewsRequest} message ListViewsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListViewsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; + + /** + * Converts this ListViewsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @instance + * @returns {Object.} JSON object + */ + ListViewsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListViewsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListViewsRequest"; + }; + + return ListViewsRequest; + })(); + + v1.ListViewsResponse = (function() { + + /** + * Properties of a ListViewsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListViewsResponse + * @property {Array.|null} [views] ListViewsResponse views + * @property {string|null} [nextPageToken] ListViewsResponse nextPageToken + */ + + /** + * Constructs a new ListViewsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListViewsResponse. + * @implements IListViewsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse=} [properties] Properties to set + */ + function ListViewsResponse(properties) { + this.views = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListViewsResponse views. + * @member {Array.} views + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @instance + */ + ListViewsResponse.prototype.views = $util.emptyArray; + + /** + * ListViewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @instance + */ + ListViewsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListViewsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse instance + */ + ListViewsResponse.create = function create(properties) { + return new ListViewsResponse(properties); + }; + + /** + * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.views != null && message.views.length) + for (var i = 0; i < message.views.length; ++i) + $root.google.cloud.contactcenterinsights.v1.View.encode(message.views[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 ListViewsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListViewsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.views && message.views.length)) + message.views = []; + message.views.push($root.google.cloud.contactcenterinsights.v1.View.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListViewsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListViewsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.views != null && message.hasOwnProperty("views")) { + if (!Array.isArray(message.views)) + return "views: array expected"; + for (var i = 0; i < message.views.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.View.verify(message.views[i]); + if (error) + return "views." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse + */ + ListViewsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListViewsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListViewsResponse(); + if (object.views) { + if (!Array.isArray(object.views)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListViewsResponse.views: array expected"); + message.views = []; + for (var i = 0; i < object.views.length; ++i) { + if (typeof object.views[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListViewsResponse.views: object expected"); + message.views[i] = $root.google.cloud.contactcenterinsights.v1.View.fromObject(object.views[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListViewsResponse} message ListViewsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListViewsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.views = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.views && message.views.length) { + object.views = []; + for (var j = 0; j < message.views.length; ++j) + object.views[j] = $root.google.cloud.contactcenterinsights.v1.View.toObject(message.views[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListViewsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @instance + * @returns {Object.} JSON object + */ + ListViewsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListViewsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListViewsResponse"; + }; + + return ListViewsResponse; + })(); + + v1.UpdateViewRequest = (function() { + + /** + * Properties of an UpdateViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateViewRequest + * @property {google.cloud.contactcenterinsights.v1.IView|null} [view] UpdateViewRequest view + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateViewRequest updateMask + */ + + /** + * Constructs a new UpdateViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateViewRequest. + * @implements IUpdateViewRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest=} [properties] Properties to set + */ + function UpdateViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateViewRequest view. + * @member {google.cloud.contactcenterinsights.v1.IView|null|undefined} view + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.view = null; + + /** + * UpdateViewRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateViewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest instance + */ + UpdateViewRequest.create = function create(properties) { + return new UpdateViewRequest(properties); + }; + + /** + * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateViewRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.cloud.contactcenterinsights.v1.View.encode(message.view, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.view = $root.google.cloud.contactcenterinsights.v1.View.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateViewRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateViewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.view != null && message.hasOwnProperty("view")) { + var error = $root.google.cloud.contactcenterinsights.v1.View.verify(message.view); + if (error) + return "view." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest + */ + UpdateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest(); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateViewRequest.view: object expected"); + message.view = $root.google.cloud.contactcenterinsights.v1.View.fromObject(object.view); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateViewRequest} message UpdateViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.view = null; + object.updateMask = null; + } + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.cloud.contactcenterinsights.v1.View.toObject(message.view, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateViewRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateViewRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateViewRequest"; + }; + + return UpdateViewRequest; + })(); + + v1.DeleteViewRequest = (function() { + + /** + * Properties of a DeleteViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteViewRequest + * @property {string|null} [name] DeleteViewRequest name + */ + + /** + * Constructs a new DeleteViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteViewRequest. + * @implements IDeleteViewRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest=} [properties] Properties to set + */ + function DeleteViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteViewRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @instance + */ + DeleteViewRequest.prototype.name = ""; + + /** + * Creates a new DeleteViewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest instance + */ + DeleteViewRequest.create = function create(properties) { + return new DeleteViewRequest(properties); + }; + + /** + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewRequest.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 DeleteViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteViewRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteViewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest + */ + DeleteViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteViewRequest} message DeleteViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteViewRequest.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 DeleteViewRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteViewRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteViewRequest"; + }; + + return DeleteViewRequest; + })(); + + v1.Conversation = (function() { + + /** + * Properties of a Conversation. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversation + * @property {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null} [callMetadata] Conversation callMetadata + * @property {google.protobuf.ITimestamp|null} [expireTime] Conversation expireTime + * @property {google.protobuf.IDuration|null} [ttl] Conversation ttl + * @property {string|null} [name] Conversation name + * @property {google.cloud.contactcenterinsights.v1.IConversationDataSource|null} [dataSource] Conversation dataSource + * @property {google.protobuf.ITimestamp|null} [createTime] Conversation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Conversation updateTime + * @property {google.protobuf.ITimestamp|null} [startTime] Conversation startTime + * @property {string|null} [languageCode] Conversation languageCode + * @property {string|null} [agentId] Conversation agentId + * @property {Object.|null} [labels] Conversation labels + * @property {google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null} [transcript] Conversation transcript + * @property {google.cloud.contactcenterinsights.v1.Conversation.Medium|null} [medium] Conversation medium + * @property {google.protobuf.IDuration|null} [duration] Conversation duration + * @property {number|null} [turnCount] Conversation turnCount + * @property {google.cloud.contactcenterinsights.v1.IAnalysis|null} [latestAnalysis] Conversation latestAnalysis + * @property {Array.|null} [runtimeAnnotations] Conversation runtimeAnnotations + * @property {Object.|null} [dialogflowIntents] Conversation dialogflowIntents + * @property {string|null} [obfuscatedUserId] Conversation obfuscatedUserId + */ + + /** + * Constructs a new Conversation. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a Conversation. + * @implements IConversation + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversation=} [properties] Properties to set + */ + function Conversation(properties) { + this.labels = {}; + this.runtimeAnnotations = []; + this.dialogflowIntents = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Conversation callMetadata. + * @member {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null|undefined} callMetadata + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.callMetadata = null; + + /** + * Conversation expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.expireTime = null; + + /** + * Conversation ttl. + * @member {google.protobuf.IDuration|null|undefined} ttl + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.ttl = null; + + /** + * Conversation name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.name = ""; + + /** + * Conversation dataSource. + * @member {google.cloud.contactcenterinsights.v1.IConversationDataSource|null|undefined} dataSource + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.dataSource = null; + + /** + * Conversation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.createTime = null; + + /** + * Conversation updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.updateTime = null; + + /** + * Conversation startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.startTime = null; + + /** + * Conversation languageCode. + * @member {string} languageCode + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.languageCode = ""; + + /** + * Conversation agentId. + * @member {string} agentId + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.agentId = ""; + + /** + * Conversation labels. + * @member {Object.} labels + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.labels = $util.emptyObject; + + /** + * Conversation transcript. + * @member {google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null|undefined} transcript + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.transcript = null; + + /** + * Conversation medium. + * @member {google.cloud.contactcenterinsights.v1.Conversation.Medium} medium + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.medium = 0; + + /** + * Conversation duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.duration = null; + + /** + * Conversation turnCount. + * @member {number} turnCount + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.turnCount = 0; + + /** + * Conversation latestAnalysis. + * @member {google.cloud.contactcenterinsights.v1.IAnalysis|null|undefined} latestAnalysis + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.latestAnalysis = null; + + /** + * Conversation runtimeAnnotations. + * @member {Array.} runtimeAnnotations + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.runtimeAnnotations = $util.emptyArray; + + /** + * Conversation dialogflowIntents. + * @member {Object.} dialogflowIntents + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.dialogflowIntents = $util.emptyObject; + + /** + * Conversation obfuscatedUserId. + * @member {string} obfuscatedUserId + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.obfuscatedUserId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Conversation metadata. + * @member {"callMetadata"|undefined} metadata + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Object.defineProperty(Conversation.prototype, "metadata", { + get: $util.oneOfGetter($oneOfFields = ["callMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Conversation expiration. + * @member {"expireTime"|"ttl"|undefined} expiration + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Object.defineProperty(Conversation.prototype, "expiration", { + get: $util.oneOfGetter($oneOfFields = ["expireTime", "ttl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Conversation instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversation=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation instance + */ + Conversation.create = function create(properties) { + return new Conversation(properties); + }; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {google.cloud.contactcenterinsights.v1.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.encode(message.dataSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.agentId); + 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 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.callMetadata != null && Object.hasOwnProperty.call(message, "callMetadata")) + $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.encode(message.callMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.encode(message.transcript, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.medium != null && Object.hasOwnProperty.call(message, "medium")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.medium); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.turnCount != null && Object.hasOwnProperty.call(message, "turnCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.turnCount); + if (message.latestAnalysis != null && Object.hasOwnProperty.call(message, "latestAnalysis")) + $root.google.cloud.contactcenterinsights.v1.Analysis.encode(message.latestAnalysis, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.runtimeAnnotations != null && message.runtimeAnnotations.length) + for (var i = 0; i < message.runtimeAnnotations.length; ++i) + $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.encode(message.runtimeAnnotations[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.languageCode); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) + $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.dialogflowIntents != null && Object.hasOwnProperty.call(message, "dialogflowIntents")) + for (var keys = Object.keys(message.dialogflowIntents), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.encode(message.dialogflowIntents[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.obfuscatedUserId != null && Object.hasOwnProperty.call(message, "obfuscatedUserId")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.obfuscatedUserId); + return writer; + }; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {google.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + message.callMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.decode(reader, reader.uint32()); + break; + } + case 15: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 16: { + message.ttl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dataSource = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { + message.languageCode = reader.string(); + break; + } + case 5: { + message.agentId = reader.string(); + break; + } + case 6: { + 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); + break; + } + } + message.labels[key] = value; + break; + } + case 8: { + message.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.decode(reader, reader.uint32()); + break; + } + case 9: { + message.medium = reader.int32(); + break; + } + case 10: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 11: { + message.turnCount = reader.int32(); + break; + } + case 12: { + message.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32()); + break; + } + case 13: { + if (!(message.runtimeAnnotations && message.runtimeAnnotations.length)) + message.runtimeAnnotations = []; + message.runtimeAnnotations.push($root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.decode(reader, reader.uint32())); + break; + } + case 18: { + if (message.dialogflowIntents === $util.emptyObject) + message.dialogflowIntents = {}; + 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.cloud.contactcenterinsights.v1.DialogflowIntent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.dialogflowIntents[key] = value; + break; + } + case 21: { + message.obfuscatedUserId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.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) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.callMetadata != null && message.hasOwnProperty("callMetadata")) { + properties.metadata = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify(message.callMetadata); + if (error) + return "callMetadata." + error; + } + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + properties.expiration = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + } + if (message.ttl != null && message.hasOwnProperty("ttl")) { + if (properties.expiration === 1) + return "expiration: multiple values"; + properties.expiration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.ttl); + if (error) + return "ttl." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.verify(message.dataSource); + if (error) + return "dataSource." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.agentId != null && message.hasOwnProperty("agentId")) + if (!$util.isString(message.agentId)) + return "agentId: 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.transcript != null && message.hasOwnProperty("transcript")) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify(message.transcript); + if (error) + return "transcript." + error; + } + if (message.medium != null && message.hasOwnProperty("medium")) + switch (message.medium) { + default: + return "medium: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.turnCount != null && message.hasOwnProperty("turnCount")) + if (!$util.isInteger(message.turnCount)) + return "turnCount: integer expected"; + if (message.latestAnalysis != null && message.hasOwnProperty("latestAnalysis")) { + var error = $root.google.cloud.contactcenterinsights.v1.Analysis.verify(message.latestAnalysis); + if (error) + return "latestAnalysis." + error; + } + if (message.runtimeAnnotations != null && message.hasOwnProperty("runtimeAnnotations")) { + if (!Array.isArray(message.runtimeAnnotations)) + return "runtimeAnnotations: array expected"; + for (var i = 0; i < message.runtimeAnnotations.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify(message.runtimeAnnotations[i]); + if (error) + return "runtimeAnnotations." + error; + } + } + if (message.dialogflowIntents != null && message.hasOwnProperty("dialogflowIntents")) { + if (!$util.isObject(message.dialogflowIntents)) + return "dialogflowIntents: object expected"; + var key = Object.keys(message.dialogflowIntents); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.verify(message.dialogflowIntents[key[i]]); + if (error) + return "dialogflowIntents." + error; + } + } + if (message.obfuscatedUserId != null && message.hasOwnProperty("obfuscatedUserId")) + if (!$util.isString(message.obfuscatedUserId)) + return "obfuscatedUserId: string expected"; + return null; + }; + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation + */ + Conversation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation(); + if (object.callMetadata != null) { + if (typeof object.callMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.callMetadata: object expected"); + message.callMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.fromObject(object.callMetadata); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.ttl != null) { + if (typeof object.ttl !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.ttl: object expected"); + message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl); + } + if (object.name != null) + message.name = String(object.name); + if (object.dataSource != null) { + if (typeof object.dataSource !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.dataSource: object expected"); + message.dataSource = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.fromObject(object.dataSource); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.agentId != null) + message.agentId = String(object.agentId); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.transcript != null) { + if (typeof object.transcript !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.transcript: object expected"); + message.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.fromObject(object.transcript); + } + switch (object.medium) { + default: + if (typeof object.medium === "number") { + message.medium = object.medium; + break; + } + break; + case "MEDIUM_UNSPECIFIED": + case 0: + message.medium = 0; + break; + case "PHONE_CALL": + case 1: + message.medium = 1; + break; + case "CHAT": + case 2: + message.medium = 2; + break; + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.turnCount != null) + message.turnCount = object.turnCount | 0; + if (object.latestAnalysis != null) { + if (typeof object.latestAnalysis !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.latestAnalysis: object expected"); + message.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.latestAnalysis); + } + if (object.runtimeAnnotations) { + if (!Array.isArray(object.runtimeAnnotations)) + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.runtimeAnnotations: array expected"); + message.runtimeAnnotations = []; + for (var i = 0; i < object.runtimeAnnotations.length; ++i) { + if (typeof object.runtimeAnnotations[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.runtimeAnnotations: object expected"); + message.runtimeAnnotations[i] = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.fromObject(object.runtimeAnnotations[i]); + } + } + if (object.dialogflowIntents) { + if (typeof object.dialogflowIntents !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.dialogflowIntents: object expected"); + message.dialogflowIntents = {}; + for (var keys = Object.keys(object.dialogflowIntents), i = 0; i < keys.length; ++i) { + if (typeof object.dialogflowIntents[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.dialogflowIntents: object expected"); + message.dialogflowIntents[keys[i]] = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.fromObject(object.dialogflowIntents[keys[i]]); + } + } + if (object.obfuscatedUserId != null) + message.obfuscatedUserId = String(object.obfuscatedUserId); + return message; + }; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {google.cloud.contactcenterinsights.v1.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.runtimeAnnotations = []; + if (options.objects || options.defaults) { + object.labels = {}; + object.dialogflowIntents = {}; + } + if (options.defaults) { + object.name = ""; + object.dataSource = null; + object.createTime = null; + object.updateTime = null; + object.agentId = ""; + object.transcript = null; + object.medium = options.enums === String ? "MEDIUM_UNSPECIFIED" : 0; + object.duration = null; + object.turnCount = 0; + object.latestAnalysis = null; + object.languageCode = ""; + object.startTime = null; + object.obfuscatedUserId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.toObject(message.dataSource, 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.agentId != null && message.hasOwnProperty("agentId")) + object.agentId = message.agentId; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.callMetadata != null && message.hasOwnProperty("callMetadata")) { + object.callMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.toObject(message.callMetadata, options); + if (options.oneofs) + object.metadata = "callMetadata"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) + object.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.toObject(message.transcript, options); + if (message.medium != null && message.hasOwnProperty("medium")) + object.medium = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] === undefined ? message.medium : $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] : message.medium; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.turnCount != null && message.hasOwnProperty("turnCount")) + object.turnCount = message.turnCount; + if (message.latestAnalysis != null && message.hasOwnProperty("latestAnalysis")) + object.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.toObject(message.latestAnalysis, options); + if (message.runtimeAnnotations && message.runtimeAnnotations.length) { + object.runtimeAnnotations = []; + for (var j = 0; j < message.runtimeAnnotations.length; ++j) + object.runtimeAnnotations[j] = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.toObject(message.runtimeAnnotations[j], options); + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (options.oneofs) + object.expiration = "expireTime"; + } + if (message.ttl != null && message.hasOwnProperty("ttl")) { + object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options); + if (options.oneofs) + object.expiration = "ttl"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.dialogflowIntents && (keys2 = Object.keys(message.dialogflowIntents)).length) { + object.dialogflowIntents = {}; + for (var j = 0; j < keys2.length; ++j) + object.dialogflowIntents[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.toObject(message.dialogflowIntents[keys2[j]], options); + } + if (message.obfuscatedUserId != null && message.hasOwnProperty("obfuscatedUserId")) + object.obfuscatedUserId = message.obfuscatedUserId; + return object; + }; + + /** + * Converts this Conversation to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.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.cloud.contactcenterinsights.v1.Conversation"; + }; + + Conversation.CallMetadata = (function() { + + /** + * Properties of a CallMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @interface ICallMetadata + * @property {number|null} [customerChannel] CallMetadata customerChannel + * @property {number|null} [agentChannel] CallMetadata agentChannel + */ + + /** + * Constructs a new CallMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @classdesc Represents a CallMetadata. + * @implements ICallMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata=} [properties] Properties to set + */ + function CallMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CallMetadata customerChannel. + * @member {number} customerChannel + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @instance + */ + CallMetadata.prototype.customerChannel = 0; + + /** + * CallMetadata agentChannel. + * @member {number} agentChannel + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @instance + */ + CallMetadata.prototype.agentChannel = 0; + + /** + * Creates a new CallMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata instance + */ + CallMetadata.create = function create(properties) { + return new CallMetadata(properties); + }; + + /** + * Encodes the specified CallMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata} message CallMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customerChannel != null && Object.hasOwnProperty.call(message, "customerChannel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.customerChannel); + if (message.agentChannel != null && Object.hasOwnProperty.call(message, "agentChannel")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.agentChannel); + return writer; + }; + + /** + * Encodes the specified CallMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata} message CallMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CallMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.customerChannel = reader.int32(); + break; + } + case 2: { + message.agentChannel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CallMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CallMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CallMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customerChannel != null && message.hasOwnProperty("customerChannel")) + if (!$util.isInteger(message.customerChannel)) + return "customerChannel: integer expected"; + if (message.agentChannel != null && message.hasOwnProperty("agentChannel")) + if (!$util.isInteger(message.agentChannel)) + return "agentChannel: integer expected"; + return null; + }; + + /** + * Creates a CallMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata + */ + CallMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata(); + if (object.customerChannel != null) + message.customerChannel = object.customerChannel | 0; + if (object.agentChannel != null) + message.agentChannel = object.agentChannel | 0; + return message; + }; + + /** + * Creates a plain object from a CallMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} message CallMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CallMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.customerChannel = 0; + object.agentChannel = 0; + } + if (message.customerChannel != null && message.hasOwnProperty("customerChannel")) + object.customerChannel = message.customerChannel; + if (message.agentChannel != null && message.hasOwnProperty("agentChannel")) + object.agentChannel = message.agentChannel; + return object; + }; + + /** + * Converts this CallMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @instance + * @returns {Object.} JSON object + */ + CallMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CallMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.CallMetadata"; + }; + + return CallMetadata; + })(); + + Conversation.Transcript = (function() { + + /** + * Properties of a Transcript. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @interface ITranscript + * @property {Array.|null} [transcriptSegments] Transcript transcriptSegments + */ + + /** + * Constructs a new Transcript. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @classdesc Represents a Transcript. + * @implements ITranscript + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript=} [properties] Properties to set + */ + function Transcript(properties) { + this.transcriptSegments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Transcript transcriptSegments. + * @member {Array.} transcriptSegments + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @instance + */ + Transcript.prototype.transcriptSegments = $util.emptyArray; + + /** + * Creates a new Transcript instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript instance + */ + Transcript.create = function create(properties) { + return new Transcript(properties); + }; + + /** + * Encodes the specified Transcript message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript} message Transcript message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transcript.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transcriptSegments != null && message.transcriptSegments.length) + for (var i = 0; i < message.transcriptSegments.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.encode(message.transcriptSegments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Transcript message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript} message Transcript message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transcript.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Transcript message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transcript.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.transcriptSegments && message.transcriptSegments.length)) + message.transcriptSegments = []; + message.transcriptSegments.push($root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Transcript message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transcript.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Transcript message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Transcript.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transcriptSegments != null && message.hasOwnProperty("transcriptSegments")) { + if (!Array.isArray(message.transcriptSegments)) + return "transcriptSegments: array expected"; + for (var i = 0; i < message.transcriptSegments.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify(message.transcriptSegments[i]); + if (error) + return "transcriptSegments." + error; + } + } + return null; + }; + + /** + * Creates a Transcript message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript + */ + Transcript.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript(); + if (object.transcriptSegments) { + if (!Array.isArray(object.transcriptSegments)) + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.transcriptSegments: array expected"); + message.transcriptSegments = []; + for (var i = 0; i < object.transcriptSegments.length; ++i) { + if (typeof object.transcriptSegments[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.transcriptSegments: object expected"); + message.transcriptSegments[i] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.fromObject(object.transcriptSegments[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Transcript message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript} message Transcript + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Transcript.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transcriptSegments = []; + if (message.transcriptSegments && message.transcriptSegments.length) { + object.transcriptSegments = []; + for (var j = 0; j < message.transcriptSegments.length; ++j) + object.transcriptSegments[j] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.toObject(message.transcriptSegments[j], options); + } + return object; + }; + + /** + * Converts this Transcript to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @instance + * @returns {Object.} JSON object + */ + Transcript.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Transcript + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Transcript.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript"; + }; + + Transcript.TranscriptSegment = (function() { + + /** + * Properties of a TranscriptSegment. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @interface ITranscriptSegment + * @property {google.protobuf.ITimestamp|null} [messageTime] TranscriptSegment messageTime + * @property {string|null} [text] TranscriptSegment text + * @property {number|null} [confidence] TranscriptSegment confidence + * @property {Array.|null} [words] TranscriptSegment words + * @property {string|null} [languageCode] TranscriptSegment languageCode + * @property {number|null} [channelTag] TranscriptSegment channelTag + * @property {google.cloud.contactcenterinsights.v1.IConversationParticipant|null} [segmentParticipant] TranscriptSegment segmentParticipant + * @property {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null} [dialogflowSegmentMetadata] TranscriptSegment dialogflowSegmentMetadata + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentiment] TranscriptSegment sentiment + */ + + /** + * Constructs a new TranscriptSegment. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @classdesc Represents a TranscriptSegment. + * @implements ITranscriptSegment + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment=} [properties] Properties to set + */ + function TranscriptSegment(properties) { + this.words = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TranscriptSegment messageTime. + * @member {google.protobuf.ITimestamp|null|undefined} messageTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.messageTime = null; + + /** + * TranscriptSegment text. + * @member {string} text + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.text = ""; + + /** + * TranscriptSegment confidence. + * @member {number} confidence + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.confidence = 0; + + /** + * TranscriptSegment words. + * @member {Array.} words + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.words = $util.emptyArray; + + /** + * TranscriptSegment languageCode. + * @member {string} languageCode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.languageCode = ""; + + /** + * TranscriptSegment channelTag. + * @member {number} channelTag + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.channelTag = 0; + + /** + * TranscriptSegment segmentParticipant. + * @member {google.cloud.contactcenterinsights.v1.IConversationParticipant|null|undefined} segmentParticipant + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.segmentParticipant = null; + + /** + * TranscriptSegment dialogflowSegmentMetadata. + * @member {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null|undefined} dialogflowSegmentMetadata + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.dialogflowSegmentMetadata = null; + + /** + * TranscriptSegment sentiment. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentiment + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.sentiment = null; + + /** + * Creates a new TranscriptSegment instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment instance + */ + TranscriptSegment.create = function create(properties) { + return new TranscriptSegment(properties); + }; + + /** + * Encodes the specified TranscriptSegment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment} message TranscriptSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranscriptSegment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + if (message.words != null && message.words.length) + for (var i = 0; i < message.words.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.channelTag); + if (message.messageTime != null && Object.hasOwnProperty.call(message, "messageTime")) + $root.google.protobuf.Timestamp.encode(message.messageTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.segmentParticipant != null && Object.hasOwnProperty.call(message, "segmentParticipant")) + $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.encode(message.segmentParticipant, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dialogflowSegmentMetadata != null && Object.hasOwnProperty.call(message, "dialogflowSegmentMetadata")) + $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.encode(message.dialogflowSegmentMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentiment, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TranscriptSegment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment} message TranscriptSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranscriptSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranscriptSegment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranscriptSegment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: { + message.messageTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.confidence = reader.float(); + break; + } + case 3: { + if (!(message.words && message.words.length)) + message.words = []; + message.words.push($root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.decode(reader, reader.uint32())); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + case 5: { + message.channelTag = reader.int32(); + break; + } + case 9: { + message.segmentParticipant = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.decode(reader, reader.uint32()); + break; + } + case 10: { + message.dialogflowSegmentMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.decode(reader, reader.uint32()); + break; + } + case 11: { + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranscriptSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranscriptSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranscriptSegment message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranscriptSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageTime != null && message.hasOwnProperty("messageTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.messageTime); + if (error) + return "messageTime." + error; + } + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + 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) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify(message.words[i]); + if (error) + return "words." + error; + } + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (!$util.isInteger(message.channelTag)) + return "channelTag: integer expected"; + if (message.segmentParticipant != null && message.hasOwnProperty("segmentParticipant")) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.verify(message.segmentParticipant); + if (error) + return "segmentParticipant." + error; + } + if (message.dialogflowSegmentMetadata != null && message.hasOwnProperty("dialogflowSegmentMetadata")) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify(message.dialogflowSegmentMetadata); + if (error) + return "dialogflowSegmentMetadata." + error; + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates a TranscriptSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment + */ + TranscriptSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment(); + if (object.messageTime != null) { + if (typeof object.messageTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.messageTime: object expected"); + message.messageTime = $root.google.protobuf.Timestamp.fromObject(object.messageTime); + } + if (object.text != null) + message.text = String(object.text); + if (object.confidence != null) + message.confidence = Number(object.confidence); + if (object.words) { + if (!Array.isArray(object.words)) + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.words: array expected"); + message.words = []; + for (var i = 0; i < object.words.length; ++i) { + if (typeof object.words[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.words: object expected"); + message.words[i] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.fromObject(object.words[i]); + } + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.channelTag != null) + message.channelTag = object.channelTag | 0; + if (object.segmentParticipant != null) { + if (typeof object.segmentParticipant !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.segmentParticipant: object expected"); + message.segmentParticipant = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.fromObject(object.segmentParticipant); + } + if (object.dialogflowSegmentMetadata != null) { + if (typeof object.dialogflowSegmentMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.dialogflowSegmentMetadata: object expected"); + message.dialogflowSegmentMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.fromObject(object.dialogflowSegmentMetadata); + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.sentiment: object expected"); + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from a TranscriptSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} message TranscriptSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranscriptSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.words = []; + if (options.defaults) { + object.text = ""; + object.confidence = 0; + object.languageCode = ""; + object.channelTag = 0; + object.messageTime = null; + object.segmentParticipant = null; + object.dialogflowSegmentMetadata = null; + object.sentiment = null; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.words && message.words.length) { + object.words = []; + for (var j = 0; j < message.words.length; ++j) + object.words[j] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.toObject(message.words[j], options); + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + object.channelTag = message.channelTag; + if (message.messageTime != null && message.hasOwnProperty("messageTime")) + object.messageTime = $root.google.protobuf.Timestamp.toObject(message.messageTime, options); + if (message.segmentParticipant != null && message.hasOwnProperty("segmentParticipant")) + object.segmentParticipant = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.toObject(message.segmentParticipant, options); + if (message.dialogflowSegmentMetadata != null && message.hasOwnProperty("dialogflowSegmentMetadata")) + object.dialogflowSegmentMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.toObject(message.dialogflowSegmentMetadata, options); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this TranscriptSegment to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + * @returns {Object.} JSON object + */ + TranscriptSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranscriptSegment + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranscriptSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment"; + }; + + TranscriptSegment.WordInfo = (function() { + + /** + * Properties of a WordInfo. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @interface IWordInfo + * @property {google.protobuf.IDuration|null} [startOffset] WordInfo startOffset + * @property {google.protobuf.IDuration|null} [endOffset] WordInfo endOffset + * @property {string|null} [word] WordInfo word + * @property {number|null} [confidence] WordInfo confidence + */ + + /** + * Constructs a new WordInfo. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @classdesc Represents a WordInfo. + * @implements IWordInfo + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo=} [properties] Properties to set + */ + function WordInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WordInfo startOffset. + * @member {google.protobuf.IDuration|null|undefined} startOffset + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @instance + */ + WordInfo.prototype.startOffset = null; + + /** + * WordInfo endOffset. + * @member {google.protobuf.IDuration|null|undefined} endOffset + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @instance + */ + WordInfo.prototype.endOffset = null; + + /** + * WordInfo word. + * @member {string} word + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @instance + */ + WordInfo.prototype.word = ""; + + /** + * WordInfo confidence. + * @member {number} confidence + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @instance + */ + WordInfo.prototype.confidence = 0; + + /** + * Creates a new WordInfo instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo instance + */ + WordInfo.create = function create(properties) { + return new WordInfo(properties); + }; + + /** + * Encodes the specified WordInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo} message WordInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WordInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset")) + $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) + $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.word != null && Object.hasOwnProperty.call(message, "word")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.word); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified WordInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo} message WordInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WordInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WordInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WordInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.word = reader.string(); + break; + } + case 4: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WordInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WordInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WordInfo message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WordInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startOffset != null && message.hasOwnProperty("startOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startOffset); + if (error) + return "startOffset." + error; + } + if (message.endOffset != null && message.hasOwnProperty("endOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endOffset); + if (error) + return "endOffset." + error; + } + if (message.word != null && message.hasOwnProperty("word")) + if (!$util.isString(message.word)) + return "word: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + return null; + }; + + /** + * Creates a WordInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo + */ + WordInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo(); + if (object.startOffset != null) { + if (typeof object.startOffset !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.startOffset: object expected"); + message.startOffset = $root.google.protobuf.Duration.fromObject(object.startOffset); + } + if (object.endOffset != null) { + if (typeof object.endOffset !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.endOffset: object expected"); + message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); + } + if (object.word != null) + message.word = String(object.word); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a WordInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} message WordInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WordInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startOffset = null; + object.endOffset = null; + object.word = ""; + object.confidence = 0; + } + if (message.startOffset != null && message.hasOwnProperty("startOffset")) + object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); + if (message.endOffset != null && message.hasOwnProperty("endOffset")) + object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); + if (message.word != null && message.hasOwnProperty("word")) + object.word = message.word; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + return object; + }; + + /** + * Converts this WordInfo to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @instance + * @returns {Object.} JSON object + */ + WordInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WordInfo + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WordInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo"; + }; + + return WordInfo; + })(); + + TranscriptSegment.DialogflowSegmentMetadata = (function() { + + /** + * Properties of a DialogflowSegmentMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @interface IDialogflowSegmentMetadata + * @property {boolean|null} [smartReplyAllowlistCovered] DialogflowSegmentMetadata smartReplyAllowlistCovered + */ + + /** + * Constructs a new DialogflowSegmentMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @classdesc Represents a DialogflowSegmentMetadata. + * @implements IDialogflowSegmentMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata=} [properties] Properties to set + */ + function DialogflowSegmentMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DialogflowSegmentMetadata smartReplyAllowlistCovered. + * @member {boolean} smartReplyAllowlistCovered + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @instance + */ + DialogflowSegmentMetadata.prototype.smartReplyAllowlistCovered = false; + + /** + * Creates a new DialogflowSegmentMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata instance + */ + DialogflowSegmentMetadata.create = function create(properties) { + return new DialogflowSegmentMetadata(properties); + }; + + /** + * Encodes the specified DialogflowSegmentMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata} message DialogflowSegmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowSegmentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.smartReplyAllowlistCovered != null && Object.hasOwnProperty.call(message, "smartReplyAllowlistCovered")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.smartReplyAllowlistCovered); + return writer; + }; + + /** + * Encodes the specified DialogflowSegmentMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata} message DialogflowSegmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowSegmentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowSegmentMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.smartReplyAllowlistCovered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowSegmentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DialogflowSegmentMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DialogflowSegmentMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.smartReplyAllowlistCovered != null && message.hasOwnProperty("smartReplyAllowlistCovered")) + if (typeof message.smartReplyAllowlistCovered !== "boolean") + return "smartReplyAllowlistCovered: boolean expected"; + return null; + }; + + /** + * Creates a DialogflowSegmentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata + */ + DialogflowSegmentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata(); + if (object.smartReplyAllowlistCovered != null) + message.smartReplyAllowlistCovered = Boolean(object.smartReplyAllowlistCovered); + return message; + }; + + /** + * Creates a plain object from a DialogflowSegmentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} message DialogflowSegmentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DialogflowSegmentMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.smartReplyAllowlistCovered = false; + if (message.smartReplyAllowlistCovered != null && message.hasOwnProperty("smartReplyAllowlistCovered")) + object.smartReplyAllowlistCovered = message.smartReplyAllowlistCovered; + return object; + }; + + /** + * Converts this DialogflowSegmentMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @instance + * @returns {Object.} JSON object + */ + DialogflowSegmentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DialogflowSegmentMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DialogflowSegmentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata"; + }; + + return DialogflowSegmentMetadata; + })(); + + return TranscriptSegment; + })(); + + return Transcript; + })(); + + /** + * Medium enum. + * @name google.cloud.contactcenterinsights.v1.Conversation.Medium + * @enum {number} + * @property {number} MEDIUM_UNSPECIFIED=0 MEDIUM_UNSPECIFIED value + * @property {number} PHONE_CALL=1 PHONE_CALL value + * @property {number} CHAT=2 CHAT value + */ + Conversation.Medium = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEDIUM_UNSPECIFIED"] = 0; + values[valuesById[1] = "PHONE_CALL"] = 1; + values[valuesById[2] = "CHAT"] = 2; + return values; + })(); + + return Conversation; + })(); + + v1.Analysis = (function() { + + /** + * Properties of an Analysis. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IAnalysis + * @property {string|null} [name] Analysis name + * @property {google.protobuf.ITimestamp|null} [requestTime] Analysis requestTime + * @property {google.protobuf.ITimestamp|null} [createTime] Analysis createTime + * @property {google.cloud.contactcenterinsights.v1.IAnalysisResult|null} [analysisResult] Analysis analysisResult + */ + + /** + * Constructs a new Analysis. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an Analysis. + * @implements IAnalysis + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IAnalysis=} [properties] Properties to set + */ + function Analysis(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Analysis name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.name = ""; + + /** + * Analysis requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.requestTime = null; + + /** + * Analysis createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.createTime = null; + + /** + * Analysis analysisResult. + * @member {google.cloud.contactcenterinsights.v1.IAnalysisResult|null|undefined} analysisResult + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.analysisResult = null; + + /** + * Creates a new Analysis instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysis=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis instance + */ + Analysis.create = function create(properties) { + return new Analysis(properties); + }; + + /** + * Encodes the specified Analysis message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysis} message Analysis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Analysis.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.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.analysisResult != null && Object.hasOwnProperty.call(message, "analysisResult")) + $root.google.cloud.contactcenterinsights.v1.AnalysisResult.encode(message.analysisResult, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Analysis message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysis} message Analysis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Analysis.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Analysis message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Analysis.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Analysis(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Analysis message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Analysis.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Analysis message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Analysis.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.analysisResult != null && message.hasOwnProperty("analysisResult")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.verify(message.analysisResult); + if (error) + return "analysisResult." + error; + } + return null; + }; + + /** + * Creates an Analysis message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis + */ + Analysis.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Analysis) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Analysis(); + if (object.name != null) + message.name = String(object.name); + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.analysisResult != null) { + if (typeof object.analysisResult !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.analysisResult: object expected"); + message.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.fromObject(object.analysisResult); + } + return message; + }; + + /** + * Creates a plain object from an Analysis message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {google.cloud.contactcenterinsights.v1.Analysis} message Analysis + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Analysis.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestTime = null; + object.createTime = null; + object.analysisResult = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.analysisResult != null && message.hasOwnProperty("analysisResult")) + object.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.toObject(message.analysisResult, options); + return object; + }; + + /** + * Converts this Analysis to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + * @returns {Object.} JSON object + */ + Analysis.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Analysis + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Analysis.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Analysis"; + }; + + return Analysis; + })(); + + v1.ConversationDataSource = (function() { + + /** + * Properties of a ConversationDataSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversationDataSource + * @property {google.cloud.contactcenterinsights.v1.IGcsSource|null} [gcsSource] ConversationDataSource gcsSource + * @property {google.cloud.contactcenterinsights.v1.IDialogflowSource|null} [dialogflowSource] ConversationDataSource dialogflowSource + */ + + /** + * Constructs a new ConversationDataSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ConversationDataSource. + * @implements IConversationDataSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource=} [properties] Properties to set + */ + function ConversationDataSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationDataSource gcsSource. + * @member {google.cloud.contactcenterinsights.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @instance + */ + ConversationDataSource.prototype.gcsSource = null; + + /** + * ConversationDataSource dialogflowSource. + * @member {google.cloud.contactcenterinsights.v1.IDialogflowSource|null|undefined} dialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @instance + */ + ConversationDataSource.prototype.dialogflowSource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationDataSource source. + * @member {"gcsSource"|"dialogflowSource"|undefined} source + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @instance + */ + Object.defineProperty(ConversationDataSource.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource", "dialogflowSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationDataSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource instance + */ + ConversationDataSource.create = function create(properties) { + return new ConversationDataSource(properties); + }; + + /** + * Encodes the specified ConversationDataSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource} message ConversationDataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationDataSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.contactcenterinsights.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dialogflowSource != null && Object.hasOwnProperty.call(message, "dialogflowSource")) + $root.google.cloud.contactcenterinsights.v1.DialogflowSource.encode(message.dialogflowSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationDataSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource} message ConversationDataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationDataSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationDataSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationDataSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationDataSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.GcsSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dialogflowSource = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationDataSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationDataSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationDataSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationDataSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.dialogflowSource != null && message.hasOwnProperty("dialogflowSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.verify(message.dialogflowSource); + if (error) + return "dialogflowSource." + error; + } + } + return null; + }; + + /** + * Creates a ConversationDataSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource + */ + ConversationDataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationDataSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationDataSource(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationDataSource.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.GcsSource.fromObject(object.gcsSource); + } + if (object.dialogflowSource != null) { + if (typeof object.dialogflowSource !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationDataSource.dialogflowSource: object expected"); + message.dialogflowSource = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.fromObject(object.dialogflowSource); + } + return message; + }; + + /** + * Creates a plain object from a ConversationDataSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {google.cloud.contactcenterinsights.v1.ConversationDataSource} message ConversationDataSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationDataSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.contactcenterinsights.v1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.dialogflowSource != null && message.hasOwnProperty("dialogflowSource")) { + object.dialogflowSource = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.toObject(message.dialogflowSource, options); + if (options.oneofs) + object.source = "dialogflowSource"; + } + return object; + }; + + /** + * Converts this ConversationDataSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @instance + * @returns {Object.} JSON object + */ + ConversationDataSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationDataSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationDataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationDataSource"; + }; + + return ConversationDataSource; + })(); + + v1.GcsSource = (function() { + + /** + * Properties of a GcsSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGcsSource + * @property {string|null} [audioUri] GcsSource audioUri + * @property {string|null} [transcriptUri] GcsSource transcriptUri + */ + + /** + * Constructs a new GcsSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GcsSource. + * @implements IGcsSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGcsSource=} [properties] Properties to set + */ + function GcsSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsSource audioUri. + * @member {string} audioUri + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @instance + */ + GcsSource.prototype.audioUri = ""; + + /** + * GcsSource transcriptUri. + * @member {string} transcriptUri + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @instance + */ + GcsSource.prototype.transcriptUri = ""; + + /** + * Creates a new GcsSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource instance + */ + GcsSource.create = function create(properties) { + return new GcsSource(properties); + }; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.audioUri); + if (message.transcriptUri != null && Object.hasOwnProperty.call(message, "transcriptUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.transcriptUri); + return writer; + }; + + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioUri = reader.string(); + break; + } + case 2: { + message.transcriptUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + if (!$util.isString(message.audioUri)) + return "audioUri: string expected"; + if (message.transcriptUri != null && message.hasOwnProperty("transcriptUri")) + if (!$util.isString(message.transcriptUri)) + return "transcriptUri: string expected"; + return null; + }; + + /** + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource + */ + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GcsSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GcsSource(); + if (object.audioUri != null) + message.audioUri = String(object.audioUri); + if (object.transcriptUri != null) + message.transcriptUri = String(object.transcriptUri); + return message; + }; + + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.GcsSource} message GcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.audioUri = ""; + object.transcriptUri = ""; + } + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + object.audioUri = message.audioUri; + if (message.transcriptUri != null && message.hasOwnProperty("transcriptUri")) + object.transcriptUri = message.transcriptUri; + return object; + }; + + /** + * Converts this GcsSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @instance + * @returns {Object.} JSON object + */ + GcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GcsSource"; + }; + + return GcsSource; + })(); + + v1.DialogflowSource = (function() { + + /** + * Properties of a DialogflowSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDialogflowSource + * @property {string|null} [dialogflowConversation] DialogflowSource dialogflowConversation + * @property {string|null} [audioUri] DialogflowSource audioUri + */ + + /** + * Constructs a new DialogflowSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DialogflowSource. + * @implements IDialogflowSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource=} [properties] Properties to set + */ + function DialogflowSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DialogflowSource dialogflowConversation. + * @member {string} dialogflowConversation + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @instance + */ + DialogflowSource.prototype.dialogflowConversation = ""; + + /** + * DialogflowSource audioUri. + * @member {string} audioUri + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @instance + */ + DialogflowSource.prototype.audioUri = ""; + + /** + * Creates a new DialogflowSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource instance + */ + DialogflowSource.create = function create(properties) { + return new DialogflowSource(properties); + }; + + /** + * Encodes the specified DialogflowSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource} message DialogflowSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dialogflowConversation != null && Object.hasOwnProperty.call(message, "dialogflowConversation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dialogflowConversation); + if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audioUri); + return writer; + }; + + /** + * Encodes the specified DialogflowSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource} message DialogflowSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DialogflowSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DialogflowSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dialogflowConversation = reader.string(); + break; + } + case 3: { + message.audioUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DialogflowSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DialogflowSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DialogflowSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dialogflowConversation != null && message.hasOwnProperty("dialogflowConversation")) + if (!$util.isString(message.dialogflowConversation)) + return "dialogflowConversation: string expected"; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + if (!$util.isString(message.audioUri)) + return "audioUri: string expected"; + return null; + }; + + /** + * Creates a DialogflowSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource + */ + DialogflowSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DialogflowSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DialogflowSource(); + if (object.dialogflowConversation != null) + message.dialogflowConversation = String(object.dialogflowConversation); + if (object.audioUri != null) + message.audioUri = String(object.audioUri); + return message; + }; + + /** + * Creates a plain object from a DialogflowSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {google.cloud.contactcenterinsights.v1.DialogflowSource} message DialogflowSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DialogflowSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dialogflowConversation = ""; + object.audioUri = ""; + } + if (message.dialogflowConversation != null && message.hasOwnProperty("dialogflowConversation")) + object.dialogflowConversation = message.dialogflowConversation; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + object.audioUri = message.audioUri; + return object; + }; + + /** + * Converts this DialogflowSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @instance + * @returns {Object.} JSON object + */ + DialogflowSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DialogflowSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DialogflowSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DialogflowSource"; + }; + + return DialogflowSource; + })(); + + v1.AnalysisResult = (function() { + + /** + * Properties of an AnalysisResult. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IAnalysisResult + * @property {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null} [callAnalysisMetadata] AnalysisResult callAnalysisMetadata + * @property {google.protobuf.ITimestamp|null} [endTime] AnalysisResult endTime + */ + + /** + * Constructs a new AnalysisResult. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an AnalysisResult. + * @implements IAnalysisResult + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult=} [properties] Properties to set + */ + function AnalysisResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisResult callAnalysisMetadata. + * @member {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null|undefined} callAnalysisMetadata + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @instance + */ + AnalysisResult.prototype.callAnalysisMetadata = null; + + /** + * AnalysisResult endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @instance + */ + AnalysisResult.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnalysisResult metadata. + * @member {"callAnalysisMetadata"|undefined} metadata + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @instance + */ + Object.defineProperty(AnalysisResult.prototype, "metadata", { + get: $util.oneOfGetter($oneOfFields = ["callAnalysisMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnalysisResult instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult instance + */ + AnalysisResult.create = function create(properties) { + return new AnalysisResult(properties); + }; + + /** + * Encodes the specified AnalysisResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult} message AnalysisResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.callAnalysisMetadata != null && Object.hasOwnProperty.call(message, "callAnalysisMetadata")) + $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.encode(message.callAnalysisMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnalysisResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult} message AnalysisResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.callAnalysisMetadata = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.decode(reader, reader.uint32()); + break; + } + case 1: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisResult message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.callAnalysisMetadata != null && message.hasOwnProperty("callAnalysisMetadata")) { + properties.metadata = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify(message.callAnalysisMetadata); + if (error) + return "callAnalysisMetadata." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an AnalysisResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult + */ + AnalysisResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnalysisResult) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult(); + if (object.callAnalysisMetadata != null) { + if (typeof object.callAnalysisMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.callAnalysisMetadata: object expected"); + message.callAnalysisMetadata = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.fromObject(object.callAnalysisMetadata); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an AnalysisResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult} message AnalysisResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.endTime = null; + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.callAnalysisMetadata != null && message.hasOwnProperty("callAnalysisMetadata")) { + object.callAnalysisMetadata = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.toObject(message.callAnalysisMetadata, options); + if (options.oneofs) + object.metadata = "callAnalysisMetadata"; + } + return object; + }; + + /** + * Converts this AnalysisResult to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @instance + * @returns {Object.} JSON object + */ + AnalysisResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisResult + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnalysisResult"; + }; + + AnalysisResult.CallAnalysisMetadata = (function() { + + /** + * Properties of a CallAnalysisMetadata. + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @interface ICallAnalysisMetadata + * @property {Array.|null} [annotations] CallAnalysisMetadata annotations + * @property {Object.|null} [entities] CallAnalysisMetadata entities + * @property {Array.|null} [sentiments] CallAnalysisMetadata sentiments + * @property {Object.|null} [intents] CallAnalysisMetadata intents + * @property {Object.|null} [phraseMatchers] CallAnalysisMetadata phraseMatchers + * @property {google.cloud.contactcenterinsights.v1.IIssueModelResult|null} [issueModelResult] CallAnalysisMetadata issueModelResult + */ + + /** + * Constructs a new CallAnalysisMetadata. + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @classdesc Represents a CallAnalysisMetadata. + * @implements ICallAnalysisMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata=} [properties] Properties to set + */ + function CallAnalysisMetadata(properties) { + this.annotations = []; + this.entities = {}; + this.sentiments = []; + this.intents = {}; + this.phraseMatchers = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CallAnalysisMetadata annotations. + * @member {Array.} annotations + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.annotations = $util.emptyArray; + + /** + * CallAnalysisMetadata entities. + * @member {Object.} entities + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.entities = $util.emptyObject; + + /** + * CallAnalysisMetadata sentiments. + * @member {Array.} sentiments + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.sentiments = $util.emptyArray; + + /** + * CallAnalysisMetadata intents. + * @member {Object.} intents + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.intents = $util.emptyObject; + + /** + * CallAnalysisMetadata phraseMatchers. + * @member {Object.} phraseMatchers + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.phraseMatchers = $util.emptyObject; + + /** + * CallAnalysisMetadata issueModelResult. + * @member {google.cloud.contactcenterinsights.v1.IIssueModelResult|null|undefined} issueModelResult + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.issueModelResult = null; + + /** + * Creates a new CallAnalysisMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata instance + */ + CallAnalysisMetadata.create = function create(properties) { + return new CallAnalysisMetadata(properties); + }; + + /** + * Encodes the specified CallAnalysisMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata} message CallAnalysisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallAnalysisMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotations != null && message.annotations.length) + for (var i = 0; i < message.annotations.length; ++i) + $root.google.cloud.contactcenterinsights.v1.CallAnnotation.encode(message.annotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entities != null && Object.hasOwnProperty.call(message, "entities")) + for (var keys = Object.keys(message.entities), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.Entity.encode(message.entities[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.sentiments != null && message.sentiments.length) + for (var i = 0; i < message.sentiments.length; ++i) + $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.encode(message.sentiments[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.intents != null && Object.hasOwnProperty.call(message, "intents")) + for (var keys = Object.keys(message.intents), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.Intent.encode(message.intents[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.phraseMatchers != null && Object.hasOwnProperty.call(message, "phraseMatchers")) + for (var keys = Object.keys(message.phraseMatchers), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.encode(message.phraseMatchers[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.issueModelResult != null && Object.hasOwnProperty.call(message, "issueModelResult")) + $root.google.cloud.contactcenterinsights.v1.IssueModelResult.encode(message.issueModelResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CallAnalysisMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata} message CallAnalysisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallAnalysisMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CallAnalysisMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallAnalysisMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.annotations && message.annotations.length)) + message.annotations = []; + message.annotations.push($root.google.cloud.contactcenterinsights.v1.CallAnnotation.decode(reader, reader.uint32())); + break; + } + case 3: { + if (message.entities === $util.emptyObject) + message.entities = {}; + 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.cloud.contactcenterinsights.v1.Entity.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.entities[key] = value; + break; + } + case 4: { + if (!(message.sentiments && message.sentiments.length)) + message.sentiments = []; + message.sentiments.push($root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.decode(reader, reader.uint32())); + break; + } + case 6: { + if (message.intents === $util.emptyObject) + message.intents = {}; + 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.cloud.contactcenterinsights.v1.Intent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.intents[key] = value; + break; + } + case 7: { + if (message.phraseMatchers === $util.emptyObject) + message.phraseMatchers = {}; + 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.cloud.contactcenterinsights.v1.PhraseMatchData.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.phraseMatchers[key] = value; + break; + } + case 8: { + message.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CallAnalysisMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallAnalysisMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CallAnalysisMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CallAnalysisMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!Array.isArray(message.annotations)) + return "annotations: array expected"; + for (var i = 0; i < message.annotations.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.CallAnnotation.verify(message.annotations[i]); + if (error) + return "annotations." + error; + } + } + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!$util.isObject(message.entities)) + return "entities: object expected"; + var key = Object.keys(message.entities); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Entity.verify(message.entities[key[i]]); + if (error) + return "entities." + error; + } + } + if (message.sentiments != null && message.hasOwnProperty("sentiments")) { + if (!Array.isArray(message.sentiments)) + return "sentiments: array expected"; + for (var i = 0; i < message.sentiments.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify(message.sentiments[i]); + if (error) + return "sentiments." + error; + } + } + if (message.intents != null && message.hasOwnProperty("intents")) { + if (!$util.isObject(message.intents)) + return "intents: object expected"; + var key = Object.keys(message.intents); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Intent.verify(message.intents[key[i]]); + if (error) + return "intents." + error; + } + } + if (message.phraseMatchers != null && message.hasOwnProperty("phraseMatchers")) { + if (!$util.isObject(message.phraseMatchers)) + return "phraseMatchers: object expected"; + var key = Object.keys(message.phraseMatchers); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.verify(message.phraseMatchers[key[i]]); + if (error) + return "phraseMatchers." + error; + } + } + if (message.issueModelResult != null && message.hasOwnProperty("issueModelResult")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.verify(message.issueModelResult); + if (error) + return "issueModelResult." + error; + } + return null; + }; + + /** + * Creates a CallAnalysisMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata + */ + CallAnalysisMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata(); + if (object.annotations) { + if (!Array.isArray(object.annotations)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.annotations: array expected"); + message.annotations = []; + for (var i = 0; i < object.annotations.length; ++i) { + if (typeof object.annotations[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.annotations: object expected"); + message.annotations[i] = $root.google.cloud.contactcenterinsights.v1.CallAnnotation.fromObject(object.annotations[i]); + } + } + if (object.entities) { + if (typeof object.entities !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.entities: object expected"); + message.entities = {}; + for (var keys = Object.keys(object.entities), i = 0; i < keys.length; ++i) { + if (typeof object.entities[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.entities: object expected"); + message.entities[keys[i]] = $root.google.cloud.contactcenterinsights.v1.Entity.fromObject(object.entities[keys[i]]); + } + } + if (object.sentiments) { + if (!Array.isArray(object.sentiments)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.sentiments: array expected"); + message.sentiments = []; + for (var i = 0; i < object.sentiments.length; ++i) { + if (typeof object.sentiments[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.sentiments: object expected"); + message.sentiments[i] = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.fromObject(object.sentiments[i]); + } + } + if (object.intents) { + if (typeof object.intents !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.intents: object expected"); + message.intents = {}; + for (var keys = Object.keys(object.intents), i = 0; i < keys.length; ++i) { + if (typeof object.intents[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.intents: object expected"); + message.intents[keys[i]] = $root.google.cloud.contactcenterinsights.v1.Intent.fromObject(object.intents[keys[i]]); + } + } + if (object.phraseMatchers) { + if (typeof object.phraseMatchers !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.phraseMatchers: object expected"); + message.phraseMatchers = {}; + for (var keys = Object.keys(object.phraseMatchers), i = 0; i < keys.length; ++i) { + if (typeof object.phraseMatchers[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.phraseMatchers: object expected"); + message.phraseMatchers[keys[i]] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.fromObject(object.phraseMatchers[keys[i]]); + } + } + if (object.issueModelResult != null) { + if (typeof object.issueModelResult !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.issueModelResult: object expected"); + message.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.fromObject(object.issueModelResult); + } + return message; + }; + + /** + * Creates a plain object from a CallAnalysisMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} message CallAnalysisMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CallAnalysisMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.annotations = []; + object.sentiments = []; + } + if (options.objects || options.defaults) { + object.entities = {}; + object.intents = {}; + object.phraseMatchers = {}; + } + if (options.defaults) + object.issueModelResult = null; + if (message.annotations && message.annotations.length) { + object.annotations = []; + for (var j = 0; j < message.annotations.length; ++j) + object.annotations[j] = $root.google.cloud.contactcenterinsights.v1.CallAnnotation.toObject(message.annotations[j], options); + } + var keys2; + if (message.entities && (keys2 = Object.keys(message.entities)).length) { + object.entities = {}; + for (var j = 0; j < keys2.length; ++j) + object.entities[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.Entity.toObject(message.entities[keys2[j]], options); + } + if (message.sentiments && message.sentiments.length) { + object.sentiments = []; + for (var j = 0; j < message.sentiments.length; ++j) + object.sentiments[j] = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.toObject(message.sentiments[j], options); + } + if (message.intents && (keys2 = Object.keys(message.intents)).length) { + object.intents = {}; + for (var j = 0; j < keys2.length; ++j) + object.intents[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.Intent.toObject(message.intents[keys2[j]], options); + } + if (message.phraseMatchers && (keys2 = Object.keys(message.phraseMatchers)).length) { + object.phraseMatchers = {}; + for (var j = 0; j < keys2.length; ++j) + object.phraseMatchers[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.toObject(message.phraseMatchers[keys2[j]], options); + } + if (message.issueModelResult != null && message.hasOwnProperty("issueModelResult")) + object.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.toObject(message.issueModelResult, options); + return object; + }; + + /** + * Converts this CallAnalysisMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + * @returns {Object.} JSON object + */ + CallAnalysisMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CallAnalysisMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallAnalysisMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata"; + }; + + return CallAnalysisMetadata; + })(); + + return AnalysisResult; + })(); + + v1.IssueModelResult = (function() { + + /** + * Properties of an IssueModelResult. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIssueModelResult + * @property {string|null} [issueModel] IssueModelResult issueModel + * @property {Array.|null} [issues] IssueModelResult issues + */ + + /** + * Constructs a new IssueModelResult. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IssueModelResult. + * @implements IIssueModelResult + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult=} [properties] Properties to set + */ + function IssueModelResult(properties) { + this.issues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueModelResult issueModel. + * @member {string} issueModel + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @instance + */ + IssueModelResult.prototype.issueModel = ""; + + /** + * IssueModelResult issues. + * @member {Array.} issues + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @instance + */ + IssueModelResult.prototype.issues = $util.emptyArray; + + /** + * Creates a new IssueModelResult instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult instance + */ + IssueModelResult.create = function create(properties) { + return new IssueModelResult(properties); + }; + + /** + * Encodes the specified IssueModelResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult} message IssueModelResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueModelResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueModel != null && Object.hasOwnProperty.call(message, "issueModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issueModel); + if (message.issues != null && message.issues.length) + for (var i = 0; i < message.issues.length; ++i) + $root.google.cloud.contactcenterinsights.v1.IssueAssignment.encode(message.issues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IssueModelResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult} message IssueModelResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueModelResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueModelResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueModelResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModelResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issueModel = reader.string(); + break; + } + case 2: { + if (!(message.issues && message.issues.length)) + message.issues = []; + message.issues.push($root.google.cloud.contactcenterinsights.v1.IssueAssignment.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueModelResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueModelResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueModelResult message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueModelResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + if (!$util.isString(message.issueModel)) + return "issueModel: string expected"; + if (message.issues != null && message.hasOwnProperty("issues")) { + if (!Array.isArray(message.issues)) + return "issues: array expected"; + for (var i = 0; i < message.issues.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.verify(message.issues[i]); + if (error) + return "issues." + error; + } + } + return null; + }; + + /** + * Creates an IssueModelResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult + */ + IssueModelResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModelResult) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModelResult(); + if (object.issueModel != null) + message.issueModel = String(object.issueModel); + if (object.issues) { + if (!Array.isArray(object.issues)) + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelResult.issues: array expected"); + message.issues = []; + for (var i = 0; i < object.issues.length; ++i) { + if (typeof object.issues[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelResult.issues: object expected"); + message.issues[i] = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.fromObject(object.issues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an IssueModelResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelResult} message IssueModelResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssueModelResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.issues = []; + if (options.defaults) + object.issueModel = ""; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + object.issueModel = message.issueModel; + if (message.issues && message.issues.length) { + object.issues = []; + for (var j = 0; j < message.issues.length; ++j) + object.issues[j] = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.toObject(message.issues[j], options); + } + return object; + }; + + /** + * Converts this IssueModelResult to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @instance + * @returns {Object.} JSON object + */ + IssueModelResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IssueModelResult + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssueModelResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModelResult"; + }; + + return IssueModelResult; + })(); + + v1.ConversationLevelSentiment = (function() { + + /** + * Properties of a ConversationLevelSentiment. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversationLevelSentiment + * @property {number|null} [channelTag] ConversationLevelSentiment channelTag + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentimentData] ConversationLevelSentiment sentimentData + */ + + /** + * Constructs a new ConversationLevelSentiment. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ConversationLevelSentiment. + * @implements IConversationLevelSentiment + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment=} [properties] Properties to set + */ + function ConversationLevelSentiment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationLevelSentiment channelTag. + * @member {number} channelTag + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @instance + */ + ConversationLevelSentiment.prototype.channelTag = 0; + + /** + * ConversationLevelSentiment sentimentData. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentimentData + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @instance + */ + ConversationLevelSentiment.prototype.sentimentData = null; + + /** + * Creates a new ConversationLevelSentiment instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment instance + */ + ConversationLevelSentiment.create = function create(properties) { + return new ConversationLevelSentiment(properties); + }; + + /** + * Encodes the specified ConversationLevelSentiment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment} message ConversationLevelSentiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLevelSentiment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channelTag); + if (message.sentimentData != null && Object.hasOwnProperty.call(message, "sentimentData")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentimentData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationLevelSentiment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment} message ConversationLevelSentiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLevelSentiment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationLevelSentiment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLevelSentiment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channelTag = reader.int32(); + break; + } + case 2: { + message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationLevelSentiment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLevelSentiment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationLevelSentiment message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationLevelSentiment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (!$util.isInteger(message.channelTag)) + return "channelTag: integer expected"; + if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentimentData); + if (error) + return "sentimentData." + error; + } + return null; + }; + + /** + * Creates a ConversationLevelSentiment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment + */ + ConversationLevelSentiment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment(); + if (object.channelTag != null) + message.channelTag = object.channelTag | 0; + if (object.sentimentData != null) { + if (typeof object.sentimentData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.sentimentData: object expected"); + message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentimentData); + } + return message; + }; + + /** + * Creates a plain object from a ConversationLevelSentiment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} message ConversationLevelSentiment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationLevelSentiment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.channelTag = 0; + object.sentimentData = null; + } + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + object.channelTag = message.channelTag; + if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) + object.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentimentData, options); + return object; + }; + + /** + * Converts this ConversationLevelSentiment to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @instance + * @returns {Object.} JSON object + */ + ConversationLevelSentiment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationLevelSentiment + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationLevelSentiment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationLevelSentiment"; + }; + + return ConversationLevelSentiment; + })(); + + v1.IssueAssignment = (function() { + + /** + * Properties of an IssueAssignment. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIssueAssignment + * @property {string|null} [issue] IssueAssignment issue + * @property {number|null} [score] IssueAssignment score + * @property {string|null} [displayName] IssueAssignment displayName + */ + + /** + * Constructs a new IssueAssignment. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IssueAssignment. + * @implements IIssueAssignment + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment=} [properties] Properties to set + */ + function IssueAssignment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueAssignment issue. + * @member {string} issue + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @instance + */ + IssueAssignment.prototype.issue = ""; + + /** + * IssueAssignment score. + * @member {number} score + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @instance + */ + IssueAssignment.prototype.score = 0; + + /** + * IssueAssignment displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @instance + */ + IssueAssignment.prototype.displayName = ""; + + /** + * Creates a new IssueAssignment instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment instance + */ + IssueAssignment.create = function create(properties) { + return new IssueAssignment(properties); + }; + + /** + * Encodes the specified IssueAssignment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment} message IssueAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueAssignment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issue); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.score); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified IssueAssignment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment} message IssueAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueAssignment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueAssignment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueAssignment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueAssignment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issue = reader.string(); + break; + } + case 2: { + message.score = reader.double(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueAssignment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueAssignment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueAssignment message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueAssignment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an IssueAssignment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment + */ + IssueAssignment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueAssignment) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueAssignment(); + if (object.issue != null) + message.issue = String(object.issue); + if (object.score != null) + message.score = Number(object.score); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an IssueAssignment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueAssignment} message IssueAssignment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssueAssignment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.issue = ""; + object.score = 0; + object.displayName = ""; + } + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this IssueAssignment to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @instance + * @returns {Object.} JSON object + */ + IssueAssignment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IssueAssignment + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssueAssignment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueAssignment"; + }; + + return IssueAssignment; + })(); + + v1.CallAnnotation = (function() { + + /** + * Properties of a CallAnnotation. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICallAnnotation + * @property {google.cloud.contactcenterinsights.v1.IInterruptionData|null} [interruptionData] CallAnnotation interruptionData + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentimentData] CallAnnotation sentimentData + * @property {google.cloud.contactcenterinsights.v1.ISilenceData|null} [silenceData] CallAnnotation silenceData + * @property {google.cloud.contactcenterinsights.v1.IHoldData|null} [holdData] CallAnnotation holdData + * @property {google.cloud.contactcenterinsights.v1.IEntityMentionData|null} [entityMentionData] CallAnnotation entityMentionData + * @property {google.cloud.contactcenterinsights.v1.IIntentMatchData|null} [intentMatchData] CallAnnotation intentMatchData + * @property {google.cloud.contactcenterinsights.v1.IPhraseMatchData|null} [phraseMatchData] CallAnnotation phraseMatchData + * @property {number|null} [channelTag] CallAnnotation channelTag + * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [annotationStartBoundary] CallAnnotation annotationStartBoundary + * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [annotationEndBoundary] CallAnnotation annotationEndBoundary + */ + + /** + * Constructs a new CallAnnotation. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CallAnnotation. + * @implements ICallAnnotation + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation=} [properties] Properties to set + */ + function CallAnnotation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CallAnnotation interruptionData. + * @member {google.cloud.contactcenterinsights.v1.IInterruptionData|null|undefined} interruptionData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.interruptionData = null; + + /** + * CallAnnotation sentimentData. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentimentData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.sentimentData = null; + + /** + * CallAnnotation silenceData. + * @member {google.cloud.contactcenterinsights.v1.ISilenceData|null|undefined} silenceData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.silenceData = null; + + /** + * CallAnnotation holdData. + * @member {google.cloud.contactcenterinsights.v1.IHoldData|null|undefined} holdData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.holdData = null; + + /** + * CallAnnotation entityMentionData. + * @member {google.cloud.contactcenterinsights.v1.IEntityMentionData|null|undefined} entityMentionData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.entityMentionData = null; + + /** + * CallAnnotation intentMatchData. + * @member {google.cloud.contactcenterinsights.v1.IIntentMatchData|null|undefined} intentMatchData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.intentMatchData = null; + + /** + * CallAnnotation phraseMatchData. + * @member {google.cloud.contactcenterinsights.v1.IPhraseMatchData|null|undefined} phraseMatchData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.phraseMatchData = null; + + /** + * CallAnnotation channelTag. + * @member {number} channelTag + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.channelTag = 0; + + /** + * CallAnnotation annotationStartBoundary. + * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} annotationStartBoundary + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.annotationStartBoundary = null; + + /** + * CallAnnotation annotationEndBoundary. + * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} annotationEndBoundary + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.annotationEndBoundary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CallAnnotation data. + * @member {"interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"|undefined} data + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + Object.defineProperty(CallAnnotation.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["interruptionData", "sentimentData", "silenceData", "holdData", "entityMentionData", "intentMatchData", "phraseMatchData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CallAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation instance + */ + CallAnnotation.create = function create(properties) { + return new CallAnnotation(properties); + }; + + /** + * Encodes the specified CallAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation} message CallAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channelTag); + if (message.annotationStartBoundary != null && Object.hasOwnProperty.call(message, "annotationStartBoundary")) + $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.annotationStartBoundary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.annotationEndBoundary != null && Object.hasOwnProperty.call(message, "annotationEndBoundary")) + $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.annotationEndBoundary, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.interruptionData != null && Object.hasOwnProperty.call(message, "interruptionData")) + $root.google.cloud.contactcenterinsights.v1.InterruptionData.encode(message.interruptionData, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.sentimentData != null && Object.hasOwnProperty.call(message, "sentimentData")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentimentData, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.silenceData != null && Object.hasOwnProperty.call(message, "silenceData")) + $root.google.cloud.contactcenterinsights.v1.SilenceData.encode(message.silenceData, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.holdData != null && Object.hasOwnProperty.call(message, "holdData")) + $root.google.cloud.contactcenterinsights.v1.HoldData.encode(message.holdData, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.entityMentionData != null && Object.hasOwnProperty.call(message, "entityMentionData")) + $root.google.cloud.contactcenterinsights.v1.EntityMentionData.encode(message.entityMentionData, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.intentMatchData != null && Object.hasOwnProperty.call(message, "intentMatchData")) + $root.google.cloud.contactcenterinsights.v1.IntentMatchData.encode(message.intentMatchData, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.phraseMatchData != null && Object.hasOwnProperty.call(message, "phraseMatchData")) + $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.encode(message.phraseMatchData, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CallAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation} message CallAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CallAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallAnnotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CallAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 10: { + message.interruptionData = $root.google.cloud.contactcenterinsights.v1.InterruptionData.decode(reader, reader.uint32()); + break; + } + case 11: { + message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + break; + } + case 12: { + message.silenceData = $root.google.cloud.contactcenterinsights.v1.SilenceData.decode(reader, reader.uint32()); + break; + } + case 13: { + message.holdData = $root.google.cloud.contactcenterinsights.v1.HoldData.decode(reader, reader.uint32()); + break; + } + case 15: { + message.entityMentionData = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.decode(reader, reader.uint32()); + break; + } + case 16: { + message.intentMatchData = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.decode(reader, reader.uint32()); + break; + } + case 17: { + message.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.decode(reader, reader.uint32()); + break; + } + case 1: { + message.channelTag = reader.int32(); + break; + } + case 4: { + message.annotationStartBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); + break; + } + case 5: { + message.annotationEndBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CallAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CallAnnotation message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CallAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.interruptionData != null && message.hasOwnProperty("interruptionData")) { + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.InterruptionData.verify(message.interruptionData); + if (error) + return "interruptionData." + error; + } + } + if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentimentData); + if (error) + return "sentimentData." + error; + } + } + if (message.silenceData != null && message.hasOwnProperty("silenceData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.SilenceData.verify(message.silenceData); + if (error) + return "silenceData." + error; + } + } + if (message.holdData != null && message.hasOwnProperty("holdData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.HoldData.verify(message.holdData); + if (error) + return "holdData." + error; + } + } + if (message.entityMentionData != null && message.hasOwnProperty("entityMentionData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.verify(message.entityMentionData); + if (error) + return "entityMentionData." + error; + } + } + if (message.intentMatchData != null && message.hasOwnProperty("intentMatchData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.verify(message.intentMatchData); + if (error) + return "intentMatchData." + error; + } + } + if (message.phraseMatchData != null && message.hasOwnProperty("phraseMatchData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.verify(message.phraseMatchData); + if (error) + return "phraseMatchData." + error; + } + } + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (!$util.isInteger(message.channelTag)) + return "channelTag: integer expected"; + if (message.annotationStartBoundary != null && message.hasOwnProperty("annotationStartBoundary")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.annotationStartBoundary); + if (error) + return "annotationStartBoundary." + error; + } + if (message.annotationEndBoundary != null && message.hasOwnProperty("annotationEndBoundary")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.annotationEndBoundary); + if (error) + return "annotationEndBoundary." + error; + } + return null; + }; + + /** + * Creates a CallAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation + */ + CallAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CallAnnotation) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CallAnnotation(); + if (object.interruptionData != null) { + if (typeof object.interruptionData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.interruptionData: object expected"); + message.interruptionData = $root.google.cloud.contactcenterinsights.v1.InterruptionData.fromObject(object.interruptionData); + } + if (object.sentimentData != null) { + if (typeof object.sentimentData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.sentimentData: object expected"); + message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentimentData); + } + if (object.silenceData != null) { + if (typeof object.silenceData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.silenceData: object expected"); + message.silenceData = $root.google.cloud.contactcenterinsights.v1.SilenceData.fromObject(object.silenceData); + } + if (object.holdData != null) { + if (typeof object.holdData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.holdData: object expected"); + message.holdData = $root.google.cloud.contactcenterinsights.v1.HoldData.fromObject(object.holdData); + } + if (object.entityMentionData != null) { + if (typeof object.entityMentionData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.entityMentionData: object expected"); + message.entityMentionData = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.fromObject(object.entityMentionData); + } + if (object.intentMatchData != null) { + if (typeof object.intentMatchData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.intentMatchData: object expected"); + message.intentMatchData = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.fromObject(object.intentMatchData); + } + if (object.phraseMatchData != null) { + if (typeof object.phraseMatchData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.phraseMatchData: object expected"); + message.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.fromObject(object.phraseMatchData); + } + if (object.channelTag != null) + message.channelTag = object.channelTag | 0; + if (object.annotationStartBoundary != null) { + if (typeof object.annotationStartBoundary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.annotationStartBoundary: object expected"); + message.annotationStartBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.annotationStartBoundary); + } + if (object.annotationEndBoundary != null) { + if (typeof object.annotationEndBoundary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.annotationEndBoundary: object expected"); + message.annotationEndBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.annotationEndBoundary); + } + return message; + }; + + /** + * Creates a plain object from a CallAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.CallAnnotation} message CallAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CallAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.channelTag = 0; + object.annotationStartBoundary = null; + object.annotationEndBoundary = null; + } + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + object.channelTag = message.channelTag; + if (message.annotationStartBoundary != null && message.hasOwnProperty("annotationStartBoundary")) + object.annotationStartBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.annotationStartBoundary, options); + if (message.annotationEndBoundary != null && message.hasOwnProperty("annotationEndBoundary")) + object.annotationEndBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.annotationEndBoundary, options); + if (message.interruptionData != null && message.hasOwnProperty("interruptionData")) { + object.interruptionData = $root.google.cloud.contactcenterinsights.v1.InterruptionData.toObject(message.interruptionData, options); + if (options.oneofs) + object.data = "interruptionData"; + } + if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) { + object.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentimentData, options); + if (options.oneofs) + object.data = "sentimentData"; + } + if (message.silenceData != null && message.hasOwnProperty("silenceData")) { + object.silenceData = $root.google.cloud.contactcenterinsights.v1.SilenceData.toObject(message.silenceData, options); + if (options.oneofs) + object.data = "silenceData"; + } + if (message.holdData != null && message.hasOwnProperty("holdData")) { + object.holdData = $root.google.cloud.contactcenterinsights.v1.HoldData.toObject(message.holdData, options); + if (options.oneofs) + object.data = "holdData"; + } + if (message.entityMentionData != null && message.hasOwnProperty("entityMentionData")) { + object.entityMentionData = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.toObject(message.entityMentionData, options); + if (options.oneofs) + object.data = "entityMentionData"; + } + if (message.intentMatchData != null && message.hasOwnProperty("intentMatchData")) { + object.intentMatchData = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.toObject(message.intentMatchData, options); + if (options.oneofs) + object.data = "intentMatchData"; + } + if (message.phraseMatchData != null && message.hasOwnProperty("phraseMatchData")) { + object.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.toObject(message.phraseMatchData, options); + if (options.oneofs) + object.data = "phraseMatchData"; + } + return object; + }; + + /** + * Converts this CallAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + * @returns {Object.} JSON object + */ + CallAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CallAnnotation + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CallAnnotation"; + }; + + return CallAnnotation; + })(); + + v1.AnnotationBoundary = (function() { + + /** + * Properties of an AnnotationBoundary. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IAnnotationBoundary + * @property {number|null} [wordIndex] AnnotationBoundary wordIndex + * @property {number|null} [transcriptIndex] AnnotationBoundary transcriptIndex + */ + + /** + * Constructs a new AnnotationBoundary. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an AnnotationBoundary. + * @implements IAnnotationBoundary + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary=} [properties] Properties to set + */ + function AnnotationBoundary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnnotationBoundary wordIndex. + * @member {number|null|undefined} wordIndex + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @instance + */ + AnnotationBoundary.prototype.wordIndex = null; + + /** + * AnnotationBoundary transcriptIndex. + * @member {number} transcriptIndex + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @instance + */ + AnnotationBoundary.prototype.transcriptIndex = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnnotationBoundary detailedBoundary. + * @member {"wordIndex"|undefined} detailedBoundary + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @instance + */ + Object.defineProperty(AnnotationBoundary.prototype, "detailedBoundary", { + get: $util.oneOfGetter($oneOfFields = ["wordIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnnotationBoundary instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary instance + */ + AnnotationBoundary.create = function create(properties) { + return new AnnotationBoundary(properties); + }; + + /** + * Encodes the specified AnnotationBoundary message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary} message AnnotationBoundary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotationBoundary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transcriptIndex != null && Object.hasOwnProperty.call(message, "transcriptIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.transcriptIndex); + if (message.wordIndex != null && Object.hasOwnProperty.call(message, "wordIndex")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.wordIndex); + return writer; + }; + + /** + * Encodes the specified AnnotationBoundary message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary} message AnnotationBoundary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotationBoundary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnnotationBoundary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotationBoundary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.wordIndex = reader.int32(); + break; + } + case 1: { + message.transcriptIndex = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnnotationBoundary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotationBoundary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnnotationBoundary message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnnotationBoundary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.wordIndex != null && message.hasOwnProperty("wordIndex")) { + properties.detailedBoundary = 1; + if (!$util.isInteger(message.wordIndex)) + return "wordIndex: integer expected"; + } + if (message.transcriptIndex != null && message.hasOwnProperty("transcriptIndex")) + if (!$util.isInteger(message.transcriptIndex)) + return "transcriptIndex: integer expected"; + return null; + }; + + /** + * Creates an AnnotationBoundary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary + */ + AnnotationBoundary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary(); + if (object.wordIndex != null) + message.wordIndex = object.wordIndex | 0; + if (object.transcriptIndex != null) + message.transcriptIndex = object.transcriptIndex | 0; + return message; + }; + + /** + * Creates a plain object from an AnnotationBoundary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotationBoundary} message AnnotationBoundary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnnotationBoundary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.transcriptIndex = 0; + if (message.transcriptIndex != null && message.hasOwnProperty("transcriptIndex")) + object.transcriptIndex = message.transcriptIndex; + if (message.wordIndex != null && message.hasOwnProperty("wordIndex")) { + object.wordIndex = message.wordIndex; + if (options.oneofs) + object.detailedBoundary = "wordIndex"; + } + return object; + }; + + /** + * Converts this AnnotationBoundary to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @instance + * @returns {Object.} JSON object + */ + AnnotationBoundary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnnotationBoundary + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnnotationBoundary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotationBoundary"; + }; + + return AnnotationBoundary; + })(); + + v1.Entity = (function() { + + /** + * Properties of an Entity. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IEntity + * @property {string|null} [displayName] Entity displayName + * @property {google.cloud.contactcenterinsights.v1.Entity.Type|null} [type] Entity type + * @property {Object.|null} [metadata] Entity metadata + * @property {number|null} [salience] Entity salience + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentiment] Entity sentiment + */ + + /** + * Constructs a new Entity. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an Entity. + * @implements IEntity + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IEntity=} [properties] Properties to set + */ + function Entity(properties) { + this.metadata = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entity displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @instance + */ + Entity.prototype.displayName = ""; + + /** + * Entity type. + * @member {google.cloud.contactcenterinsights.v1.Entity.Type} type + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @instance + */ + Entity.prototype.type = 0; + + /** + * Entity metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @instance + */ + Entity.prototype.metadata = $util.emptyObject; + + /** + * Entity salience. + * @member {number} salience + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @instance + */ + Entity.prototype.salience = 0; + + /** + * Entity sentiment. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentiment + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @instance + */ + Entity.prototype.sentiment = null; + + /** + * Creates a new Entity instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @static + * @param {google.cloud.contactcenterinsights.v1.IEntity=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity instance + */ + Entity.create = function create(properties) { + return new Entity(properties); + }; + + /** + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @static + * @param {google.cloud.contactcenterinsights.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); + if (message.salience != null && Object.hasOwnProperty.call(message, "salience")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.salience); + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentiment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @static + * @param {google.cloud.contactcenterinsights.v1.IEntity} message Entity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Entity(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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); + break; + } + } + message.metadata[key] = value; + break; + } + case 4: { + message.salience = reader.float(); + break; + } + case 5: { + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entity message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.salience != null && message.hasOwnProperty("salience")) + if (typeof message.salience !== "number") + return "salience: number expected"; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity + */ + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Entity) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Entity(); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PERSON": + case 1: + message.type = 1; + break; + case "LOCATION": + case 2: + message.type = 2; + break; + case "ORGANIZATION": + case 3: + message.type = 3; + break; + case "EVENT": + case 4: + message.type = 4; + break; + case "WORK_OF_ART": + case 5: + message.type = 5; + break; + case "CONSUMER_GOOD": + case 6: + message.type = 6; + break; + case "OTHER": + case 7: + message.type = 7; + break; + case "PHONE_NUMBER": + case 9: + message.type = 9; + break; + case "ADDRESS": + case 10: + message.type = 10; + break; + case "DATE": + case 11: + message.type = 11; + break; + case "NUMBER": + case 12: + message.type = 12; + break; + case "PRICE": + case 13: + message.type = 13; + break; + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Entity.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.salience != null) + message.salience = Number(object.salience); + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Entity.sentiment: object expected"); + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @static + * @param {google.cloud.contactcenterinsights.v1.Entity} message Entity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.displayName = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.salience = 0; + object.sentiment = null; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Entity.Type[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.Entity.Type[message.type] : message.type; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.salience != null && message.hasOwnProperty("salience")) + object.salience = options.json && !isFinite(message.salience) ? String(message.salience) : message.salience; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this Entity to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @instance + * @returns {Object.} JSON object + */ + Entity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entity + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Entity"; + }; + + /** + * Type enum. + * @name google.cloud.contactcenterinsights.v1.Entity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} PERSON=1 PERSON value + * @property {number} LOCATION=2 LOCATION value + * @property {number} ORGANIZATION=3 ORGANIZATION value + * @property {number} EVENT=4 EVENT value + * @property {number} WORK_OF_ART=5 WORK_OF_ART value + * @property {number} CONSUMER_GOOD=6 CONSUMER_GOOD value + * @property {number} OTHER=7 OTHER value + * @property {number} PHONE_NUMBER=9 PHONE_NUMBER value + * @property {number} ADDRESS=10 ADDRESS value + * @property {number} DATE=11 DATE value + * @property {number} NUMBER=12 NUMBER value + * @property {number} PRICE=13 PRICE value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PERSON"] = 1; + values[valuesById[2] = "LOCATION"] = 2; + values[valuesById[3] = "ORGANIZATION"] = 3; + values[valuesById[4] = "EVENT"] = 4; + values[valuesById[5] = "WORK_OF_ART"] = 5; + values[valuesById[6] = "CONSUMER_GOOD"] = 6; + values[valuesById[7] = "OTHER"] = 7; + values[valuesById[9] = "PHONE_NUMBER"] = 9; + values[valuesById[10] = "ADDRESS"] = 10; + values[valuesById[11] = "DATE"] = 11; + values[valuesById[12] = "NUMBER"] = 12; + values[valuesById[13] = "PRICE"] = 13; + return values; + })(); + + return Entity; + })(); + + v1.Intent = (function() { + + /** + * Properties of an Intent. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIntent + * @property {string|null} [id] Intent id + * @property {string|null} [displayName] Intent displayName + */ + + /** + * Constructs a new Intent. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an Intent. + * @implements IIntent + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIntent=} [properties] Properties to set + */ + function Intent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Intent id. + * @member {string} id + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @instance + */ + Intent.prototype.id = ""; + + /** + * Intent displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @instance + */ + Intent.prototype.displayName = ""; + + /** + * Creates a new Intent instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @static + * @param {google.cloud.contactcenterinsights.v1.IIntent=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent instance + */ + Intent.create = function create(properties) { + return new Intent(properties); + }; + + /** + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @static + * @param {google.cloud.contactcenterinsights.v1.IIntent} message Intent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Intent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @static + * @param {google.cloud.contactcenterinsights.v1.IIntent} message Intent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Intent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Intent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Intent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Intent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Intent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Intent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Intent message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Intent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an Intent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent + */ + Intent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Intent) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Intent(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an Intent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @static + * @param {google.cloud.contactcenterinsights.v1.Intent} message Intent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Intent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.displayName = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this Intent to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @instance + * @returns {Object.} JSON object + */ + Intent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Intent + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Intent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Intent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Intent"; + }; + + return Intent; + })(); + + v1.PhraseMatchData = (function() { + + /** + * Properties of a PhraseMatchData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IPhraseMatchData + * @property {string|null} [phraseMatcher] PhraseMatchData phraseMatcher + * @property {string|null} [displayName] PhraseMatchData displayName + */ + + /** + * Constructs a new PhraseMatchData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a PhraseMatchData. + * @implements IPhraseMatchData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData=} [properties] Properties to set + */ + function PhraseMatchData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhraseMatchData phraseMatcher. + * @member {string} phraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @instance + */ + PhraseMatchData.prototype.phraseMatcher = ""; + + /** + * PhraseMatchData displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @instance + */ + PhraseMatchData.prototype.displayName = ""; + + /** + * Creates a new PhraseMatchData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData instance + */ + PhraseMatchData.create = function create(properties) { + return new PhraseMatchData(properties); + }; + + /** + * Encodes the specified PhraseMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData} message PhraseMatchData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatchData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phraseMatcher != null && Object.hasOwnProperty.call(message, "phraseMatcher")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.phraseMatcher); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified PhraseMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData} message PhraseMatchData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatchData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhraseMatchData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatchData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.phraseMatcher = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhraseMatchData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatchData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhraseMatchData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhraseMatchData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) + if (!$util.isString(message.phraseMatcher)) + return "phraseMatcher: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a PhraseMatchData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData + */ + PhraseMatchData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchData(); + if (object.phraseMatcher != null) + message.phraseMatcher = String(object.phraseMatcher); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a PhraseMatchData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.PhraseMatchData} message PhraseMatchData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhraseMatchData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.phraseMatcher = ""; + object.displayName = ""; + } + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) + object.phraseMatcher = message.phraseMatcher; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this PhraseMatchData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @instance + * @returns {Object.} JSON object + */ + PhraseMatchData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhraseMatchData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhraseMatchData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchData"; + }; + + return PhraseMatchData; + })(); + + v1.DialogflowIntent = (function() { + + /** + * Properties of a DialogflowIntent. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDialogflowIntent + * @property {string|null} [displayName] DialogflowIntent displayName + */ + + /** + * Constructs a new DialogflowIntent. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DialogflowIntent. + * @implements IDialogflowIntent + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent=} [properties] Properties to set + */ + function DialogflowIntent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DialogflowIntent displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @instance + */ + DialogflowIntent.prototype.displayName = ""; + + /** + * Creates a new DialogflowIntent instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent instance + */ + DialogflowIntent.create = function create(properties) { + return new DialogflowIntent(properties); + }; + + /** + * Encodes the specified DialogflowIntent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent} message DialogflowIntent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowIntent.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); + return writer; + }; + + /** + * Encodes the specified DialogflowIntent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent} message DialogflowIntent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowIntent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DialogflowIntent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowIntent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DialogflowIntent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DialogflowIntent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowIntent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DialogflowIntent message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DialogflowIntent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a DialogflowIntent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent + */ + DialogflowIntent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DialogflowIntent) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DialogflowIntent(); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a DialogflowIntent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @static + * @param {google.cloud.contactcenterinsights.v1.DialogflowIntent} message DialogflowIntent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DialogflowIntent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.displayName = ""; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this DialogflowIntent to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @instance + * @returns {Object.} JSON object + */ + DialogflowIntent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DialogflowIntent + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DialogflowIntent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DialogflowIntent"; + }; + + return DialogflowIntent; + })(); + + v1.InterruptionData = (function() { + + /** + * Properties of an InterruptionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IInterruptionData + */ + + /** + * Constructs a new InterruptionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an InterruptionData. + * @implements IInterruptionData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IInterruptionData=} [properties] Properties to set + */ + function InterruptionData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new InterruptionData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IInterruptionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData instance + */ + InterruptionData.create = function create(properties) { + return new InterruptionData(properties); + }; + + /** + * Encodes the specified InterruptionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IInterruptionData} message InterruptionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InterruptionData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified InterruptionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IInterruptionData} message InterruptionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InterruptionData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InterruptionData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InterruptionData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InterruptionData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InterruptionData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InterruptionData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InterruptionData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InterruptionData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InterruptionData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData + */ + InterruptionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.InterruptionData) + return object; + return new $root.google.cloud.contactcenterinsights.v1.InterruptionData(); + }; + + /** + * Creates a plain object from an InterruptionData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {google.cloud.contactcenterinsights.v1.InterruptionData} message InterruptionData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InterruptionData.toObject = function toObject() { + return {}; + }; + + /** + * Converts this InterruptionData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @instance + * @returns {Object.} JSON object + */ + InterruptionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InterruptionData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InterruptionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InterruptionData"; + }; + + return InterruptionData; + })(); + + v1.SilenceData = (function() { + + /** + * Properties of a SilenceData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ISilenceData + */ + + /** + * Constructs a new SilenceData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a SilenceData. + * @implements ISilenceData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ISilenceData=} [properties] Properties to set + */ + function SilenceData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new SilenceData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISilenceData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData instance + */ + SilenceData.create = function create(properties) { + return new SilenceData(properties); + }; + + /** + * Encodes the specified SilenceData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISilenceData} message SilenceData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SilenceData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SilenceData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISilenceData} message SilenceData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SilenceData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SilenceData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SilenceData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SilenceData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SilenceData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SilenceData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SilenceData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SilenceData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SilenceData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData + */ + SilenceData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.SilenceData) + return object; + return new $root.google.cloud.contactcenterinsights.v1.SilenceData(); + }; + + /** + * Creates a plain object from a SilenceData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {google.cloud.contactcenterinsights.v1.SilenceData} message SilenceData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SilenceData.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SilenceData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @instance + * @returns {Object.} JSON object + */ + SilenceData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SilenceData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SilenceData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SilenceData"; + }; + + return SilenceData; + })(); + + v1.HoldData = (function() { + + /** + * Properties of a HoldData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IHoldData + */ + + /** + * Constructs a new HoldData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a HoldData. + * @implements IHoldData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IHoldData=} [properties] Properties to set + */ + function HoldData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new HoldData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @static + * @param {google.cloud.contactcenterinsights.v1.IHoldData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData instance + */ + HoldData.create = function create(properties) { + return new HoldData(properties); + }; + + /** + * Encodes the specified HoldData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @static + * @param {google.cloud.contactcenterinsights.v1.IHoldData} message HoldData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HoldData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified HoldData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @static + * @param {google.cloud.contactcenterinsights.v1.IHoldData} message HoldData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HoldData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HoldData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HoldData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.HoldData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HoldData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HoldData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HoldData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HoldData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a HoldData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData + */ + HoldData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.HoldData) + return object; + return new $root.google.cloud.contactcenterinsights.v1.HoldData(); + }; + + /** + * Creates a plain object from a HoldData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @static + * @param {google.cloud.contactcenterinsights.v1.HoldData} message HoldData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HoldData.toObject = function toObject() { + return {}; + }; + + /** + * Converts this HoldData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @instance + * @returns {Object.} JSON object + */ + HoldData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HoldData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HoldData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.HoldData"; + }; + + return HoldData; + })(); + + v1.EntityMentionData = (function() { + + /** + * Properties of an EntityMentionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IEntityMentionData + * @property {string|null} [entityUniqueId] EntityMentionData entityUniqueId + * @property {google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|null} [type] EntityMentionData type + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentiment] EntityMentionData sentiment + */ + + /** + * Constructs a new EntityMentionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an EntityMentionData. + * @implements IEntityMentionData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData=} [properties] Properties to set + */ + function EntityMentionData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityMentionData entityUniqueId. + * @member {string} entityUniqueId + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @instance + */ + EntityMentionData.prototype.entityUniqueId = ""; + + /** + * EntityMentionData type. + * @member {google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType} type + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @instance + */ + EntityMentionData.prototype.type = 0; + + /** + * EntityMentionData sentiment. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @instance + */ + EntityMentionData.prototype.sentiment = null; + + /** + * Creates a new EntityMentionData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData instance + */ + EntityMentionData.create = function create(properties) { + return new EntityMentionData(properties); + }; + + /** + * Encodes the specified EntityMentionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData} message EntityMentionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMentionData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entityUniqueId != null && Object.hasOwnProperty.call(message, "entityUniqueId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityUniqueId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentiment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EntityMentionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData} message EntityMentionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMentionData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityMentionData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMentionData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.EntityMentionData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entityUniqueId = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityMentionData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMentionData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityMentionData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityMentionData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entityUniqueId != null && message.hasOwnProperty("entityUniqueId")) + if (!$util.isString(message.entityUniqueId)) + return "entityUniqueId: 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.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates an EntityMentionData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData + */ + EntityMentionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.EntityMentionData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.EntityMentionData(); + if (object.entityUniqueId != null) + message.entityUniqueId = String(object.entityUniqueId); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "MENTION_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PROPER": + case 1: + message.type = 1; + break; + case "COMMON": + case 2: + message.type = 2; + break; + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.EntityMentionData.sentiment: object expected"); + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from an EntityMentionData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @static + * @param {google.cloud.contactcenterinsights.v1.EntityMentionData} message EntityMentionData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityMentionData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entityUniqueId = ""; + object.type = options.enums === String ? "MENTION_TYPE_UNSPECIFIED" : 0; + object.sentiment = null; + } + if (message.entityUniqueId != null && message.hasOwnProperty("entityUniqueId")) + object.entityUniqueId = message.entityUniqueId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType[message.type] : message.type; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this EntityMentionData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @instance + * @returns {Object.} JSON object + */ + EntityMentionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityMentionData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityMentionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.EntityMentionData"; + }; + + /** + * MentionType enum. + * @name google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType + * @enum {number} + * @property {number} MENTION_TYPE_UNSPECIFIED=0 MENTION_TYPE_UNSPECIFIED value + * @property {number} PROPER=1 PROPER value + * @property {number} COMMON=2 COMMON value + */ + EntityMentionData.MentionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MENTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPER"] = 1; + values[valuesById[2] = "COMMON"] = 2; + return values; + })(); + + return EntityMentionData; + })(); + + v1.IntentMatchData = (function() { + + /** + * Properties of an IntentMatchData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIntentMatchData + * @property {string|null} [intentUniqueId] IntentMatchData intentUniqueId + */ + + /** + * Constructs a new IntentMatchData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IntentMatchData. + * @implements IIntentMatchData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData=} [properties] Properties to set + */ + function IntentMatchData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntentMatchData intentUniqueId. + * @member {string} intentUniqueId + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @instance + */ + IntentMatchData.prototype.intentUniqueId = ""; + + /** + * Creates a new IntentMatchData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData instance + */ + IntentMatchData.create = function create(properties) { + return new IntentMatchData(properties); + }; + + /** + * Encodes the specified IntentMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData} message IntentMatchData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentMatchData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.intentUniqueId != null && Object.hasOwnProperty.call(message, "intentUniqueId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intentUniqueId); + return writer; + }; + + /** + * Encodes the specified IntentMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData} message IntentMatchData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntentMatchData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntentMatchData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentMatchData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IntentMatchData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.intentUniqueId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntentMatchData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntentMatchData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntentMatchData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntentMatchData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.intentUniqueId != null && message.hasOwnProperty("intentUniqueId")) + if (!$util.isString(message.intentUniqueId)) + return "intentUniqueId: string expected"; + return null; + }; + + /** + * Creates an IntentMatchData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData + */ + IntentMatchData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IntentMatchData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IntentMatchData(); + if (object.intentUniqueId != null) + message.intentUniqueId = String(object.intentUniqueId); + return message; + }; + + /** + * Creates a plain object from an IntentMatchData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IntentMatchData} message IntentMatchData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntentMatchData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.intentUniqueId = ""; + if (message.intentUniqueId != null && message.hasOwnProperty("intentUniqueId")) + object.intentUniqueId = message.intentUniqueId; + return object; + }; + + /** + * Converts this IntentMatchData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @instance + * @returns {Object.} JSON object + */ + IntentMatchData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IntentMatchData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IntentMatchData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IntentMatchData"; + }; + + return IntentMatchData; + })(); + + v1.SentimentData = (function() { + + /** + * Properties of a SentimentData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ISentimentData + * @property {number|null} [magnitude] SentimentData magnitude + * @property {number|null} [score] SentimentData score + */ + + /** + * Constructs a new SentimentData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a SentimentData. + * @implements ISentimentData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ISentimentData=} [properties] Properties to set + */ + function SentimentData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SentimentData magnitude. + * @member {number} magnitude + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @instance + */ + SentimentData.prototype.magnitude = 0; + + /** + * SentimentData score. + * @member {number} score + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @instance + */ + SentimentData.prototype.score = 0; + + /** + * Creates a new SentimentData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISentimentData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData instance + */ + SentimentData.create = function create(properties) { + return new SentimentData(properties); + }; + + /** + * Encodes the specified SentimentData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISentimentData} message SentimentData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SentimentData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.magnitude); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.score); + return writer; + }; + + /** + * Encodes the specified SentimentData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISentimentData} message SentimentData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SentimentData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SentimentData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SentimentData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SentimentData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.magnitude = reader.float(); + break; + } + case 2: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SentimentData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SentimentData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SentimentData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SentimentData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + if (typeof message.magnitude !== "number") + return "magnitude: number expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + return null; + }; + + /** + * Creates a SentimentData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData + */ + SentimentData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.SentimentData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.SentimentData(); + if (object.magnitude != null) + message.magnitude = Number(object.magnitude); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a SentimentData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {google.cloud.contactcenterinsights.v1.SentimentData} message SentimentData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SentimentData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.magnitude = 0; + object.score = 0; + } + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + return object; + }; + + /** + * Converts this SentimentData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @instance + * @returns {Object.} JSON object + */ + SentimentData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SentimentData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SentimentData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SentimentData"; + }; + + return SentimentData; + })(); + + v1.IssueModel = (function() { + + /** + * Properties of an IssueModel. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIssueModel + * @property {string|null} [name] IssueModel name + * @property {string|null} [displayName] IssueModel displayName + * @property {google.protobuf.ITimestamp|null} [createTime] IssueModel createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] IssueModel updateTime + * @property {google.cloud.contactcenterinsights.v1.IssueModel.State|null} [state] IssueModel state + * @property {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null} [inputDataConfig] IssueModel inputDataConfig + * @property {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null} [trainingStats] IssueModel trainingStats + */ + + /** + * Constructs a new IssueModel. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IssueModel. + * @implements IIssueModel + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIssueModel=} [properties] Properties to set + */ + function IssueModel(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueModel name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.name = ""; + + /** + * IssueModel displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.displayName = ""; + + /** + * IssueModel createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.createTime = null; + + /** + * IssueModel updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.updateTime = null; + + /** + * IssueModel state. + * @member {google.cloud.contactcenterinsights.v1.IssueModel.State} state + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.state = 0; + + /** + * IssueModel inputDataConfig. + * @member {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null|undefined} inputDataConfig + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.inputDataConfig = null; + + /** + * IssueModel trainingStats. + * @member {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null|undefined} trainingStats + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.trainingStats = null; + + /** + * Creates a new IssueModel instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModel=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel instance + */ + IssueModel.create = function create(properties) { + return new IssueModel(properties); + }; + + /** + * Encodes the specified IssueModel message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModel} message IssueModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueModel.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.inputDataConfig != null && Object.hasOwnProperty.call(message, "inputDataConfig")) + $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.encode(message.inputDataConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.trainingStats != null && Object.hasOwnProperty.call(message, "trainingStats")) + $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.encode(message.trainingStats, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IssueModel message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModel} message IssueModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueModel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueModel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueModel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.inputDataConfig = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.trainingStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueModel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueModel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueModel message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueModel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + 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: + case 5: + break; + } + if (message.inputDataConfig != null && message.hasOwnProperty("inputDataConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify(message.inputDataConfig); + if (error) + return "inputDataConfig." + error; + } + if (message.trainingStats != null && message.hasOwnProperty("trainingStats")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify(message.trainingStats); + if (error) + return "trainingStats." + error; + } + return null; + }; + + /** + * Creates an IssueModel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel + */ + IssueModel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModel) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModel(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + 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 "UNDEPLOYED": + case 1: + message.state = 1; + break; + case "DEPLOYING": + case 2: + message.state = 2; + break; + case "DEPLOYED": + case 3: + message.state = 3; + break; + case "UNDEPLOYING": + case 4: + message.state = 4; + break; + case "DELETING": + case 5: + message.state = 5; + break; + } + if (object.inputDataConfig != null) { + if (typeof object.inputDataConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.inputDataConfig: object expected"); + message.inputDataConfig = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.fromObject(object.inputDataConfig); + } + if (object.trainingStats != null) { + if (typeof object.trainingStats !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.trainingStats: object expected"); + message.trainingStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.fromObject(object.trainingStats); + } + return message; + }; + + /** + * Creates a plain object from an IssueModel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModel} message IssueModel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssueModel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.inputDataConfig = null; + object.trainingStats = 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.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.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.IssueModel.State[message.state] === undefined ? message.state : $root.google.cloud.contactcenterinsights.v1.IssueModel.State[message.state] : message.state; + if (message.inputDataConfig != null && message.hasOwnProperty("inputDataConfig")) + object.inputDataConfig = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.toObject(message.inputDataConfig, options); + if (message.trainingStats != null && message.hasOwnProperty("trainingStats")) + object.trainingStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.toObject(message.trainingStats, options); + return object; + }; + + /** + * Converts this IssueModel to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + * @returns {Object.} JSON object + */ + IssueModel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IssueModel + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssueModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModel"; + }; + + IssueModel.InputDataConfig = (function() { + + /** + * Properties of an InputDataConfig. + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @interface IInputDataConfig + * @property {google.cloud.contactcenterinsights.v1.Conversation.Medium|null} [medium] InputDataConfig medium + * @property {number|Long|null} [trainingConversationsCount] InputDataConfig trainingConversationsCount + * @property {string|null} [filter] InputDataConfig filter + */ + + /** + * Constructs a new InputDataConfig. + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @classdesc Represents an InputDataConfig. + * @implements IInputDataConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig=} [properties] Properties to set + */ + function InputDataConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InputDataConfig medium. + * @member {google.cloud.contactcenterinsights.v1.Conversation.Medium} medium + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @instance + */ + InputDataConfig.prototype.medium = 0; + + /** + * InputDataConfig trainingConversationsCount. + * @member {number|Long} trainingConversationsCount + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @instance + */ + InputDataConfig.prototype.trainingConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InputDataConfig filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @instance + */ + InputDataConfig.prototype.filter = ""; + + /** + * Creates a new InputDataConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig instance + */ + InputDataConfig.create = function create(properties) { + return new InputDataConfig(properties); + }; + + /** + * Encodes the specified InputDataConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig} message InputDataConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InputDataConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.medium != null && Object.hasOwnProperty.call(message, "medium")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.medium); + if (message.trainingConversationsCount != null && Object.hasOwnProperty.call(message, "trainingConversationsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.trainingConversationsCount); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + return writer; + }; + + /** + * Encodes the specified InputDataConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig} message InputDataConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InputDataConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InputDataConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InputDataConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.medium = reader.int32(); + break; + } + case 2: { + message.trainingConversationsCount = reader.int64(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InputDataConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InputDataConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InputDataConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InputDataConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.medium != null && message.hasOwnProperty("medium")) + switch (message.medium) { + default: + return "medium: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.trainingConversationsCount != null && message.hasOwnProperty("trainingConversationsCount")) + if (!$util.isInteger(message.trainingConversationsCount) && !(message.trainingConversationsCount && $util.isInteger(message.trainingConversationsCount.low) && $util.isInteger(message.trainingConversationsCount.high))) + return "trainingConversationsCount: integer|Long expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates an InputDataConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig + */ + InputDataConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig(); + switch (object.medium) { + default: + if (typeof object.medium === "number") { + message.medium = object.medium; + break; + } + break; + case "MEDIUM_UNSPECIFIED": + case 0: + message.medium = 0; + break; + case "PHONE_CALL": + case 1: + message.medium = 1; + break; + case "CHAT": + case 2: + message.medium = 2; + break; + } + if (object.trainingConversationsCount != null) + if ($util.Long) + (message.trainingConversationsCount = $util.Long.fromValue(object.trainingConversationsCount)).unsigned = false; + else if (typeof object.trainingConversationsCount === "string") + message.trainingConversationsCount = parseInt(object.trainingConversationsCount, 10); + else if (typeof object.trainingConversationsCount === "number") + message.trainingConversationsCount = object.trainingConversationsCount; + else if (typeof object.trainingConversationsCount === "object") + message.trainingConversationsCount = new $util.LongBits(object.trainingConversationsCount.low >>> 0, object.trainingConversationsCount.high >>> 0).toNumber(); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from an InputDataConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} message InputDataConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InputDataConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.medium = options.enums === String ? "MEDIUM_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainingConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainingConversationsCount = options.longs === String ? "0" : 0; + object.filter = ""; + } + if (message.medium != null && message.hasOwnProperty("medium")) + object.medium = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] === undefined ? message.medium : $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] : message.medium; + if (message.trainingConversationsCount != null && message.hasOwnProperty("trainingConversationsCount")) + if (typeof message.trainingConversationsCount === "number") + object.trainingConversationsCount = options.longs === String ? String(message.trainingConversationsCount) : message.trainingConversationsCount; + else + object.trainingConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.trainingConversationsCount) : options.longs === Number ? new $util.LongBits(message.trainingConversationsCount.low >>> 0, message.trainingConversationsCount.high >>> 0).toNumber() : message.trainingConversationsCount; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this InputDataConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @instance + * @returns {Object.} JSON object + */ + InputDataConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InputDataConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InputDataConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig"; + }; + + return InputDataConfig; + })(); + + /** + * State enum. + * @name google.cloud.contactcenterinsights.v1.IssueModel.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} UNDEPLOYED=1 UNDEPLOYED value + * @property {number} DEPLOYING=2 DEPLOYING value + * @property {number} DEPLOYED=3 DEPLOYED value + * @property {number} UNDEPLOYING=4 UNDEPLOYING value + * @property {number} DELETING=5 DELETING value + */ + IssueModel.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNDEPLOYED"] = 1; + values[valuesById[2] = "DEPLOYING"] = 2; + values[valuesById[3] = "DEPLOYED"] = 3; + values[valuesById[4] = "UNDEPLOYING"] = 4; + values[valuesById[5] = "DELETING"] = 5; + return values; + })(); + + return IssueModel; + })(); + + v1.Issue = (function() { + + /** + * Properties of an Issue. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIssue + * @property {string|null} [name] Issue name + * @property {string|null} [displayName] Issue displayName + * @property {google.protobuf.ITimestamp|null} [createTime] Issue createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Issue updateTime + */ + + /** + * Constructs a new Issue. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an Issue. + * @implements IIssue + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIssue=} [properties] Properties to set + */ + function Issue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Issue name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @instance + */ + Issue.prototype.name = ""; + + /** + * Issue displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @instance + */ + Issue.prototype.displayName = ""; + + /** + * Issue createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @instance + */ + Issue.prototype.createTime = null; + + /** + * Issue updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @instance + */ + Issue.prototype.updateTime = null; + + /** + * Creates a new Issue instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssue=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue instance + */ + Issue.create = function create(properties) { + return new Issue(properties); + }; + + /** + * Encodes the specified Issue message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssue} message Issue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Issue.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Issue message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssue} message Issue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Issue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Issue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Issue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Issue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Issue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Issue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Issue message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Issue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates an Issue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue + */ + Issue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Issue) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Issue(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from an Issue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @static + * @param {google.cloud.contactcenterinsights.v1.Issue} message Issue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Issue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = 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.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); + return object; + }; + + /** + * Converts this Issue to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @instance + * @returns {Object.} JSON object + */ + Issue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Issue + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Issue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Issue"; + }; + + return Issue; + })(); + + v1.IssueModelLabelStats = (function() { + + /** + * Properties of an IssueModelLabelStats. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIssueModelLabelStats + * @property {number|Long|null} [analyzedConversationsCount] IssueModelLabelStats analyzedConversationsCount + * @property {number|Long|null} [unclassifiedConversationsCount] IssueModelLabelStats unclassifiedConversationsCount + * @property {Object.|null} [issueStats] IssueModelLabelStats issueStats + */ + + /** + * Constructs a new IssueModelLabelStats. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IssueModelLabelStats. + * @implements IIssueModelLabelStats + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats=} [properties] Properties to set + */ + function IssueModelLabelStats(properties) { + this.issueStats = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueModelLabelStats analyzedConversationsCount. + * @member {number|Long} analyzedConversationsCount + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @instance + */ + IssueModelLabelStats.prototype.analyzedConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IssueModelLabelStats unclassifiedConversationsCount. + * @member {number|Long} unclassifiedConversationsCount + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @instance + */ + IssueModelLabelStats.prototype.unclassifiedConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IssueModelLabelStats issueStats. + * @member {Object.} issueStats + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @instance + */ + IssueModelLabelStats.prototype.issueStats = $util.emptyObject; + + /** + * Creates a new IssueModelLabelStats instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats instance + */ + IssueModelLabelStats.create = function create(properties) { + return new IssueModelLabelStats(properties); + }; + + /** + * Encodes the specified IssueModelLabelStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats} message IssueModelLabelStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueModelLabelStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.analyzedConversationsCount != null && Object.hasOwnProperty.call(message, "analyzedConversationsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.analyzedConversationsCount); + if (message.unclassifiedConversationsCount != null && Object.hasOwnProperty.call(message, "unclassifiedConversationsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.unclassifiedConversationsCount); + if (message.issueStats != null && Object.hasOwnProperty.call(message, "issueStats")) + for (var keys = Object.keys(message.issueStats), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.encode(message.issueStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified IssueModelLabelStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats} message IssueModelLabelStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueModelLabelStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueModelLabelStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueModelLabelStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.analyzedConversationsCount = reader.int64(); + break; + } + case 2: { + message.unclassifiedConversationsCount = reader.int64(); + break; + } + case 3: { + if (message.issueStats === $util.emptyObject) + message.issueStats = {}; + 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.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.issueStats[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueModelLabelStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueModelLabelStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueModelLabelStats message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueModelLabelStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.analyzedConversationsCount != null && message.hasOwnProperty("analyzedConversationsCount")) + if (!$util.isInteger(message.analyzedConversationsCount) && !(message.analyzedConversationsCount && $util.isInteger(message.analyzedConversationsCount.low) && $util.isInteger(message.analyzedConversationsCount.high))) + return "analyzedConversationsCount: integer|Long expected"; + if (message.unclassifiedConversationsCount != null && message.hasOwnProperty("unclassifiedConversationsCount")) + if (!$util.isInteger(message.unclassifiedConversationsCount) && !(message.unclassifiedConversationsCount && $util.isInteger(message.unclassifiedConversationsCount.low) && $util.isInteger(message.unclassifiedConversationsCount.high))) + return "unclassifiedConversationsCount: integer|Long expected"; + if (message.issueStats != null && message.hasOwnProperty("issueStats")) { + if (!$util.isObject(message.issueStats)) + return "issueStats: object expected"; + var key = Object.keys(message.issueStats); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify(message.issueStats[key[i]]); + if (error) + return "issueStats." + error; + } + } + return null; + }; + + /** + * Creates an IssueModelLabelStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats + */ + IssueModelLabelStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats(); + if (object.analyzedConversationsCount != null) + if ($util.Long) + (message.analyzedConversationsCount = $util.Long.fromValue(object.analyzedConversationsCount)).unsigned = false; + else if (typeof object.analyzedConversationsCount === "string") + message.analyzedConversationsCount = parseInt(object.analyzedConversationsCount, 10); + else if (typeof object.analyzedConversationsCount === "number") + message.analyzedConversationsCount = object.analyzedConversationsCount; + else if (typeof object.analyzedConversationsCount === "object") + message.analyzedConversationsCount = new $util.LongBits(object.analyzedConversationsCount.low >>> 0, object.analyzedConversationsCount.high >>> 0).toNumber(); + if (object.unclassifiedConversationsCount != null) + if ($util.Long) + (message.unclassifiedConversationsCount = $util.Long.fromValue(object.unclassifiedConversationsCount)).unsigned = false; + else if (typeof object.unclassifiedConversationsCount === "string") + message.unclassifiedConversationsCount = parseInt(object.unclassifiedConversationsCount, 10); + else if (typeof object.unclassifiedConversationsCount === "number") + message.unclassifiedConversationsCount = object.unclassifiedConversationsCount; + else if (typeof object.unclassifiedConversationsCount === "object") + message.unclassifiedConversationsCount = new $util.LongBits(object.unclassifiedConversationsCount.low >>> 0, object.unclassifiedConversationsCount.high >>> 0).toNumber(); + if (object.issueStats) { + if (typeof object.issueStats !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelLabelStats.issueStats: object expected"); + message.issueStats = {}; + for (var keys = Object.keys(object.issueStats), i = 0; i < keys.length; ++i) { + if (typeof object.issueStats[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelLabelStats.issueStats: object expected"); + message.issueStats[keys[i]] = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.fromObject(object.issueStats[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an IssueModelLabelStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} message IssueModelLabelStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssueModelLabelStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.issueStats = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.analyzedConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.analyzedConversationsCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unclassifiedConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unclassifiedConversationsCount = options.longs === String ? "0" : 0; + } + if (message.analyzedConversationsCount != null && message.hasOwnProperty("analyzedConversationsCount")) + if (typeof message.analyzedConversationsCount === "number") + object.analyzedConversationsCount = options.longs === String ? String(message.analyzedConversationsCount) : message.analyzedConversationsCount; + else + object.analyzedConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.analyzedConversationsCount) : options.longs === Number ? new $util.LongBits(message.analyzedConversationsCount.low >>> 0, message.analyzedConversationsCount.high >>> 0).toNumber() : message.analyzedConversationsCount; + if (message.unclassifiedConversationsCount != null && message.hasOwnProperty("unclassifiedConversationsCount")) + if (typeof message.unclassifiedConversationsCount === "number") + object.unclassifiedConversationsCount = options.longs === String ? String(message.unclassifiedConversationsCount) : message.unclassifiedConversationsCount; + else + object.unclassifiedConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unclassifiedConversationsCount) : options.longs === Number ? new $util.LongBits(message.unclassifiedConversationsCount.low >>> 0, message.unclassifiedConversationsCount.high >>> 0).toNumber() : message.unclassifiedConversationsCount; + var keys2; + if (message.issueStats && (keys2 = Object.keys(message.issueStats)).length) { + object.issueStats = {}; + for (var j = 0; j < keys2.length; ++j) + object.issueStats[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.toObject(message.issueStats[keys2[j]], options); + } + return object; + }; + + /** + * Converts this IssueModelLabelStats to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @instance + * @returns {Object.} JSON object + */ + IssueModelLabelStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IssueModelLabelStats + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssueModelLabelStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModelLabelStats"; + }; + + IssueModelLabelStats.IssueStats = (function() { + + /** + * Properties of an IssueStats. + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @interface IIssueStats + * @property {string|null} [issue] IssueStats issue + * @property {number|Long|null} [labeledConversationsCount] IssueStats labeledConversationsCount + * @property {string|null} [displayName] IssueStats displayName + */ + + /** + * Constructs a new IssueStats. + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @classdesc Represents an IssueStats. + * @implements IIssueStats + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats=} [properties] Properties to set + */ + function IssueStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueStats issue. + * @member {string} issue + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @instance + */ + IssueStats.prototype.issue = ""; + + /** + * IssueStats labeledConversationsCount. + * @member {number|Long} labeledConversationsCount + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @instance + */ + IssueStats.prototype.labeledConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IssueStats displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @instance + */ + IssueStats.prototype.displayName = ""; + + /** + * Creates a new IssueStats instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats instance + */ + IssueStats.create = function create(properties) { + return new IssueStats(properties); + }; + + /** + * Encodes the specified IssueStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats} message IssueStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issue); + if (message.labeledConversationsCount != null && Object.hasOwnProperty.call(message, "labeledConversationsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.labeledConversationsCount); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified IssueStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats} message IssueStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issue = reader.string(); + break; + } + case 2: { + message.labeledConversationsCount = reader.int64(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueStats message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; + if (message.labeledConversationsCount != null && message.hasOwnProperty("labeledConversationsCount")) + if (!$util.isInteger(message.labeledConversationsCount) && !(message.labeledConversationsCount && $util.isInteger(message.labeledConversationsCount.low) && $util.isInteger(message.labeledConversationsCount.high))) + return "labeledConversationsCount: integer|Long expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an IssueStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats + */ + IssueStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats(); + if (object.issue != null) + message.issue = String(object.issue); + if (object.labeledConversationsCount != null) + if ($util.Long) + (message.labeledConversationsCount = $util.Long.fromValue(object.labeledConversationsCount)).unsigned = false; + else if (typeof object.labeledConversationsCount === "string") + message.labeledConversationsCount = parseInt(object.labeledConversationsCount, 10); + else if (typeof object.labeledConversationsCount === "number") + message.labeledConversationsCount = object.labeledConversationsCount; + else if (typeof object.labeledConversationsCount === "object") + message.labeledConversationsCount = new $util.LongBits(object.labeledConversationsCount.low >>> 0, object.labeledConversationsCount.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an IssueStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} message IssueStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssueStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.issue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.labeledConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.labeledConversationsCount = options.longs === String ? "0" : 0; + object.displayName = ""; + } + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; + if (message.labeledConversationsCount != null && message.hasOwnProperty("labeledConversationsCount")) + if (typeof message.labeledConversationsCount === "number") + object.labeledConversationsCount = options.longs === String ? String(message.labeledConversationsCount) : message.labeledConversationsCount; + else + object.labeledConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.labeledConversationsCount) : options.longs === Number ? new $util.LongBits(message.labeledConversationsCount.low >>> 0, message.labeledConversationsCount.high >>> 0).toNumber() : message.labeledConversationsCount; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this IssueStats to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @instance + * @returns {Object.} JSON object + */ + IssueStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IssueStats + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssueStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats"; + }; + + return IssueStats; + })(); + + return IssueModelLabelStats; + })(); + + v1.PhraseMatcher = (function() { + + /** + * Properties of a PhraseMatcher. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IPhraseMatcher + * @property {string|null} [name] PhraseMatcher name + * @property {string|null} [revisionId] PhraseMatcher revisionId + * @property {string|null} [versionTag] PhraseMatcher versionTag + * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] PhraseMatcher revisionCreateTime + * @property {string|null} [displayName] PhraseMatcher displayName + * @property {google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|null} [type] PhraseMatcher type + * @property {boolean|null} [active] PhraseMatcher active + * @property {Array.|null} [phraseMatchRuleGroups] PhraseMatcher phraseMatchRuleGroups + * @property {google.protobuf.ITimestamp|null} [activationUpdateTime] PhraseMatcher activationUpdateTime + * @property {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null} [roleMatch] PhraseMatcher roleMatch + * @property {google.protobuf.ITimestamp|null} [updateTime] PhraseMatcher updateTime + */ + + /** + * Constructs a new PhraseMatcher. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a PhraseMatcher. + * @implements IPhraseMatcher + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher=} [properties] Properties to set + */ + function PhraseMatcher(properties) { + this.phraseMatchRuleGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhraseMatcher name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.name = ""; + + /** + * PhraseMatcher revisionId. + * @member {string} revisionId + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.revisionId = ""; + + /** + * PhraseMatcher versionTag. + * @member {string} versionTag + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.versionTag = ""; + + /** + * PhraseMatcher revisionCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.revisionCreateTime = null; + + /** + * PhraseMatcher displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.displayName = ""; + + /** + * PhraseMatcher type. + * @member {google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType} type + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.type = 0; + + /** + * PhraseMatcher active. + * @member {boolean} active + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.active = false; + + /** + * PhraseMatcher phraseMatchRuleGroups. + * @member {Array.} phraseMatchRuleGroups + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.phraseMatchRuleGroups = $util.emptyArray; + + /** + * PhraseMatcher activationUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} activationUpdateTime + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.activationUpdateTime = null; + + /** + * PhraseMatcher roleMatch. + * @member {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role} roleMatch + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.roleMatch = 0; + + /** + * PhraseMatcher updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.updateTime = null; + + /** + * Creates a new PhraseMatcher instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher instance + */ + PhraseMatcher.create = function create(properties) { + return new PhraseMatcher(properties); + }; + + /** + * Encodes the specified PhraseMatcher message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher} message PhraseMatcher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatcher.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); + if (message.versionTag != null && Object.hasOwnProperty.call(message, "versionTag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.versionTag); + if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.active != null && Object.hasOwnProperty.call(message, "active")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.active); + if (message.phraseMatchRuleGroups != null && message.phraseMatchRuleGroups.length) + for (var i = 0; i < message.phraseMatchRuleGroups.length; ++i) + $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.encode(message.phraseMatchRuleGroups[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.activationUpdateTime != null && Object.hasOwnProperty.call(message, "activationUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.activationUpdateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.roleMatch != null && Object.hasOwnProperty.call(message, "roleMatch")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.roleMatch); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhraseMatcher message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher} message PhraseMatcher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatcher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhraseMatcher message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatcher.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatcher(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.revisionId = reader.string(); + break; + } + case 3: { + message.versionTag = reader.string(); + break; + } + case 4: { + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.type = reader.int32(); + break; + } + case 7: { + message.active = reader.bool(); + break; + } + case 8: { + if (!(message.phraseMatchRuleGroups && message.phraseMatchRuleGroups.length)) + message.phraseMatchRuleGroups = []; + message.phraseMatchRuleGroups.push($root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.decode(reader, reader.uint32())); + break; + } + case 9: { + message.activationUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.roleMatch = reader.int32(); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhraseMatcher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatcher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhraseMatcher message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhraseMatcher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + if (message.versionTag != null && message.hasOwnProperty("versionTag")) + if (!$util.isString(message.versionTag)) + return "versionTag: string expected"; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); + if (error) + return "revisionCreateTime." + error; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: 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.active != null && message.hasOwnProperty("active")) + if (typeof message.active !== "boolean") + return "active: boolean expected"; + if (message.phraseMatchRuleGroups != null && message.hasOwnProperty("phraseMatchRuleGroups")) { + if (!Array.isArray(message.phraseMatchRuleGroups)) + return "phraseMatchRuleGroups: array expected"; + for (var i = 0; i < message.phraseMatchRuleGroups.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify(message.phraseMatchRuleGroups[i]); + if (error) + return "phraseMatchRuleGroups." + error; + } + } + if (message.activationUpdateTime != null && message.hasOwnProperty("activationUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.activationUpdateTime); + if (error) + return "activationUpdateTime." + error; + } + if (message.roleMatch != null && message.hasOwnProperty("roleMatch")) + switch (message.roleMatch) { + default: + return "roleMatch: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a PhraseMatcher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher + */ + PhraseMatcher.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatcher) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatcher(); + if (object.name != null) + message.name = String(object.name); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.versionTag != null) + message.versionTag = String(object.versionTag); + if (object.revisionCreateTime != null) { + if (typeof object.revisionCreateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.revisionCreateTime: object expected"); + message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "PHRASE_MATCHER_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ALL_OF": + case 1: + message.type = 1; + break; + case "ANY_OF": + case 2: + message.type = 2; + break; + } + if (object.active != null) + message.active = Boolean(object.active); + if (object.phraseMatchRuleGroups) { + if (!Array.isArray(object.phraseMatchRuleGroups)) + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.phraseMatchRuleGroups: array expected"); + message.phraseMatchRuleGroups = []; + for (var i = 0; i < object.phraseMatchRuleGroups.length; ++i) { + if (typeof object.phraseMatchRuleGroups[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.phraseMatchRuleGroups: object expected"); + message.phraseMatchRuleGroups[i] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.fromObject(object.phraseMatchRuleGroups[i]); + } + } + if (object.activationUpdateTime != null) { + if (typeof object.activationUpdateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.activationUpdateTime: object expected"); + message.activationUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.activationUpdateTime); + } + switch (object.roleMatch) { + default: + if (typeof object.roleMatch === "number") { + message.roleMatch = object.roleMatch; + break; + } + break; + case "ROLE_UNSPECIFIED": + case 0: + message.roleMatch = 0; + break; + case "HUMAN_AGENT": + case 1: + message.roleMatch = 1; + break; + case "AUTOMATED_AGENT": + case 2: + message.roleMatch = 2; + break; + case "END_USER": + case 3: + message.roleMatch = 3; + break; + case "ANY_AGENT": + case 4: + message.roleMatch = 4; + break; + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a PhraseMatcher message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @static + * @param {google.cloud.contactcenterinsights.v1.PhraseMatcher} message PhraseMatcher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhraseMatcher.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.phraseMatchRuleGroups = []; + if (options.defaults) { + object.name = ""; + object.revisionId = ""; + object.versionTag = ""; + object.revisionCreateTime = null; + object.displayName = ""; + object.type = options.enums === String ? "PHRASE_MATCHER_TYPE_UNSPECIFIED" : 0; + object.active = false; + object.activationUpdateTime = null; + object.roleMatch = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.versionTag != null && message.hasOwnProperty("versionTag")) + object.versionTag = message.versionTag; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) + object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType[message.type] : message.type; + if (message.active != null && message.hasOwnProperty("active")) + object.active = message.active; + if (message.phraseMatchRuleGroups && message.phraseMatchRuleGroups.length) { + object.phraseMatchRuleGroups = []; + for (var j = 0; j < message.phraseMatchRuleGroups.length; ++j) + object.phraseMatchRuleGroups[j] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.toObject(message.phraseMatchRuleGroups[j], options); + } + if (message.activationUpdateTime != null && message.hasOwnProperty("activationUpdateTime")) + object.activationUpdateTime = $root.google.protobuf.Timestamp.toObject(message.activationUpdateTime, options); + if (message.roleMatch != null && message.hasOwnProperty("roleMatch")) + object.roleMatch = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.roleMatch] === undefined ? message.roleMatch : $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.roleMatch] : message.roleMatch; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this PhraseMatcher to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + * @returns {Object.} JSON object + */ + PhraseMatcher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhraseMatcher + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhraseMatcher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatcher"; + }; + + /** + * PhraseMatcherType enum. + * @name google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType + * @enum {number} + * @property {number} PHRASE_MATCHER_TYPE_UNSPECIFIED=0 PHRASE_MATCHER_TYPE_UNSPECIFIED value + * @property {number} ALL_OF=1 ALL_OF value + * @property {number} ANY_OF=2 ANY_OF value + */ + PhraseMatcher.PhraseMatcherType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PHRASE_MATCHER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_OF"] = 1; + values[valuesById[2] = "ANY_OF"] = 2; + return values; + })(); + + return PhraseMatcher; + })(); + + v1.PhraseMatchRuleGroup = (function() { + + /** + * Properties of a PhraseMatchRuleGroup. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IPhraseMatchRuleGroup + * @property {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|null} [type] PhraseMatchRuleGroup type + * @property {Array.|null} [phraseMatchRules] PhraseMatchRuleGroup phraseMatchRules + */ + + /** + * Constructs a new PhraseMatchRuleGroup. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a PhraseMatchRuleGroup. + * @implements IPhraseMatchRuleGroup + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup=} [properties] Properties to set + */ + function PhraseMatchRuleGroup(properties) { + this.phraseMatchRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhraseMatchRuleGroup type. + * @member {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType} type + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @instance + */ + PhraseMatchRuleGroup.prototype.type = 0; + + /** + * PhraseMatchRuleGroup phraseMatchRules. + * @member {Array.} phraseMatchRules + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @instance + */ + PhraseMatchRuleGroup.prototype.phraseMatchRules = $util.emptyArray; + + /** + * Creates a new PhraseMatchRuleGroup instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup instance + */ + PhraseMatchRuleGroup.create = function create(properties) { + return new PhraseMatchRuleGroup(properties); + }; + + /** + * Encodes the specified PhraseMatchRuleGroup message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup} message PhraseMatchRuleGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatchRuleGroup.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.phraseMatchRules != null && message.phraseMatchRules.length) + for (var i = 0; i < message.phraseMatchRules.length; ++i) + $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.encode(message.phraseMatchRules[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhraseMatchRuleGroup message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup} message PhraseMatchRuleGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatchRuleGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatchRuleGroup.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + if (!(message.phraseMatchRules && message.phraseMatchRules.length)) + message.phraseMatchRules = []; + message.phraseMatchRules.push($root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatchRuleGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhraseMatchRuleGroup message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhraseMatchRuleGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.phraseMatchRules != null && message.hasOwnProperty("phraseMatchRules")) { + if (!Array.isArray(message.phraseMatchRules)) + return "phraseMatchRules: array expected"; + for (var i = 0; i < message.phraseMatchRules.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify(message.phraseMatchRules[i]); + if (error) + return "phraseMatchRules." + error; + } + } + return null; + }; + + /** + * Creates a PhraseMatchRuleGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup + */ + PhraseMatchRuleGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ALL_OF": + case 1: + message.type = 1; + break; + case "ANY_OF": + case 2: + message.type = 2; + break; + } + if (object.phraseMatchRules) { + if (!Array.isArray(object.phraseMatchRules)) + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.phraseMatchRules: array expected"); + message.phraseMatchRules = []; + for (var i = 0; i < object.phraseMatchRules.length; ++i) { + if (typeof object.phraseMatchRules[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.phraseMatchRules: object expected"); + message.phraseMatchRules[i] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.fromObject(object.phraseMatchRules[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PhraseMatchRuleGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @static + * @param {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} message PhraseMatchRuleGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhraseMatchRuleGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.phraseMatchRules = []; + if (options.defaults) + object.type = options.enums === String ? "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType[message.type] : message.type; + if (message.phraseMatchRules && message.phraseMatchRules.length) { + object.phraseMatchRules = []; + for (var j = 0; j < message.phraseMatchRules.length; ++j) + object.phraseMatchRules[j] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.toObject(message.phraseMatchRules[j], options); + } + return object; + }; + + /** + * Converts this PhraseMatchRuleGroup to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @instance + * @returns {Object.} JSON object + */ + PhraseMatchRuleGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhraseMatchRuleGroup + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhraseMatchRuleGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup"; + }; + + /** + * PhraseMatchRuleGroupType enum. + * @name google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType + * @enum {number} + * @property {number} PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED=0 PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED value + * @property {number} ALL_OF=1 ALL_OF value + * @property {number} ANY_OF=2 ANY_OF value + */ + PhraseMatchRuleGroup.PhraseMatchRuleGroupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_OF"] = 1; + values[valuesById[2] = "ANY_OF"] = 2; + return values; + })(); + + return PhraseMatchRuleGroup; + })(); + + v1.PhraseMatchRule = (function() { + + /** + * Properties of a PhraseMatchRule. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IPhraseMatchRule + * @property {string|null} [query] PhraseMatchRule query + * @property {boolean|null} [negated] PhraseMatchRule negated + * @property {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null} [config] PhraseMatchRule config + */ + + /** + * Constructs a new PhraseMatchRule. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a PhraseMatchRule. + * @implements IPhraseMatchRule + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule=} [properties] Properties to set + */ + function PhraseMatchRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhraseMatchRule query. + * @member {string} query + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @instance + */ + PhraseMatchRule.prototype.query = ""; + + /** + * PhraseMatchRule negated. + * @member {boolean} negated + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @instance + */ + PhraseMatchRule.prototype.negated = false; + + /** + * PhraseMatchRule config. + * @member {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null|undefined} config + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @instance + */ + PhraseMatchRule.prototype.config = null; + + /** + * Creates a new PhraseMatchRule instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule instance + */ + PhraseMatchRule.create = function create(properties) { + return new PhraseMatchRule(properties); + }; + + /** + * Encodes the specified PhraseMatchRule message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule} message PhraseMatchRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatchRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + if (message.negated != null && Object.hasOwnProperty.call(message, "negated")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.negated); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.encode(message.config, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhraseMatchRule message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule} message PhraseMatchRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatchRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhraseMatchRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatchRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.query = reader.string(); + break; + } + case 2: { + message.negated = reader.bool(); + break; + } + case 3: { + message.config = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhraseMatchRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatchRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhraseMatchRule message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhraseMatchRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.negated != null && message.hasOwnProperty("negated")) + if (typeof message.negated !== "boolean") + return "negated: boolean expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify(message.config); + if (error) + return "config." + error; + } + return null; + }; + + /** + * Creates a PhraseMatchRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule + */ + PhraseMatchRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule(); + if (object.query != null) + message.query = String(object.query); + if (object.negated != null) + message.negated = Boolean(object.negated); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRule.config: object expected"); + message.config = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.fromObject(object.config); + } + return message; + }; + + /** + * Creates a plain object from a PhraseMatchRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @static + * @param {google.cloud.contactcenterinsights.v1.PhraseMatchRule} message PhraseMatchRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhraseMatchRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.query = ""; + object.negated = false; + object.config = null; + } + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.negated != null && message.hasOwnProperty("negated")) + object.negated = message.negated; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.toObject(message.config, options); + return object; + }; + + /** + * Converts this PhraseMatchRule to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @instance + * @returns {Object.} JSON object + */ + PhraseMatchRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhraseMatchRule + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhraseMatchRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchRule"; + }; + + return PhraseMatchRule; + })(); + + v1.PhraseMatchRuleConfig = (function() { + + /** + * Properties of a PhraseMatchRuleConfig. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IPhraseMatchRuleConfig + * @property {google.cloud.contactcenterinsights.v1.IExactMatchConfig|null} [exactMatchConfig] PhraseMatchRuleConfig exactMatchConfig + */ + + /** + * Constructs a new PhraseMatchRuleConfig. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a PhraseMatchRuleConfig. + * @implements IPhraseMatchRuleConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig=} [properties] Properties to set + */ + function PhraseMatchRuleConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhraseMatchRuleConfig exactMatchConfig. + * @member {google.cloud.contactcenterinsights.v1.IExactMatchConfig|null|undefined} exactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @instance + */ + PhraseMatchRuleConfig.prototype.exactMatchConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PhraseMatchRuleConfig config. + * @member {"exactMatchConfig"|undefined} config + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @instance + */ + Object.defineProperty(PhraseMatchRuleConfig.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["exactMatchConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PhraseMatchRuleConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig instance + */ + PhraseMatchRuleConfig.create = function create(properties) { + return new PhraseMatchRuleConfig(properties); + }; + + /** + * Encodes the specified PhraseMatchRuleConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig} message PhraseMatchRuleConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatchRuleConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exactMatchConfig != null && Object.hasOwnProperty.call(message, "exactMatchConfig")) + $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.encode(message.exactMatchConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhraseMatchRuleConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig} message PhraseMatchRuleConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhraseMatchRuleConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatchRuleConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.exactMatchConfig = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhraseMatchRuleConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhraseMatchRuleConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhraseMatchRuleConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.exactMatchConfig != null && message.hasOwnProperty("exactMatchConfig")) { + properties.config = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify(message.exactMatchConfig); + if (error) + return "exactMatchConfig." + error; + } + } + return null; + }; + + /** + * Creates a PhraseMatchRuleConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig + */ + PhraseMatchRuleConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig(); + if (object.exactMatchConfig != null) { + if (typeof object.exactMatchConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.exactMatchConfig: object expected"); + message.exactMatchConfig = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.fromObject(object.exactMatchConfig); + } + return message; + }; + + /** + * Creates a plain object from a PhraseMatchRuleConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} message PhraseMatchRuleConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhraseMatchRuleConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.exactMatchConfig != null && message.hasOwnProperty("exactMatchConfig")) { + object.exactMatchConfig = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.toObject(message.exactMatchConfig, options); + if (options.oneofs) + object.config = "exactMatchConfig"; + } + return object; + }; + + /** + * Converts this PhraseMatchRuleConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @instance + * @returns {Object.} JSON object + */ + PhraseMatchRuleConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhraseMatchRuleConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhraseMatchRuleConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig"; + }; + + return PhraseMatchRuleConfig; + })(); + + v1.ExactMatchConfig = (function() { + + /** + * Properties of an ExactMatchConfig. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IExactMatchConfig + * @property {boolean|null} [caseSensitive] ExactMatchConfig caseSensitive + */ + + /** + * Constructs a new ExactMatchConfig. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an ExactMatchConfig. + * @implements IExactMatchConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig=} [properties] Properties to set + */ + function ExactMatchConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExactMatchConfig caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @instance + */ + ExactMatchConfig.prototype.caseSensitive = false; + + /** + * Creates a new ExactMatchConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig instance + */ + ExactMatchConfig.create = function create(properties) { + return new ExactMatchConfig(properties); + }; + + /** + * Encodes the specified ExactMatchConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig} message ExactMatchConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified ExactMatchConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig} message ExactMatchConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExactMatchConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExactMatchConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExactMatchConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExactMatchConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an ExactMatchConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig + */ + ExactMatchConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig(); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an ExactMatchConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.ExactMatchConfig} message ExactMatchConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExactMatchConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.caseSensitive = false; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this ExactMatchConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @instance + * @returns {Object.} JSON object + */ + ExactMatchConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExactMatchConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExactMatchConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExactMatchConfig"; + }; + + return ExactMatchConfig; + })(); + + v1.Settings = (function() { + + /** + * Properties of a Settings. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ISettings + * @property {string|null} [name] Settings name + * @property {google.protobuf.ITimestamp|null} [createTime] Settings createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Settings updateTime + * @property {string|null} [languageCode] Settings languageCode + * @property {google.protobuf.IDuration|null} [conversationTtl] Settings conversationTtl + * @property {Object.|null} [pubsubNotificationSettings] Settings pubsubNotificationSettings + * @property {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null} [analysisConfig] Settings analysisConfig + */ + + /** + * Constructs a new Settings. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a Settings. + * @implements ISettings + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ISettings=} [properties] Properties to set + */ + function Settings(properties) { + this.pubsubNotificationSettings = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Settings name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.name = ""; + + /** + * Settings createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.createTime = null; + + /** + * Settings updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.updateTime = null; + + /** + * Settings languageCode. + * @member {string} languageCode + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.languageCode = ""; + + /** + * Settings conversationTtl. + * @member {google.protobuf.IDuration|null|undefined} conversationTtl + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.conversationTtl = null; + + /** + * Settings pubsubNotificationSettings. + * @member {Object.} pubsubNotificationSettings + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.pubsubNotificationSettings = $util.emptyObject; + + /** + * Settings analysisConfig. + * @member {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null|undefined} analysisConfig + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.analysisConfig = null; + + /** + * Creates a new Settings instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @static + * @param {google.cloud.contactcenterinsights.v1.ISettings=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings instance + */ + Settings.create = function create(properties) { + return new Settings(properties); + }; + + /** + * Encodes the specified Settings message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @static + * @param {google.cloud.contactcenterinsights.v1.ISettings} message Settings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Settings.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(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.conversationTtl != null && Object.hasOwnProperty.call(message, "conversationTtl")) + $root.google.protobuf.Duration.encode(message.conversationTtl, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pubsubNotificationSettings != null && Object.hasOwnProperty.call(message, "pubsubNotificationSettings")) + for (var keys = Object.keys(message.pubsubNotificationSettings), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.pubsubNotificationSettings[keys[i]]).ldelim(); + if (message.analysisConfig != null && Object.hasOwnProperty.call(message, "analysisConfig")) + $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.encode(message.analysisConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @static + * @param {google.cloud.contactcenterinsights.v1.ISettings} message Settings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Settings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Settings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Settings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Settings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + case 5: { + message.conversationTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.pubsubNotificationSettings === $util.emptyObject) + message.pubsubNotificationSettings = {}; + 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); + break; + } + } + message.pubsubNotificationSettings[key] = value; + break; + } + case 7: { + message.analysisConfig = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Settings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Settings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Settings message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Settings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.conversationTtl != null && message.hasOwnProperty("conversationTtl")) { + var error = $root.google.protobuf.Duration.verify(message.conversationTtl); + if (error) + return "conversationTtl." + error; + } + if (message.pubsubNotificationSettings != null && message.hasOwnProperty("pubsubNotificationSettings")) { + if (!$util.isObject(message.pubsubNotificationSettings)) + return "pubsubNotificationSettings: object expected"; + var key = Object.keys(message.pubsubNotificationSettings); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pubsubNotificationSettings[key[i]])) + return "pubsubNotificationSettings: string{k:string} expected"; + } + if (message.analysisConfig != null && message.hasOwnProperty("analysisConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify(message.analysisConfig); + if (error) + return "analysisConfig." + error; + } + return null; + }; + + /** + * Creates a Settings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings + */ + Settings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Settings) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Settings(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.conversationTtl != null) { + if (typeof object.conversationTtl !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.conversationTtl: object expected"); + message.conversationTtl = $root.google.protobuf.Duration.fromObject(object.conversationTtl); + } + if (object.pubsubNotificationSettings) { + if (typeof object.pubsubNotificationSettings !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.pubsubNotificationSettings: object expected"); + message.pubsubNotificationSettings = {}; + for (var keys = Object.keys(object.pubsubNotificationSettings), i = 0; i < keys.length; ++i) + message.pubsubNotificationSettings[keys[i]] = String(object.pubsubNotificationSettings[keys[i]]); + } + if (object.analysisConfig != null) { + if (typeof object.analysisConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.analysisConfig: object expected"); + message.analysisConfig = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.fromObject(object.analysisConfig); + } + return message; + }; + + /** + * Creates a plain object from a Settings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @static + * @param {google.cloud.contactcenterinsights.v1.Settings} message Settings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Settings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.pubsubNotificationSettings = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.languageCode = ""; + object.conversationTtl = null; + object.analysisConfig = 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); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.conversationTtl != null && message.hasOwnProperty("conversationTtl")) + object.conversationTtl = $root.google.protobuf.Duration.toObject(message.conversationTtl, options); + var keys2; + if (message.pubsubNotificationSettings && (keys2 = Object.keys(message.pubsubNotificationSettings)).length) { + object.pubsubNotificationSettings = {}; + for (var j = 0; j < keys2.length; ++j) + object.pubsubNotificationSettings[keys2[j]] = message.pubsubNotificationSettings[keys2[j]]; + } + if (message.analysisConfig != null && message.hasOwnProperty("analysisConfig")) + object.analysisConfig = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.toObject(message.analysisConfig, options); + return object; + }; + + /** + * Converts this Settings to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + * @returns {Object.} JSON object + */ + Settings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Settings + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Settings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Settings"; + }; + + Settings.AnalysisConfig = (function() { + + /** + * Properties of an AnalysisConfig. + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @interface IAnalysisConfig + * @property {number|null} [runtimeIntegrationAnalysisPercentage] AnalysisConfig runtimeIntegrationAnalysisPercentage + */ + + /** + * Constructs a new AnalysisConfig. + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @classdesc Represents an AnalysisConfig. + * @implements IAnalysisConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig=} [properties] Properties to set + */ + function AnalysisConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisConfig runtimeIntegrationAnalysisPercentage. + * @member {number} runtimeIntegrationAnalysisPercentage + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @instance + */ + AnalysisConfig.prototype.runtimeIntegrationAnalysisPercentage = 0; + + /** + * Creates a new AnalysisConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig instance + */ + AnalysisConfig.create = function create(properties) { + return new AnalysisConfig(properties); + }; + + /** + * Encodes the specified AnalysisConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig} message AnalysisConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.runtimeIntegrationAnalysisPercentage != null && Object.hasOwnProperty.call(message, "runtimeIntegrationAnalysisPercentage")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.runtimeIntegrationAnalysisPercentage); + return writer; + }; + + /** + * Encodes the specified AnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig} message AnalysisConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.runtimeIntegrationAnalysisPercentage = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) + if (typeof message.runtimeIntegrationAnalysisPercentage !== "number") + return "runtimeIntegrationAnalysisPercentage: number expected"; + return null; + }; + + /** + * Creates an AnalysisConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig + */ + AnalysisConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig(); + if (object.runtimeIntegrationAnalysisPercentage != null) + message.runtimeIntegrationAnalysisPercentage = Number(object.runtimeIntegrationAnalysisPercentage); + return message; + }; + + /** + * Creates a plain object from an AnalysisConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} message AnalysisConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.runtimeIntegrationAnalysisPercentage = 0; + if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) + object.runtimeIntegrationAnalysisPercentage = options.json && !isFinite(message.runtimeIntegrationAnalysisPercentage) ? String(message.runtimeIntegrationAnalysisPercentage) : message.runtimeIntegrationAnalysisPercentage; + return object; + }; + + /** + * Converts this AnalysisConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @instance + * @returns {Object.} JSON object + */ + AnalysisConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig"; + }; + + return AnalysisConfig; + })(); + + return Settings; + })(); + + v1.RuntimeAnnotation = (function() { + + /** + * Properties of a RuntimeAnnotation. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IRuntimeAnnotation + * @property {google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null} [articleSuggestion] RuntimeAnnotation articleSuggestion + * @property {google.cloud.contactcenterinsights.v1.IFaqAnswerData|null} [faqAnswer] RuntimeAnnotation faqAnswer + * @property {google.cloud.contactcenterinsights.v1.ISmartReplyData|null} [smartReply] RuntimeAnnotation smartReply + * @property {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null} [smartComposeSuggestion] RuntimeAnnotation smartComposeSuggestion + * @property {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null} [dialogflowInteraction] RuntimeAnnotation dialogflowInteraction + * @property {string|null} [annotationId] RuntimeAnnotation annotationId + * @property {google.protobuf.ITimestamp|null} [createTime] RuntimeAnnotation createTime + * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [startBoundary] RuntimeAnnotation startBoundary + * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [endBoundary] RuntimeAnnotation endBoundary + * @property {google.cloud.contactcenterinsights.v1.IAnswerFeedback|null} [answerFeedback] RuntimeAnnotation answerFeedback + */ + + /** + * Constructs a new RuntimeAnnotation. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a RuntimeAnnotation. + * @implements IRuntimeAnnotation + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation=} [properties] Properties to set + */ + function RuntimeAnnotation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RuntimeAnnotation articleSuggestion. + * @member {google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null|undefined} articleSuggestion + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.articleSuggestion = null; + + /** + * RuntimeAnnotation faqAnswer. + * @member {google.cloud.contactcenterinsights.v1.IFaqAnswerData|null|undefined} faqAnswer + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.faqAnswer = null; + + /** + * RuntimeAnnotation smartReply. + * @member {google.cloud.contactcenterinsights.v1.ISmartReplyData|null|undefined} smartReply + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.smartReply = null; + + /** + * RuntimeAnnotation smartComposeSuggestion. + * @member {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null|undefined} smartComposeSuggestion + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.smartComposeSuggestion = null; + + /** + * RuntimeAnnotation dialogflowInteraction. + * @member {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null|undefined} dialogflowInteraction + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.dialogflowInteraction = null; + + /** + * RuntimeAnnotation annotationId. + * @member {string} annotationId + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.annotationId = ""; + + /** + * RuntimeAnnotation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.createTime = null; + + /** + * RuntimeAnnotation startBoundary. + * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} startBoundary + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.startBoundary = null; + + /** + * RuntimeAnnotation endBoundary. + * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} endBoundary + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.endBoundary = null; + + /** + * RuntimeAnnotation answerFeedback. + * @member {google.cloud.contactcenterinsights.v1.IAnswerFeedback|null|undefined} answerFeedback + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.answerFeedback = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RuntimeAnnotation data. + * @member {"articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"|undefined} data + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + Object.defineProperty(RuntimeAnnotation.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["articleSuggestion", "faqAnswer", "smartReply", "smartComposeSuggestion", "dialogflowInteraction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RuntimeAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation instance + */ + RuntimeAnnotation.create = function create(properties) { + return new RuntimeAnnotation(properties); + }; + + /** + * Encodes the specified RuntimeAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation} message RuntimeAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuntimeAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotationId != null && Object.hasOwnProperty.call(message, "annotationId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationId); + 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.startBoundary != null && Object.hasOwnProperty.call(message, "startBoundary")) + $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.startBoundary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endBoundary != null && Object.hasOwnProperty.call(message, "endBoundary")) + $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.endBoundary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.answerFeedback != null && Object.hasOwnProperty.call(message, "answerFeedback")) + $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.encode(message.answerFeedback, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.articleSuggestion != null && Object.hasOwnProperty.call(message, "articleSuggestion")) + $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.encode(message.articleSuggestion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.faqAnswer != null && Object.hasOwnProperty.call(message, "faqAnswer")) + $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.encode(message.faqAnswer, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.smartReply != null && Object.hasOwnProperty.call(message, "smartReply")) + $root.google.cloud.contactcenterinsights.v1.SmartReplyData.encode(message.smartReply, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.smartComposeSuggestion != null && Object.hasOwnProperty.call(message, "smartComposeSuggestion")) + $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.encode(message.smartComposeSuggestion, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dialogflowInteraction != null && Object.hasOwnProperty.call(message, "dialogflowInteraction")) + $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.encode(message.dialogflowInteraction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RuntimeAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation} message RuntimeAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuntimeAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RuntimeAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuntimeAnnotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: { + message.articleSuggestion = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.faqAnswer = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.smartReply = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.decode(reader, reader.uint32()); + break; + } + case 9: { + message.smartComposeSuggestion = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.decode(reader, reader.uint32()); + break; + } + case 10: { + message.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.decode(reader, reader.uint32()); + break; + } + case 1: { + message.annotationId = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.startBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); + break; + } + case 5: { + message.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RuntimeAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuntimeAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RuntimeAnnotation message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RuntimeAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.articleSuggestion != null && message.hasOwnProperty("articleSuggestion")) { + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify(message.articleSuggestion); + if (error) + return "articleSuggestion." + error; + } + } + if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.verify(message.faqAnswer); + if (error) + return "faqAnswer." + error; + } + } + if (message.smartReply != null && message.hasOwnProperty("smartReply")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.verify(message.smartReply); + if (error) + return "smartReply." + error; + } + } + if (message.smartComposeSuggestion != null && message.hasOwnProperty("smartComposeSuggestion")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify(message.smartComposeSuggestion); + if (error) + return "smartComposeSuggestion." + error; + } + } + if (message.dialogflowInteraction != null && message.hasOwnProperty("dialogflowInteraction")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify(message.dialogflowInteraction); + if (error) + return "dialogflowInteraction." + error; + } + } + if (message.annotationId != null && message.hasOwnProperty("annotationId")) + if (!$util.isString(message.annotationId)) + return "annotationId: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startBoundary != null && message.hasOwnProperty("startBoundary")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.startBoundary); + if (error) + return "startBoundary." + error; + } + if (message.endBoundary != null && message.hasOwnProperty("endBoundary")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.endBoundary); + if (error) + return "endBoundary." + error; + } + if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.verify(message.answerFeedback); + if (error) + return "answerFeedback." + error; + } + return null; + }; + + /** + * Creates a RuntimeAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation + */ + RuntimeAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation(); + if (object.articleSuggestion != null) { + if (typeof object.articleSuggestion !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.articleSuggestion: object expected"); + message.articleSuggestion = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.fromObject(object.articleSuggestion); + } + if (object.faqAnswer != null) { + if (typeof object.faqAnswer !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.faqAnswer: object expected"); + message.faqAnswer = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.fromObject(object.faqAnswer); + } + if (object.smartReply != null) { + if (typeof object.smartReply !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.smartReply: object expected"); + message.smartReply = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.fromObject(object.smartReply); + } + if (object.smartComposeSuggestion != null) { + if (typeof object.smartComposeSuggestion !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.smartComposeSuggestion: object expected"); + message.smartComposeSuggestion = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.fromObject(object.smartComposeSuggestion); + } + if (object.dialogflowInteraction != null) { + if (typeof object.dialogflowInteraction !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.dialogflowInteraction: object expected"); + message.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.fromObject(object.dialogflowInteraction); + } + if (object.annotationId != null) + message.annotationId = String(object.annotationId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startBoundary != null) { + if (typeof object.startBoundary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.startBoundary: object expected"); + message.startBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.startBoundary); + } + if (object.endBoundary != null) { + if (typeof object.endBoundary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.endBoundary: object expected"); + message.endBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.endBoundary); + } + if (object.answerFeedback != null) { + if (typeof object.answerFeedback !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.answerFeedback: object expected"); + message.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.fromObject(object.answerFeedback); + } + return message; + }; + + /** + * Creates a plain object from a RuntimeAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} message RuntimeAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RuntimeAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.annotationId = ""; + object.createTime = null; + object.startBoundary = null; + object.endBoundary = null; + object.answerFeedback = null; + } + if (message.annotationId != null && message.hasOwnProperty("annotationId")) + object.annotationId = message.annotationId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startBoundary != null && message.hasOwnProperty("startBoundary")) + object.startBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.startBoundary, options); + if (message.endBoundary != null && message.hasOwnProperty("endBoundary")) + object.endBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.endBoundary, options); + if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) + object.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.toObject(message.answerFeedback, options); + if (message.articleSuggestion != null && message.hasOwnProperty("articleSuggestion")) { + object.articleSuggestion = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.toObject(message.articleSuggestion, options); + if (options.oneofs) + object.data = "articleSuggestion"; + } + if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { + object.faqAnswer = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.toObject(message.faqAnswer, options); + if (options.oneofs) + object.data = "faqAnswer"; + } + if (message.smartReply != null && message.hasOwnProperty("smartReply")) { + object.smartReply = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.toObject(message.smartReply, options); + if (options.oneofs) + object.data = "smartReply"; + } + if (message.smartComposeSuggestion != null && message.hasOwnProperty("smartComposeSuggestion")) { + object.smartComposeSuggestion = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.toObject(message.smartComposeSuggestion, options); + if (options.oneofs) + object.data = "smartComposeSuggestion"; + } + if (message.dialogflowInteraction != null && message.hasOwnProperty("dialogflowInteraction")) { + object.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.toObject(message.dialogflowInteraction, options); + if (options.oneofs) + object.data = "dialogflowInteraction"; + } + return object; + }; + + /** + * Converts this RuntimeAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + * @returns {Object.} JSON object + */ + RuntimeAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RuntimeAnnotation + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RuntimeAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.RuntimeAnnotation"; + }; + + return RuntimeAnnotation; + })(); + + v1.AnswerFeedback = (function() { + + /** + * Properties of an AnswerFeedback. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IAnswerFeedback + * @property {google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|null} [correctnessLevel] AnswerFeedback correctnessLevel + * @property {boolean|null} [clicked] AnswerFeedback clicked + * @property {boolean|null} [displayed] AnswerFeedback displayed + */ + + /** + * Constructs a new AnswerFeedback. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an AnswerFeedback. + * @implements IAnswerFeedback + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback=} [properties] Properties to set + */ + function AnswerFeedback(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnswerFeedback correctnessLevel. + * @member {google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel} correctnessLevel + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.correctnessLevel = 0; + + /** + * AnswerFeedback clicked. + * @member {boolean} clicked + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.clicked = false; + + /** + * AnswerFeedback displayed. + * @member {boolean} displayed + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @instance + */ + AnswerFeedback.prototype.displayed = false; + + /** + * Creates a new AnswerFeedback instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback instance + */ + AnswerFeedback.create = function create(properties) { + return new AnswerFeedback(properties); + }; + + /** + * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerFeedback.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.correctnessLevel != null && Object.hasOwnProperty.call(message, "correctnessLevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.correctnessLevel); + if (message.clicked != null && Object.hasOwnProperty.call(message, "clicked")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clicked); + if (message.displayed != null && Object.hasOwnProperty.call(message, "displayed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.displayed); + return writer; + }; + + /** + * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerFeedback.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerFeedback.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnswerFeedback(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.correctnessLevel = reader.int32(); + break; + } + case 2: { + message.clicked = reader.bool(); + break; + } + case 3: { + message.displayed = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerFeedback.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnswerFeedback message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnswerFeedback.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) + switch (message.correctnessLevel) { + default: + return "correctnessLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.clicked != null && message.hasOwnProperty("clicked")) + if (typeof message.clicked !== "boolean") + return "clicked: boolean expected"; + if (message.displayed != null && message.hasOwnProperty("displayed")) + if (typeof message.displayed !== "boolean") + return "displayed: boolean expected"; + return null; + }; + + /** + * Creates an AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback + */ + AnswerFeedback.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnswerFeedback) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnswerFeedback(); + switch (object.correctnessLevel) { + default: + if (typeof object.correctnessLevel === "number") { + message.correctnessLevel = object.correctnessLevel; + break; + } + break; + case "CORRECTNESS_LEVEL_UNSPECIFIED": + case 0: + message.correctnessLevel = 0; + break; + case "NOT_CORRECT": + case 1: + message.correctnessLevel = 1; + break; + case "PARTIALLY_CORRECT": + case 2: + message.correctnessLevel = 2; + break; + case "FULLY_CORRECT": + case 3: + message.correctnessLevel = 3; + break; + } + if (object.clicked != null) + message.clicked = Boolean(object.clicked); + if (object.displayed != null) + message.displayed = Boolean(object.displayed); + return message; + }; + + /** + * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @static + * @param {google.cloud.contactcenterinsights.v1.AnswerFeedback} message AnswerFeedback + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnswerFeedback.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.correctnessLevel = options.enums === String ? "CORRECTNESS_LEVEL_UNSPECIFIED" : 0; + object.clicked = false; + object.displayed = false; + } + if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) + object.correctnessLevel = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] === undefined ? message.correctnessLevel : $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] : message.correctnessLevel; + if (message.clicked != null && message.hasOwnProperty("clicked")) + object.clicked = message.clicked; + if (message.displayed != null && message.hasOwnProperty("displayed")) + object.displayed = message.displayed; + return object; + }; + + /** + * Converts this AnswerFeedback to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @instance + * @returns {Object.} JSON object + */ + AnswerFeedback.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnswerFeedback + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnswerFeedback.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnswerFeedback"; + }; + + /** + * CorrectnessLevel enum. + * @name google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel + * @enum {number} + * @property {number} CORRECTNESS_LEVEL_UNSPECIFIED=0 CORRECTNESS_LEVEL_UNSPECIFIED value + * @property {number} NOT_CORRECT=1 NOT_CORRECT value + * @property {number} PARTIALLY_CORRECT=2 PARTIALLY_CORRECT value + * @property {number} FULLY_CORRECT=3 FULLY_CORRECT value + */ + AnswerFeedback.CorrectnessLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CORRECTNESS_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_CORRECT"] = 1; + values[valuesById[2] = "PARTIALLY_CORRECT"] = 2; + values[valuesById[3] = "FULLY_CORRECT"] = 3; + return values; + })(); + + return AnswerFeedback; + })(); + + v1.ArticleSuggestionData = (function() { + + /** + * Properties of an ArticleSuggestionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IArticleSuggestionData + * @property {string|null} [title] ArticleSuggestionData title + * @property {string|null} [uri] ArticleSuggestionData uri + * @property {number|null} [confidenceScore] ArticleSuggestionData confidenceScore + * @property {Object.|null} [metadata] ArticleSuggestionData metadata + * @property {string|null} [queryRecord] ArticleSuggestionData queryRecord + * @property {string|null} [source] ArticleSuggestionData source + */ + + /** + * Constructs a new ArticleSuggestionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an ArticleSuggestionData. + * @implements IArticleSuggestionData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData=} [properties] Properties to set + */ + function ArticleSuggestionData(properties) { + this.metadata = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArticleSuggestionData title. + * @member {string} title + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.title = ""; + + /** + * ArticleSuggestionData uri. + * @member {string} uri + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.uri = ""; + + /** + * ArticleSuggestionData confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.confidenceScore = 0; + + /** + * ArticleSuggestionData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.metadata = $util.emptyObject; + + /** + * ArticleSuggestionData queryRecord. + * @member {string} queryRecord + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.queryRecord = ""; + + /** + * ArticleSuggestionData source. + * @member {string} source + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.source = ""; + + /** + * Creates a new ArticleSuggestionData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData instance + */ + ArticleSuggestionData.create = function create(properties) { + return new ArticleSuggestionData(properties); + }; + + /** + * Encodes the specified ArticleSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData} message ArticleSuggestionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArticleSuggestionData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidenceScore); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.queryRecord); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.source); + return writer; + }; + + /** + * Encodes the specified ArticleSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData} message ArticleSuggestionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArticleSuggestionData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArticleSuggestionData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArticleSuggestionData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.title = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.confidenceScore = reader.float(); + break; + } + case 4: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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); + break; + } + } + message.metadata[key] = value; + break; + } + case 5: { + message.queryRecord = reader.string(); + break; + } + case 6: { + message.source = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArticleSuggestionData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArticleSuggestionData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArticleSuggestionData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArticleSuggestionData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + if (!$util.isString(message.queryRecord)) + return "queryRecord: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + return null; + }; + + /** + * Creates an ArticleSuggestionData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData + */ + ArticleSuggestionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData(); + if (object.title != null) + message.title = String(object.title); + if (object.uri != null) + message.uri = String(object.uri); + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ArticleSuggestionData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.queryRecord != null) + message.queryRecord = String(object.queryRecord); + if (object.source != null) + message.source = String(object.source); + return message; + }; + + /** + * Creates a plain object from an ArticleSuggestionData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} message ArticleSuggestionData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArticleSuggestionData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.title = ""; + object.uri = ""; + object.confidenceScore = 0; + object.queryRecord = ""; + object.source = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + object.queryRecord = message.queryRecord; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + return object; + }; + + /** + * Converts this ArticleSuggestionData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + * @returns {Object.} JSON object + */ + ArticleSuggestionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ArticleSuggestionData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArticleSuggestionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ArticleSuggestionData"; + }; + + return ArticleSuggestionData; + })(); + + v1.FaqAnswerData = (function() { + + /** + * Properties of a FaqAnswerData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IFaqAnswerData + * @property {string|null} [answer] FaqAnswerData answer + * @property {number|null} [confidenceScore] FaqAnswerData confidenceScore + * @property {string|null} [question] FaqAnswerData question + * @property {Object.|null} [metadata] FaqAnswerData metadata + * @property {string|null} [queryRecord] FaqAnswerData queryRecord + * @property {string|null} [source] FaqAnswerData source + */ + + /** + * Constructs a new FaqAnswerData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a FaqAnswerData. + * @implements IFaqAnswerData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData=} [properties] Properties to set + */ + function FaqAnswerData(properties) { + this.metadata = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FaqAnswerData answer. + * @member {string} answer + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @instance + */ + FaqAnswerData.prototype.answer = ""; + + /** + * FaqAnswerData confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @instance + */ + FaqAnswerData.prototype.confidenceScore = 0; + + /** + * FaqAnswerData question. + * @member {string} question + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @instance + */ + FaqAnswerData.prototype.question = ""; + + /** + * FaqAnswerData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @instance + */ + FaqAnswerData.prototype.metadata = $util.emptyObject; + + /** + * FaqAnswerData queryRecord. + * @member {string} queryRecord + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @instance + */ + FaqAnswerData.prototype.queryRecord = ""; + + /** + * FaqAnswerData source. + * @member {string} source + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @instance + */ + FaqAnswerData.prototype.source = ""; + + /** + * Creates a new FaqAnswerData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @static + * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData instance + */ + FaqAnswerData.create = function create(properties) { + return new FaqAnswerData(properties); + }; + + /** + * Encodes the specified FaqAnswerData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @static + * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData} message FaqAnswerData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FaqAnswerData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.answer != null && Object.hasOwnProperty.call(message, "answer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.answer); + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidenceScore); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.question); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.queryRecord); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.source); + return writer; + }; + + /** + * Encodes the specified FaqAnswerData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @static + * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData} message FaqAnswerData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FaqAnswerData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FaqAnswerData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FaqAnswerData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.FaqAnswerData(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.answer = reader.string(); + break; + } + case 2: { + message.confidenceScore = reader.float(); + break; + } + case 3: { + message.question = reader.string(); + break; + } + case 4: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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); + break; + } + } + message.metadata[key] = value; + break; + } + case 5: { + message.queryRecord = reader.string(); + break; + } + case 6: { + message.source = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FaqAnswerData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FaqAnswerData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FaqAnswerData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FaqAnswerData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.answer != null && message.hasOwnProperty("answer")) + if (!$util.isString(message.answer)) + return "answer: string expected"; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + if (!$util.isString(message.queryRecord)) + return "queryRecord: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + return null; + }; + + /** + * Creates a FaqAnswerData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData + */ + FaqAnswerData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.FaqAnswerData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.FaqAnswerData(); + if (object.answer != null) + message.answer = String(object.answer); + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + if (object.question != null) + message.question = String(object.question); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.FaqAnswerData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.queryRecord != null) + message.queryRecord = String(object.queryRecord); + if (object.source != null) + message.source = String(object.source); + return message; + }; + + /** + * Creates a plain object from a FaqAnswerData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @static + * @param {google.cloud.contactcenterinsights.v1.FaqAnswerData} message FaqAnswerData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FaqAnswerData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.answer = ""; + object.confidenceScore = 0; + object.question = ""; + object.queryRecord = ""; + object.source = ""; + } + if (message.answer != null && message.hasOwnProperty("answer")) + object.answer = message.answer; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + object.queryRecord = message.queryRecord; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + return object; + }; + + /** + * Converts this FaqAnswerData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @instance + * @returns {Object.} JSON object + */ + FaqAnswerData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FaqAnswerData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FaqAnswerData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.FaqAnswerData"; + }; + + return FaqAnswerData; + })(); + + v1.SmartReplyData = (function() { + + /** + * Properties of a SmartReplyData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ISmartReplyData + * @property {string|null} [reply] SmartReplyData reply + * @property {number|null} [confidenceScore] SmartReplyData confidenceScore + * @property {Object.|null} [metadata] SmartReplyData metadata + * @property {string|null} [queryRecord] SmartReplyData queryRecord + */ + + /** + * Constructs a new SmartReplyData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a SmartReplyData. + * @implements ISmartReplyData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData=} [properties] Properties to set + */ + function SmartReplyData(properties) { + this.metadata = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SmartReplyData reply. + * @member {string} reply + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @instance + */ + SmartReplyData.prototype.reply = ""; + + /** + * SmartReplyData confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @instance + */ + SmartReplyData.prototype.confidenceScore = 0; + + /** + * SmartReplyData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @instance + */ + SmartReplyData.prototype.metadata = $util.emptyObject; + + /** + * SmartReplyData queryRecord. + * @member {string} queryRecord + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @instance + */ + SmartReplyData.prototype.queryRecord = ""; + + /** + * Creates a new SmartReplyData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData instance + */ + SmartReplyData.create = function create(properties) { + return new SmartReplyData(properties); + }; + + /** + * Encodes the specified SmartReplyData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData} message SmartReplyData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartReplyData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reply != null && Object.hasOwnProperty.call(message, "reply")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reply); + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.confidenceScore); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); + if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.queryRecord); + return writer; + }; + + /** + * Encodes the specified SmartReplyData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData} message SmartReplyData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartReplyData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SmartReplyData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartReplyData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SmartReplyData(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.reply = reader.string(); + break; + } + case 2: { + message.confidenceScore = reader.double(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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); + break; + } + } + message.metadata[key] = value; + break; + } + case 4: { + message.queryRecord = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SmartReplyData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartReplyData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SmartReplyData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SmartReplyData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reply != null && message.hasOwnProperty("reply")) + if (!$util.isString(message.reply)) + return "reply: string expected"; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + if (!$util.isString(message.queryRecord)) + return "queryRecord: string expected"; + return null; + }; + + /** + * Creates a SmartReplyData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData + */ + SmartReplyData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.SmartReplyData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.SmartReplyData(); + if (object.reply != null) + message.reply = String(object.reply); + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.SmartReplyData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.queryRecord != null) + message.queryRecord = String(object.queryRecord); + return message; + }; + + /** + * Creates a plain object from a SmartReplyData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @static + * @param {google.cloud.contactcenterinsights.v1.SmartReplyData} message SmartReplyData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SmartReplyData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.reply = ""; + object.confidenceScore = 0; + object.queryRecord = ""; + } + if (message.reply != null && message.hasOwnProperty("reply")) + object.reply = message.reply; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + object.queryRecord = message.queryRecord; + return object; + }; + + /** + * Converts this SmartReplyData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @instance + * @returns {Object.} JSON object + */ + SmartReplyData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SmartReplyData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SmartReplyData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SmartReplyData"; + }; + + return SmartReplyData; + })(); + + v1.SmartComposeSuggestionData = (function() { + + /** + * Properties of a SmartComposeSuggestionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ISmartComposeSuggestionData + * @property {string|null} [suggestion] SmartComposeSuggestionData suggestion + * @property {number|null} [confidenceScore] SmartComposeSuggestionData confidenceScore + * @property {Object.|null} [metadata] SmartComposeSuggestionData metadata + * @property {string|null} [queryRecord] SmartComposeSuggestionData queryRecord + */ + + /** + * Constructs a new SmartComposeSuggestionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a SmartComposeSuggestionData. + * @implements ISmartComposeSuggestionData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData=} [properties] Properties to set + */ + function SmartComposeSuggestionData(properties) { + this.metadata = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SmartComposeSuggestionData suggestion. + * @member {string} suggestion + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @instance + */ + SmartComposeSuggestionData.prototype.suggestion = ""; + + /** + * SmartComposeSuggestionData confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @instance + */ + SmartComposeSuggestionData.prototype.confidenceScore = 0; + + /** + * SmartComposeSuggestionData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @instance + */ + SmartComposeSuggestionData.prototype.metadata = $util.emptyObject; + + /** + * SmartComposeSuggestionData queryRecord. + * @member {string} queryRecord + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @instance + */ + SmartComposeSuggestionData.prototype.queryRecord = ""; + + /** + * Creates a new SmartComposeSuggestionData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData instance + */ + SmartComposeSuggestionData.create = function create(properties) { + return new SmartComposeSuggestionData(properties); + }; + + /** + * Encodes the specified SmartComposeSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData} message SmartComposeSuggestionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartComposeSuggestionData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.confidenceScore); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); + if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.queryRecord); + return writer; + }; + + /** + * Encodes the specified SmartComposeSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData} message SmartComposeSuggestionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartComposeSuggestionData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SmartComposeSuggestionData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartComposeSuggestionData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.suggestion = reader.string(); + break; + } + case 2: { + message.confidenceScore = reader.double(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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); + break; + } + } + message.metadata[key] = value; + break; + } + case 4: { + message.queryRecord = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SmartComposeSuggestionData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartComposeSuggestionData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SmartComposeSuggestionData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SmartComposeSuggestionData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + if (!$util.isString(message.suggestion)) + return "suggestion: string expected"; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + if (!$util.isString(message.queryRecord)) + return "queryRecord: string expected"; + return null; + }; + + /** + * Creates a SmartComposeSuggestionData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData + */ + SmartComposeSuggestionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData(); + if (object.suggestion != null) + message.suggestion = String(object.suggestion); + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.queryRecord != null) + message.queryRecord = String(object.queryRecord); + return message; + }; + + /** + * Creates a plain object from a SmartComposeSuggestionData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} message SmartComposeSuggestionData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SmartComposeSuggestionData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.suggestion = ""; + object.confidenceScore = 0; + object.queryRecord = ""; + } + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + object.suggestion = message.suggestion; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + object.queryRecord = message.queryRecord; + return object; + }; + + /** + * Converts this SmartComposeSuggestionData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @instance + * @returns {Object.} JSON object + */ + SmartComposeSuggestionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SmartComposeSuggestionData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SmartComposeSuggestionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData"; + }; + + return SmartComposeSuggestionData; + })(); + + v1.DialogflowInteractionData = (function() { + + /** + * Properties of a DialogflowInteractionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDialogflowInteractionData + * @property {string|null} [dialogflowIntentId] DialogflowInteractionData dialogflowIntentId + * @property {number|null} [confidence] DialogflowInteractionData confidence + */ + + /** + * Constructs a new DialogflowInteractionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DialogflowInteractionData. + * @implements IDialogflowInteractionData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData=} [properties] Properties to set + */ + function DialogflowInteractionData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DialogflowInteractionData dialogflowIntentId. + * @member {string} dialogflowIntentId + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @instance + */ + DialogflowInteractionData.prototype.dialogflowIntentId = ""; + + /** + * DialogflowInteractionData confidence. + * @member {number} confidence + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @instance + */ + DialogflowInteractionData.prototype.confidence = 0; + + /** + * Creates a new DialogflowInteractionData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData instance + */ + DialogflowInteractionData.create = function create(properties) { + return new DialogflowInteractionData(properties); + }; + + /** + * Encodes the specified DialogflowInteractionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData} message DialogflowInteractionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowInteractionData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dialogflowIntentId != null && Object.hasOwnProperty.call(message, "dialogflowIntentId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dialogflowIntentId); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified DialogflowInteractionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData} message DialogflowInteractionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowInteractionData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DialogflowInteractionData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowInteractionData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dialogflowIntentId = reader.string(); + break; + } + case 2: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DialogflowInteractionData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowInteractionData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DialogflowInteractionData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DialogflowInteractionData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dialogflowIntentId != null && message.hasOwnProperty("dialogflowIntentId")) + if (!$util.isString(message.dialogflowIntentId)) + return "dialogflowIntentId: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + return null; + }; + + /** + * Creates a DialogflowInteractionData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData + */ + DialogflowInteractionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData(); + if (object.dialogflowIntentId != null) + message.dialogflowIntentId = String(object.dialogflowIntentId); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a DialogflowInteractionData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @static + * @param {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} message DialogflowInteractionData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DialogflowInteractionData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dialogflowIntentId = ""; + object.confidence = 0; + } + if (message.dialogflowIntentId != null && message.hasOwnProperty("dialogflowIntentId")) + object.dialogflowIntentId = message.dialogflowIntentId; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + return object; + }; + + /** + * Converts this DialogflowInteractionData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @instance + * @returns {Object.} JSON object + */ + DialogflowInteractionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DialogflowInteractionData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DialogflowInteractionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DialogflowInteractionData"; + }; + + return DialogflowInteractionData; + })(); + + v1.ConversationParticipant = (function() { + + /** + * Properties of a ConversationParticipant. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversationParticipant + * @property {string|null} [dialogflowParticipantName] ConversationParticipant dialogflowParticipantName + * @property {string|null} [userId] ConversationParticipant userId + * @property {string|null} [dialogflowParticipant] ConversationParticipant dialogflowParticipant + * @property {string|null} [obfuscatedExternalUserId] ConversationParticipant obfuscatedExternalUserId + * @property {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null} [role] ConversationParticipant role + */ + + /** + * Constructs a new ConversationParticipant. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ConversationParticipant. + * @implements IConversationParticipant + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant=} [properties] Properties to set + */ + function ConversationParticipant(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationParticipant dialogflowParticipantName. + * @member {string|null|undefined} dialogflowParticipantName + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + */ + ConversationParticipant.prototype.dialogflowParticipantName = null; + + /** + * ConversationParticipant userId. + * @member {string|null|undefined} userId + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + */ + ConversationParticipant.prototype.userId = null; + + /** + * ConversationParticipant dialogflowParticipant. + * @member {string} dialogflowParticipant + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + */ + ConversationParticipant.prototype.dialogflowParticipant = ""; + + /** + * ConversationParticipant obfuscatedExternalUserId. + * @member {string} obfuscatedExternalUserId + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + */ + ConversationParticipant.prototype.obfuscatedExternalUserId = ""; + + /** + * ConversationParticipant role. + * @member {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role} role + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + */ + ConversationParticipant.prototype.role = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationParticipant participant. + * @member {"dialogflowParticipantName"|"userId"|undefined} participant + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + */ + Object.defineProperty(ConversationParticipant.prototype, "participant", { + get: $util.oneOfGetter($oneOfFields = ["dialogflowParticipantName", "userId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationParticipant instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant instance + */ + ConversationParticipant.create = function create(properties) { + return new ConversationParticipant(properties); + }; + + /** + * Encodes the specified ConversationParticipant message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant} message ConversationParticipant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationParticipant.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dialogflowParticipant != null && Object.hasOwnProperty.call(message, "dialogflowParticipant")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dialogflowParticipant); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.role); + if (message.obfuscatedExternalUserId != null && Object.hasOwnProperty.call(message, "obfuscatedExternalUserId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.obfuscatedExternalUserId); + if (message.dialogflowParticipantName != null && Object.hasOwnProperty.call(message, "dialogflowParticipantName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dialogflowParticipantName); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.userId); + return writer; + }; + + /** + * Encodes the specified ConversationParticipant message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant} message ConversationParticipant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationParticipant.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationParticipant message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationParticipant.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationParticipant(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.dialogflowParticipantName = reader.string(); + break; + } + case 6: { + message.userId = reader.string(); + break; + } + case 1: { + message.dialogflowParticipant = reader.string(); + break; + } + case 3: { + message.obfuscatedExternalUserId = reader.string(); + break; + } + case 2: { + message.role = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationParticipant message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationParticipant.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationParticipant message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationParticipant.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dialogflowParticipantName != null && message.hasOwnProperty("dialogflowParticipantName")) { + properties.participant = 1; + if (!$util.isString(message.dialogflowParticipantName)) + return "dialogflowParticipantName: string expected"; + } + if (message.userId != null && message.hasOwnProperty("userId")) { + if (properties.participant === 1) + return "participant: multiple values"; + properties.participant = 1; + if (!$util.isString(message.userId)) + return "userId: string expected"; + } + if (message.dialogflowParticipant != null && message.hasOwnProperty("dialogflowParticipant")) + if (!$util.isString(message.dialogflowParticipant)) + return "dialogflowParticipant: string expected"; + if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) + if (!$util.isString(message.obfuscatedExternalUserId)) + return "obfuscatedExternalUserId: string expected"; + if (message.role != null && message.hasOwnProperty("role")) + switch (message.role) { + default: + return "role: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a ConversationParticipant message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant + */ + ConversationParticipant.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationParticipant) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationParticipant(); + if (object.dialogflowParticipantName != null) + message.dialogflowParticipantName = String(object.dialogflowParticipantName); + if (object.userId != null) + message.userId = String(object.userId); + if (object.dialogflowParticipant != null) + message.dialogflowParticipant = String(object.dialogflowParticipant); + if (object.obfuscatedExternalUserId != null) + message.obfuscatedExternalUserId = String(object.obfuscatedExternalUserId); + switch (object.role) { + default: + if (typeof object.role === "number") { + message.role = object.role; + break; + } + break; + case "ROLE_UNSPECIFIED": + case 0: + message.role = 0; + break; + case "HUMAN_AGENT": + case 1: + message.role = 1; + break; + case "AUTOMATED_AGENT": + case 2: + message.role = 2; + break; + case "END_USER": + case 3: + message.role = 3; + break; + case "ANY_AGENT": + case 4: + message.role = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a ConversationParticipant message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @static + * @param {google.cloud.contactcenterinsights.v1.ConversationParticipant} message ConversationParticipant + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationParticipant.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dialogflowParticipant = ""; + object.role = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.obfuscatedExternalUserId = ""; + } + if (message.dialogflowParticipant != null && message.hasOwnProperty("dialogflowParticipant")) + object.dialogflowParticipant = message.dialogflowParticipant; + if (message.role != null && message.hasOwnProperty("role")) + object.role = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.role] === undefined ? message.role : $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.role] : message.role; + if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) + object.obfuscatedExternalUserId = message.obfuscatedExternalUserId; + if (message.dialogflowParticipantName != null && message.hasOwnProperty("dialogflowParticipantName")) { + object.dialogflowParticipantName = message.dialogflowParticipantName; + if (options.oneofs) + object.participant = "dialogflowParticipantName"; + } + if (message.userId != null && message.hasOwnProperty("userId")) { + object.userId = message.userId; + if (options.oneofs) + object.participant = "userId"; + } + return object; + }; + + /** + * Converts this ConversationParticipant to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + * @returns {Object.} JSON object + */ + ConversationParticipant.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationParticipant + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationParticipant.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationParticipant"; + }; + + /** + * Role enum. + * @name google.cloud.contactcenterinsights.v1.ConversationParticipant.Role + * @enum {number} + * @property {number} ROLE_UNSPECIFIED=0 ROLE_UNSPECIFIED value + * @property {number} HUMAN_AGENT=1 HUMAN_AGENT value + * @property {number} AUTOMATED_AGENT=2 AUTOMATED_AGENT value + * @property {number} END_USER=3 END_USER value + * @property {number} ANY_AGENT=4 ANY_AGENT value + */ + ConversationParticipant.Role = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HUMAN_AGENT"] = 1; + values[valuesById[2] = "AUTOMATED_AGENT"] = 2; + values[valuesById[3] = "END_USER"] = 3; + values[valuesById[4] = "ANY_AGENT"] = 4; + return values; + })(); + + return ConversationParticipant; + })(); + + v1.View = (function() { + + /** + * Properties of a View. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IView + * @property {string|null} [name] View name + * @property {string|null} [displayName] View displayName + * @property {google.protobuf.ITimestamp|null} [createTime] View createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] View updateTime + * @property {string|null} [value] View value + */ + + /** + * Constructs a new View. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a View. + * @implements IView + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IView=} [properties] Properties to set + */ + function View(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * View name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.View + * @instance + */ + View.prototype.name = ""; + + /** + * View displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.View + * @instance + */ + View.prototype.displayName = ""; + + /** + * View createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.View + * @instance + */ + View.prototype.createTime = null; + + /** + * View updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.View + * @instance + */ + View.prototype.updateTime = null; + + /** + * View value. + * @member {string} value + * @memberof google.cloud.contactcenterinsights.v1.View + * @instance + */ + View.prototype.value = ""; + + /** + * Creates a new View instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.View + * @static + * @param {google.cloud.contactcenterinsights.v1.IView=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.View} View instance + */ + View.create = function create(properties) { + return new View(properties); + }; + + /** + * Encodes the specified View message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.View + * @static + * @param {google.cloud.contactcenterinsights.v1.IView} message View message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + View.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.value); + return writer; + }; + + /** + * Encodes the specified View message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.View + * @static + * @param {google.cloud.contactcenterinsights.v1.IView} message View message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + View.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a View message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.View + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.View} View + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + View.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.View(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a View message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.View + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.View} View + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + View.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a View message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.View + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + View.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a View message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.View + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.View} View + */ + View.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.View) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.View(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.View.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.View.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a View message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.View + * @static + * @param {google.cloud.contactcenterinsights.v1.View} message View + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + View.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + object.value = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this View to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.View + * @instance + * @returns {Object.} JSON object + */ + View.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for View + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.View + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + View.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.View"; + }; + + return View; + })(); + + return v1; + })(); + + return contactcenterinsights; + })(); + + return cloud; + })(); + + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + 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) { + if (object instanceof $root.google.api.Http) + return object; + 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]); + } + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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()); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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]); + 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) { + if (object instanceof $root.google.api.HttpRule) + return object; + 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); + } + 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]); + } + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + 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; + })(); + + /** + * 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 + */ + 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; + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.api.ResourceReference) + return object; + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + 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) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + 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]); + } + } + 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; + })(); + + 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} [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 {string|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.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) + 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 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 {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * 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 13, wireType 2 =*/106).string(message.edition); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.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]); + 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]); + 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]); + 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]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + 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")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + 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) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + 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.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]); + } + } + 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]); + } + } + 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]); + } + } + 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]); + } + } + 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); + } + 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); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + 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 = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + 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 = message.edition; + 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 + */ + + /** + * 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) + 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; + + /** + * 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]); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + 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]); + 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]); + 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]); + 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]); + 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]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + 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]); + 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"; + } + 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) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + 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]); + } + } + 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]); + } + } + 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]); + } + } + 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]); + } + } + 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]); + } + } + 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]); + } + } + 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); + } + 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]); + } + } + 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]); + } + 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; + } + 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]; + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + 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); + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + 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 + */ + + /** + * 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 = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * 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.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object 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]); + if (error) + return "uninterpretedOption." + error; + } + } + 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) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + 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]); + } + } + 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.uninterpretedOption = []; + 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"; + }; + + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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 2: + case 3: + 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); + 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) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + 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_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + 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); + } + 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_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + 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); + } + 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 + */ + + /** + * 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) + 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; + + /** + * 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]); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + 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]); + 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"; + } + 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) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + 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]); + } + } + 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); + } + 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]); + } + } + 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]); + } + 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; + } + 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]; + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + 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); + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + 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) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + 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]); + } + } + 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); + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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); + 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) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + 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); + } + 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} [phpGenericServices] FileOptions phpGenericServices + * @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 {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) + 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 phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = 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 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.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + 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.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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 42: { + message.phpGenericServices = 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 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: 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.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]); + 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]); + 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) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + 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.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + 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.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]); + } + } + 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]); + } + } + 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.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + 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.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + 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 {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) + 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 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.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.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]); + 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"]); + 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) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + 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.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]); + } + } + 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"]); + } + 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[".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.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 {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.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + 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 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.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) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + 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()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.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]); + 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: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + 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) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + 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.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]); + } + } + 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; + } + } + 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"]); + } + 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.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[".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.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; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object 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]); + 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) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + 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]); + } + } + 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 (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 {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) + 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 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.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.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]); + 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) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + 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.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]); + } + } + 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; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + 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 {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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * 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.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + 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) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + 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]); + } + } + 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; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + 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 {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 + */ + + /** + * 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * 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"] = ""; + + /** + * 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.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"]); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + 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())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + 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"; + 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) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + 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]); + } + } + 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"]); + 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[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + 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"]; + 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 {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 + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * 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) + 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 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; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * 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.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.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + 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; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.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]); + 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"]); + 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"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + 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) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + 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.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]); + } + } + 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"]); + } + 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]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + 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[".google.longrunning.operationInfo"] = 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.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.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + 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) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + 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]); + } + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + 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.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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + 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) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + 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]); + } + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + 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) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + 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]); + } + } + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + 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; + })(); + + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.Duration) + return object; + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + 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.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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.Any) + return object; + 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; + })(); + + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.Empty) + return object; + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + 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; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @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 Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @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 {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.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.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.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 GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: 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"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + 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); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + 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.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.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 CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.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 DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.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.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + 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) + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + 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) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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]); + 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) { + if (object instanceof $root.google.rpc.Status) + return object; + 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]); + } + } + 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; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.json b/packages/google-cloud-contactcenterinsights/protos/protos.json new file mode 100644 index 00000000000..c22c45509ff --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/protos/protos.json @@ -0,0 +1,4310 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "contactcenterinsights": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.ContactCenterInsights.V1", + "go_package": "google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1;contactcenterinsights", + "java_multiple_files": true, + "java_outer_classname": "ResourcesProto", + "java_package": "com.google.cloud.contactcenterinsights.v1", + "php_namespace": "Google\\Cloud\\ContactCenterInsights\\V1", + "ruby_package": "Google::Cloud::ContactCenterInsights::V1", + "(google.api.resource_definition).type": "dialogflow.googleapis.com/Participant", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}" + }, + "nested": { + "ContactCenterInsights": { + "options": { + "(google.api.default_host)": "contactcenterinsights.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateConversation": { + "requestType": "CreateConversationRequest", + "responseType": "Conversation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/conversations", + "(google.api.http).body": "conversation", + "(google.api.method_signature)": "parent,conversation,conversation_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/conversations", + "body": "conversation" + } + }, + { + "(google.api.method_signature)": "parent,conversation,conversation_id" + } + ] + }, + "UpdateConversation": { + "requestType": "UpdateConversationRequest", + "responseType": "Conversation", + "options": { + "(google.api.http).patch": "/v1/{conversation.name=projects/*/locations/*/conversations/*}", + "(google.api.http).body": "conversation", + "(google.api.method_signature)": "conversation,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{conversation.name=projects/*/locations/*/conversations/*}", + "body": "conversation" + } + }, + { + "(google.api.method_signature)": "conversation,update_mask" + } + ] + }, + "GetConversation": { + "requestType": "GetConversationRequest", + "responseType": "Conversation", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/conversations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/conversations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListConversations": { + "requestType": "ListConversationsRequest", + "responseType": "ListConversationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/conversations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/conversations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteConversation": { + "requestType": "DeleteConversationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/conversations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/conversations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateAnalysis": { + "requestType": "CreateAnalysisRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/conversations/*}/analyses", + "(google.api.http).body": "analysis", + "(google.api.method_signature)": "parent,analysis", + "(google.longrunning.operation_info).response_type": "Analysis", + "(google.longrunning.operation_info).metadata_type": "CreateAnalysisOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/conversations/*}/analyses", + "body": "analysis" + } + }, + { + "(google.api.method_signature)": "parent,analysis" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Analysis", + "metadata_type": "CreateAnalysisOperationMetadata" + } + } + ] + }, + "GetAnalysis": { + "requestType": "GetAnalysisRequest", + "responseType": "Analysis", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/conversations/*/analyses/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/conversations/*/analyses/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAnalyses": { + "requestType": "ListAnalysesRequest", + "responseType": "ListAnalysesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/conversations/*}/analyses", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/conversations/*}/analyses" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteAnalysis": { + "requestType": "DeleteAnalysisRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/conversations/*/analyses/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/conversations/*/analyses/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ExportInsightsData": { + "requestType": "ExportInsightsDataRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/insightsdata:export", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "ExportInsightsDataResponse", + "(google.longrunning.operation_info).metadata_type": "ExportInsightsDataMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/insightsdata:export", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ExportInsightsDataResponse", + "metadata_type": "ExportInsightsDataMetadata" + } + } + ] + }, + "CreateIssueModel": { + "requestType": "CreateIssueModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/issueModels", + "(google.api.http).body": "issue_model", + "(google.api.method_signature)": "parent,issue_model", + "(google.longrunning.operation_info).response_type": "IssueModel", + "(google.longrunning.operation_info).metadata_type": "CreateIssueModelMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/issueModels", + "body": "issue_model" + } + }, + { + "(google.api.method_signature)": "parent,issue_model" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "IssueModel", + "metadata_type": "CreateIssueModelMetadata" + } + } + ] + }, + "UpdateIssueModel": { + "requestType": "UpdateIssueModelRequest", + "responseType": "IssueModel", + "options": { + "(google.api.http).patch": "/v1/{issue_model.name=projects/*/locations/*/issueModels/*}", + "(google.api.http).body": "issue_model", + "(google.api.method_signature)": "issue_model,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{issue_model.name=projects/*/locations/*/issueModels/*}", + "body": "issue_model" + } + }, + { + "(google.api.method_signature)": "issue_model,update_mask" + } + ] + }, + "GetIssueModel": { + "requestType": "GetIssueModelRequest", + "responseType": "IssueModel", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/issueModels/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/issueModels/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListIssueModels": { + "requestType": "ListIssueModelsRequest", + "responseType": "ListIssueModelsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/issueModels", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/issueModels" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteIssueModel": { + "requestType": "DeleteIssueModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/issueModels/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeleteIssueModelMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/issueModels/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "DeleteIssueModelMetadata" + } + } + ] + }, + "DeployIssueModel": { + "requestType": "DeployIssueModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/issueModels/*}:deploy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "DeployIssueModelResponse", + "(google.longrunning.operation_info).metadata_type": "DeployIssueModelMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/issueModels/*}:deploy", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DeployIssueModelResponse", + "metadata_type": "DeployIssueModelMetadata" + } + } + ] + }, + "UndeployIssueModel": { + "requestType": "UndeployIssueModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/issueModels/*}:undeploy", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "UndeployIssueModelResponse", + "(google.longrunning.operation_info).metadata_type": "UndeployIssueModelMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/issueModels/*}:undeploy", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "UndeployIssueModelResponse", + "metadata_type": "UndeployIssueModelMetadata" + } + } + ] + }, + "GetIssue": { + "requestType": "GetIssueRequest", + "responseType": "Issue", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/issueModels/*/issues/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/issueModels/*/issues/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListIssues": { + "requestType": "ListIssuesRequest", + "responseType": "ListIssuesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/issueModels/*}/issues", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/issueModels/*}/issues" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateIssue": { + "requestType": "UpdateIssueRequest", + "responseType": "Issue", + "options": { + "(google.api.http).patch": "/v1/{issue.name=projects/*/locations/*/issueModels/*/issues/*}", + "(google.api.http).body": "issue", + "(google.api.method_signature)": "issue,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{issue.name=projects/*/locations/*/issueModels/*/issues/*}", + "body": "issue" + } + }, + { + "(google.api.method_signature)": "issue,update_mask" + } + ] + }, + "CalculateIssueModelStats": { + "requestType": "CalculateIssueModelStatsRequest", + "responseType": "CalculateIssueModelStatsResponse", + "options": { + "(google.api.http).get": "/v1/{issue_model=projects/*/locations/*/issueModels/*}:calculateIssueModelStats", + "(google.api.method_signature)": "issue_model" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{issue_model=projects/*/locations/*/issueModels/*}:calculateIssueModelStats" + } + }, + { + "(google.api.method_signature)": "issue_model" + } + ] + }, + "CreatePhraseMatcher": { + "requestType": "CreatePhraseMatcherRequest", + "responseType": "PhraseMatcher", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/phraseMatchers", + "(google.api.http).body": "phrase_matcher", + "(google.api.method_signature)": "parent,phrase_matcher" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/phraseMatchers", + "body": "phrase_matcher" + } + }, + { + "(google.api.method_signature)": "parent,phrase_matcher" + } + ] + }, + "GetPhraseMatcher": { + "requestType": "GetPhraseMatcherRequest", + "responseType": "PhraseMatcher", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/phraseMatchers/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/phraseMatchers/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPhraseMatchers": { + "requestType": "ListPhraseMatchersRequest", + "responseType": "ListPhraseMatchersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/phraseMatchers", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/phraseMatchers" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeletePhraseMatcher": { + "requestType": "DeletePhraseMatcherRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/phraseMatchers/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/phraseMatchers/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdatePhraseMatcher": { + "requestType": "UpdatePhraseMatcherRequest", + "responseType": "PhraseMatcher", + "options": { + "(google.api.http).patch": "/v1/{phrase_matcher.name=projects/*/locations/*/phraseMatchers/*}", + "(google.api.http).body": "phrase_matcher", + "(google.api.method_signature)": "phrase_matcher,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{phrase_matcher.name=projects/*/locations/*/phraseMatchers/*}", + "body": "phrase_matcher" + } + }, + { + "(google.api.method_signature)": "phrase_matcher,update_mask" + } + ] + }, + "CalculateStats": { + "requestType": "CalculateStatsRequest", + "responseType": "CalculateStatsResponse", + "options": { + "(google.api.http).get": "/v1/{location=projects/*/locations/*}/conversations:calculateStats", + "(google.api.method_signature)": "location" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{location=projects/*/locations/*}/conversations:calculateStats" + } + }, + { + "(google.api.method_signature)": "location" + } + ] + }, + "GetSettings": { + "requestType": "GetSettingsRequest", + "responseType": "Settings", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/settings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/settings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateSettings": { + "requestType": "UpdateSettingsRequest", + "responseType": "Settings", + "options": { + "(google.api.http).patch": "/v1/{settings.name=projects/*/locations/*/settings}", + "(google.api.http).body": "settings", + "(google.api.method_signature)": "settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{settings.name=projects/*/locations/*/settings}", + "body": "settings" + } + }, + { + "(google.api.method_signature)": "settings,update_mask" + } + ] + }, + "CreateView": { + "requestType": "CreateViewRequest", + "responseType": "View", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/views", + "(google.api.http).body": "view", + "(google.api.method_signature)": "parent,view" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/views", + "body": "view" + } + }, + { + "(google.api.method_signature)": "parent,view" + } + ] + }, + "GetView": { + "requestType": "GetViewRequest", + "responseType": "View", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/views/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/views/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListViews": { + "requestType": "ListViewsRequest", + "responseType": "ListViewsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/views", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/views" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateView": { + "requestType": "UpdateViewRequest", + "responseType": "View", + "options": { + "(google.api.http).patch": "/v1/{view.name=projects/*/locations/*/views/*}", + "(google.api.http).body": "view", + "(google.api.method_signature)": "view,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{view.name=projects/*/locations/*/views/*}", + "body": "view" + } + }, + { + "(google.api.method_signature)": "view,update_mask" + } + ] + }, + "DeleteView": { + "requestType": "DeleteViewRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/views/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/views/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "ConversationView": { + "values": { + "CONVERSATION_VIEW_UNSPECIFIED": 0, + "FULL": 2, + "BASIC": 1 + } + }, + "CalculateStatsRequest": { + "fields": { + "location": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "filter": { + "type": "string", + "id": 2 + } + } + }, + "CalculateStatsResponse": { + "fields": { + "averageDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "averageTurnCount": { + "type": "int32", + "id": 2 + }, + "conversationCount": { + "type": "int32", + "id": 3 + }, + "smartHighlighterMatches": { + "keyType": "string", + "type": "int32", + "id": 4 + }, + "customHighlighterMatches": { + "keyType": "string", + "type": "int32", + "id": 5 + }, + "issueMatches": { + "keyType": "string", + "type": "int32", + "id": 6, + "options": { + "deprecated": true + } + }, + "issueMatchesStats": { + "keyType": "string", + "type": "IssueModelLabelStats.IssueStats", + "id": 8 + }, + "conversationCountTimeSeries": { + "type": "TimeSeries", + "id": 7 + } + }, + "nested": { + "TimeSeries": { + "fields": { + "intervalDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "points": { + "rule": "repeated", + "type": "Interval", + "id": 2 + } + }, + "nested": { + "Interval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "conversationCount": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + }, + "CreateAnalysisOperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "conversation": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + } + } + }, + "CreateConversationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "conversation": { + "type": "Conversation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conversationId": { + "type": "string", + "id": 3 + } + } + }, + "ListConversationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "view": { + "type": "ConversationView", + "id": 5 + } + } + }, + "ListConversationsResponse": { + "fields": { + "conversations": { + "rule": "repeated", + "type": "Conversation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetConversationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "view": { + "type": "ConversationView", + "id": 2 + } + } + }, + "UpdateConversationRequest": { + "fields": { + "conversation": { + "type": "Conversation", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteConversationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "CreateAnalysisRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "analysis": { + "type": "Analysis", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListAnalysesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListAnalysesResponse": { + "fields": { + "analyses": { + "rule": "repeated", + "type": "Analysis", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetAnalysisRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Analysis" + } + } + } + }, + "DeleteAnalysisRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Analysis" + } + } + } + }, + "ExportInsightsDataRequest": { + "oneofs": { + "destination": { + "oneof": [ + "bigQueryDestination" + ] + } + }, + "fields": { + "bigQueryDestination": { + "type": "BigQueryDestination", + "id": 2 + }, + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "filter": { + "type": "string", + "id": 3 + }, + "kmsKey": { + "type": "string", + "id": 4 + }, + "writeDisposition": { + "type": "WriteDisposition", + "id": 5 + } + }, + "nested": { + "BigQueryDestination": { + "fields": { + "projectId": { + "type": "string", + "id": 3 + }, + "dataset": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "table": { + "type": "string", + "id": 2 + } + } + }, + "WriteDisposition": { + "values": { + "WRITE_DISPOSITION_UNSPECIFIED": 0, + "WRITE_TRUNCATE": 1, + "WRITE_APPEND": 2 + } + } + } + }, + "ExportInsightsDataMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "ExportInsightsDataRequest", + "id": 3 + }, + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 4 + } + } + }, + "ExportInsightsDataResponse": { + "fields": {} + }, + "CreateIssueModelRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "issueModel": { + "type": "IssueModel", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "CreateIssueModelRequest", + "id": 3 + } + } + }, + "UpdateIssueModelRequest": { + "fields": { + "issueModel": { + "type": "IssueModel", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListIssueModelsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + } + } + }, + "ListIssueModelsResponse": { + "fields": { + "issueModels": { + "rule": "repeated", + "type": "IssueModel", + "id": 1 + } + } + }, + "GetIssueModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "DeleteIssueModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "DeleteIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "DeleteIssueModelRequest", + "id": 3 + } + } + }, + "DeployIssueModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "DeployIssueModelResponse": { + "fields": {} + }, + "DeployIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "DeployIssueModelRequest", + "id": 3 + } + } + }, + "UndeployIssueModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "UndeployIssueModelResponse": { + "fields": {} + }, + "UndeployIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "UndeployIssueModelRequest", + "id": 3 + } + } + }, + "GetIssueRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Issue" + } + } + } + }, + "ListIssuesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "ListIssuesResponse": { + "fields": { + "issues": { + "rule": "repeated", + "type": "Issue", + "id": 1 + } + } + }, + "UpdateIssueRequest": { + "fields": { + "issue": { + "type": "Issue", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "CalculateIssueModelStatsRequest": { + "fields": { + "issueModel": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "CalculateIssueModelStatsResponse": { + "fields": { + "currentStats": { + "type": "IssueModelLabelStats", + "id": 4 + } + } + }, + "CreatePhraseMatcherRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "phraseMatcher": { + "type": "PhraseMatcher", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListPhraseMatchersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListPhraseMatchersResponse": { + "fields": { + "phraseMatchers": { + "rule": "repeated", + "type": "PhraseMatcher", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPhraseMatcherRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/PhraseMatcher" + } + } + } + }, + "DeletePhraseMatcherRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/PhraseMatcher" + } + } + } + }, + "UpdatePhraseMatcherRequest": { + "fields": { + "phraseMatcher": { + "type": "PhraseMatcher", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "GetSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Settings" + } + } + } + }, + "UpdateSettingsRequest": { + "fields": { + "settings": { + "type": "Settings", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateViewRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "view": { + "type": "View", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/View" + } + } + } + }, + "ListViewsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListViewsResponse": { + "fields": { + "views": { + "rule": "repeated", + "type": "View", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateViewRequest": { + "fields": { + "view": { + "type": "View", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/View" + } + } + } + }, + "Conversation": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/Conversation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}" + }, + "oneofs": { + "metadata": { + "oneof": [ + "callMetadata" + ] + }, + "expiration": { + "oneof": [ + "expireTime", + "ttl" + ] + } + }, + "fields": { + "callMetadata": { + "type": "CallMetadata", + "id": 7 + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 15 + }, + "ttl": { + "type": "google.protobuf.Duration", + "id": 16, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "dataSource": { + "type": "ConversationDataSource", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 17 + }, + "languageCode": { + "type": "string", + "id": 14 + }, + "agentId": { + "type": "string", + "id": 5 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "transcript": { + "type": "Transcript", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "medium": { + "type": "Medium", + "id": 9, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "turnCount": { + "type": "int32", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "latestAnalysis": { + "type": "Analysis", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "runtimeAnnotations": { + "rule": "repeated", + "type": "RuntimeAnnotation", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dialogflowIntents": { + "keyType": "string", + "type": "DialogflowIntent", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "obfuscatedUserId": { + "type": "string", + "id": 21 + } + }, + "nested": { + "CallMetadata": { + "fields": { + "customerChannel": { + "type": "int32", + "id": 1 + }, + "agentChannel": { + "type": "int32", + "id": 2 + } + } + }, + "Transcript": { + "fields": { + "transcriptSegments": { + "rule": "repeated", + "type": "TranscriptSegment", + "id": 1 + } + }, + "nested": { + "TranscriptSegment": { + "fields": { + "messageTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "text": { + "type": "string", + "id": 1 + }, + "confidence": { + "type": "float", + "id": 2 + }, + "words": { + "rule": "repeated", + "type": "WordInfo", + "id": 3 + }, + "languageCode": { + "type": "string", + "id": 4 + }, + "channelTag": { + "type": "int32", + "id": 5 + }, + "segmentParticipant": { + "type": "ConversationParticipant", + "id": 9 + }, + "dialogflowSegmentMetadata": { + "type": "DialogflowSegmentMetadata", + "id": 10 + }, + "sentiment": { + "type": "SentimentData", + "id": 11 + } + }, + "nested": { + "WordInfo": { + "fields": { + "startOffset": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "endOffset": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "word": { + "type": "string", + "id": 3 + }, + "confidence": { + "type": "float", + "id": 4 + } + } + }, + "DialogflowSegmentMetadata": { + "fields": { + "smartReplyAllowlistCovered": { + "type": "bool", + "id": 1 + } + } + } + } + } + } + }, + "Medium": { + "values": { + "MEDIUM_UNSPECIFIED": 0, + "PHONE_CALL": 1, + "CHAT": 2 + } + } + } + }, + "Analysis": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/Analysis", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "analysisResult": { + "type": "AnalysisResult", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ConversationDataSource": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource", + "dialogflowSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "GcsSource", + "id": 1 + }, + "dialogflowSource": { + "type": "DialogflowSource", + "id": 3 + } + } + }, + "GcsSource": { + "fields": { + "audioUri": { + "type": "string", + "id": 1 + }, + "transcriptUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "DialogflowSource": { + "fields": { + "dialogflowConversation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audioUri": { + "type": "string", + "id": 3 + } + } + }, + "AnalysisResult": { + "oneofs": { + "metadata": { + "oneof": [ + "callAnalysisMetadata" + ] + } + }, + "fields": { + "callAnalysisMetadata": { + "type": "CallAnalysisMetadata", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + } + }, + "nested": { + "CallAnalysisMetadata": { + "fields": { + "annotations": { + "rule": "repeated", + "type": "CallAnnotation", + "id": 2 + }, + "entities": { + "keyType": "string", + "type": "Entity", + "id": 3 + }, + "sentiments": { + "rule": "repeated", + "type": "ConversationLevelSentiment", + "id": 4 + }, + "intents": { + "keyType": "string", + "type": "Intent", + "id": 6 + }, + "phraseMatchers": { + "keyType": "string", + "type": "PhraseMatchData", + "id": 7 + }, + "issueModelResult": { + "type": "IssueModelResult", + "id": 8 + } + } + } + } + }, + "IssueModelResult": { + "fields": { + "issueModel": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + }, + "issues": { + "rule": "repeated", + "type": "IssueAssignment", + "id": 2 + } + } + }, + "ConversationLevelSentiment": { + "fields": { + "channelTag": { + "type": "int32", + "id": 1 + }, + "sentimentData": { + "type": "SentimentData", + "id": 2 + } + } + }, + "IssueAssignment": { + "fields": { + "issue": { + "type": "string", + "id": 1 + }, + "score": { + "type": "double", + "id": 2 + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "CallAnnotation": { + "oneofs": { + "data": { + "oneof": [ + "interruptionData", + "sentimentData", + "silenceData", + "holdData", + "entityMentionData", + "intentMatchData", + "phraseMatchData" + ] + } + }, + "fields": { + "interruptionData": { + "type": "InterruptionData", + "id": 10 + }, + "sentimentData": { + "type": "SentimentData", + "id": 11 + }, + "silenceData": { + "type": "SilenceData", + "id": 12 + }, + "holdData": { + "type": "HoldData", + "id": 13 + }, + "entityMentionData": { + "type": "EntityMentionData", + "id": 15 + }, + "intentMatchData": { + "type": "IntentMatchData", + "id": 16 + }, + "phraseMatchData": { + "type": "PhraseMatchData", + "id": 17 + }, + "channelTag": { + "type": "int32", + "id": 1 + }, + "annotationStartBoundary": { + "type": "AnnotationBoundary", + "id": 4 + }, + "annotationEndBoundary": { + "type": "AnnotationBoundary", + "id": 5 + } + } + }, + "AnnotationBoundary": { + "oneofs": { + "detailedBoundary": { + "oneof": [ + "wordIndex" + ] + } + }, + "fields": { + "wordIndex": { + "type": "int32", + "id": 3 + }, + "transcriptIndex": { + "type": "int32", + "id": 1 + } + } + }, + "Entity": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "salience": { + "type": "float", + "id": 4 + }, + "sentiment": { + "type": "SentimentData", + "id": 5 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "PERSON": 1, + "LOCATION": 2, + "ORGANIZATION": 3, + "EVENT": 4, + "WORK_OF_ART": 5, + "CONSUMER_GOOD": 6, + "OTHER": 7, + "PHONE_NUMBER": 9, + "ADDRESS": 10, + "DATE": 11, + "NUMBER": 12, + "PRICE": 13 + } + } + } + }, + "Intent": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } + }, + "PhraseMatchData": { + "fields": { + "phraseMatcher": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } + }, + "DialogflowIntent": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + } + } + }, + "InterruptionData": { + "fields": {} + }, + "SilenceData": { + "fields": {} + }, + "HoldData": { + "fields": {} + }, + "EntityMentionData": { + "fields": { + "entityUniqueId": { + "type": "string", + "id": 1 + }, + "type": { + "type": "MentionType", + "id": 2 + }, + "sentiment": { + "type": "SentimentData", + "id": 3 + } + }, + "nested": { + "MentionType": { + "values": { + "MENTION_TYPE_UNSPECIFIED": 0, + "PROPER": 1, + "COMMON": 2 + } + } + } + }, + "IntentMatchData": { + "fields": { + "intentUniqueId": { + "type": "string", + "id": 1 + } + } + }, + "SentimentData": { + "fields": { + "magnitude": { + "type": "float", + "id": 1 + }, + "score": { + "type": "float", + "id": 2 + } + } + }, + "IssueModel": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/IssueModel", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/issueModels/{issue_model}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "inputDataConfig": { + "type": "InputDataConfig", + "id": 6 + }, + "trainingStats": { + "type": "IssueModelLabelStats", + "id": 7, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "InputDataConfig": { + "fields": { + "medium": { + "type": "Conversation.Medium", + "id": 1, + "options": { + "deprecated": true + } + }, + "trainingConversationsCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "filter": { + "type": "string", + "id": 3 + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "UNDEPLOYED": 1, + "DEPLOYING": 2, + "DEPLOYED": 3, + "UNDEPLOYING": 4, + "DELETING": 5 + } + } + } + }, + "Issue": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/Issue", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "IssueModelLabelStats": { + "fields": { + "analyzedConversationsCount": { + "type": "int64", + "id": 1 + }, + "unclassifiedConversationsCount": { + "type": "int64", + "id": 2 + }, + "issueStats": { + "keyType": "string", + "type": "IssueStats", + "id": 3 + } + }, + "nested": { + "IssueStats": { + "fields": { + "issue": { + "type": "string", + "id": 1 + }, + "labeledConversationsCount": { + "type": "int64", + "id": 2 + }, + "displayName": { + "type": "string", + "id": 3 + } + } + } + } + }, + "PhraseMatcher": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/PhraseMatcher", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "revisionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "versionTag": { + "type": "string", + "id": 3 + }, + "revisionCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 5 + }, + "type": { + "type": "PhraseMatcherType", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "active": { + "type": "bool", + "id": 7 + }, + "phraseMatchRuleGroups": { + "rule": "repeated", + "type": "PhraseMatchRuleGroup", + "id": 8 + }, + "activationUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "roleMatch": { + "type": "ConversationParticipant.Role", + "id": 10 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "PhraseMatcherType": { + "values": { + "PHRASE_MATCHER_TYPE_UNSPECIFIED": 0, + "ALL_OF": 1, + "ANY_OF": 2 + } + } + } + }, + "PhraseMatchRuleGroup": { + "fields": { + "type": { + "type": "PhraseMatchRuleGroupType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "phraseMatchRules": { + "rule": "repeated", + "type": "PhraseMatchRule", + "id": 2 + } + }, + "nested": { + "PhraseMatchRuleGroupType": { + "values": { + "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED": 0, + "ALL_OF": 1, + "ANY_OF": 2 + } + } + } + }, + "PhraseMatchRule": { + "fields": { + "query": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "negated": { + "type": "bool", + "id": 2 + }, + "config": { + "type": "PhraseMatchRuleConfig", + "id": 3 + } + } + }, + "PhraseMatchRuleConfig": { + "oneofs": { + "config": { + "oneof": [ + "exactMatchConfig" + ] + } + }, + "fields": { + "exactMatchConfig": { + "type": "ExactMatchConfig", + "id": 1 + } + } + }, + "ExactMatchConfig": { + "fields": { + "caseSensitive": { + "type": "bool", + "id": 1 + } + } + }, + "Settings": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/Settings", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/settings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "languageCode": { + "type": "string", + "id": 4 + }, + "conversationTtl": { + "type": "google.protobuf.Duration", + "id": 5 + }, + "pubsubNotificationSettings": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "analysisConfig": { + "type": "AnalysisConfig", + "id": 7 + } + }, + "nested": { + "AnalysisConfig": { + "fields": { + "runtimeIntegrationAnalysisPercentage": { + "type": "double", + "id": 1 + } + } + } + } + }, + "RuntimeAnnotation": { + "oneofs": { + "data": { + "oneof": [ + "articleSuggestion", + "faqAnswer", + "smartReply", + "smartComposeSuggestion", + "dialogflowInteraction" + ] + } + }, + "fields": { + "articleSuggestion": { + "type": "ArticleSuggestionData", + "id": 6 + }, + "faqAnswer": { + "type": "FaqAnswerData", + "id": 7 + }, + "smartReply": { + "type": "SmartReplyData", + "id": 8 + }, + "smartComposeSuggestion": { + "type": "SmartComposeSuggestionData", + "id": 9 + }, + "dialogflowInteraction": { + "type": "DialogflowInteractionData", + "id": 10 + }, + "annotationId": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "startBoundary": { + "type": "AnnotationBoundary", + "id": 3 + }, + "endBoundary": { + "type": "AnnotationBoundary", + "id": 4 + }, + "answerFeedback": { + "type": "AnswerFeedback", + "id": 5 + } + } + }, + "AnswerFeedback": { + "fields": { + "correctnessLevel": { + "type": "CorrectnessLevel", + "id": 1 + }, + "clicked": { + "type": "bool", + "id": 2 + }, + "displayed": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "CorrectnessLevel": { + "values": { + "CORRECTNESS_LEVEL_UNSPECIFIED": 0, + "NOT_CORRECT": 1, + "PARTIALLY_CORRECT": 2, + "FULLY_CORRECT": 3 + } + } + } + }, + "ArticleSuggestionData": { + "fields": { + "title": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "confidenceScore": { + "type": "float", + "id": 3 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "queryRecord": { + "type": "string", + "id": 5 + }, + "source": { + "type": "string", + "id": 6 + } + } + }, + "FaqAnswerData": { + "fields": { + "answer": { + "type": "string", + "id": 1 + }, + "confidenceScore": { + "type": "float", + "id": 2 + }, + "question": { + "type": "string", + "id": 3 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "queryRecord": { + "type": "string", + "id": 5 + }, + "source": { + "type": "string", + "id": 6 + } + } + }, + "SmartReplyData": { + "fields": { + "reply": { + "type": "string", + "id": 1 + }, + "confidenceScore": { + "type": "double", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "queryRecord": { + "type": "string", + "id": 4 + } + } + }, + "SmartComposeSuggestionData": { + "fields": { + "suggestion": { + "type": "string", + "id": 1 + }, + "confidenceScore": { + "type": "double", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "queryRecord": { + "type": "string", + "id": 4 + } + } + }, + "DialogflowInteractionData": { + "fields": { + "dialogflowIntentId": { + "type": "string", + "id": 1 + }, + "confidence": { + "type": "float", + "id": 2 + } + } + }, + "ConversationParticipant": { + "oneofs": { + "participant": { + "oneof": [ + "dialogflowParticipantName", + "userId" + ] + } + }, + "fields": { + "dialogflowParticipantName": { + "type": "string", + "id": 5, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" + } + }, + "userId": { + "type": "string", + "id": 6 + }, + "dialogflowParticipant": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "obfuscatedExternalUserId": { + "type": "string", + "id": 3 + }, + "role": { + "type": "Role", + "id": 2 + } + }, + "nested": { + "Role": { + "values": { + "ROLE_UNSPECIFIED": 0, + "HUMAN_AGENT": 1, + "AUTOMATED_AGENT": 2, + "END_USER": 3, + "ANY_AGENT": 4 + } + } + } + }, + "View": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/View", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/views/{view}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "value": { + "type": "string", + "id": 5 + } + } + } + } + } + } + } + } + }, + "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", + "cc_enable_arenas": true + }, + "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" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "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 + } + }, + "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": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "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, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "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": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "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 + } + }, + "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": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "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_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "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 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "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": { + "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 + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "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 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "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 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "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 + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "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 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "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 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "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 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-contactcenterinsights/samples/README.md b/packages/google-cloud-contactcenterinsights/samples/README.md new file mode 100644 index 00000000000..09c3f771d54 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/README.md @@ -0,0 +1,680 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Contact Center AI Insights API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Contact_center_insights.calculate_issue_model_stats](#contact_center_insights.calculate_issue_model_stats) + * [Contact_center_insights.calculate_stats](#contact_center_insights.calculate_stats) + * [Contact_center_insights.create_analysis](#contact_center_insights.create_analysis) + * [Contact_center_insights.create_conversation](#contact_center_insights.create_conversation) + * [Contact_center_insights.create_issue_model](#contact_center_insights.create_issue_model) + * [Contact_center_insights.create_phrase_matcher](#contact_center_insights.create_phrase_matcher) + * [Contact_center_insights.create_view](#contact_center_insights.create_view) + * [Contact_center_insights.delete_analysis](#contact_center_insights.delete_analysis) + * [Contact_center_insights.delete_conversation](#contact_center_insights.delete_conversation) + * [Contact_center_insights.delete_issue_model](#contact_center_insights.delete_issue_model) + * [Contact_center_insights.delete_phrase_matcher](#contact_center_insights.delete_phrase_matcher) + * [Contact_center_insights.delete_view](#contact_center_insights.delete_view) + * [Contact_center_insights.deploy_issue_model](#contact_center_insights.deploy_issue_model) + * [Contact_center_insights.export_insights_data](#contact_center_insights.export_insights_data) + * [Contact_center_insights.get_analysis](#contact_center_insights.get_analysis) + * [Contact_center_insights.get_conversation](#contact_center_insights.get_conversation) + * [Contact_center_insights.get_issue](#contact_center_insights.get_issue) + * [Contact_center_insights.get_issue_model](#contact_center_insights.get_issue_model) + * [Contact_center_insights.get_phrase_matcher](#contact_center_insights.get_phrase_matcher) + * [Contact_center_insights.get_settings](#contact_center_insights.get_settings) + * [Contact_center_insights.get_view](#contact_center_insights.get_view) + * [Contact_center_insights.list_analyses](#contact_center_insights.list_analyses) + * [Contact_center_insights.list_conversations](#contact_center_insights.list_conversations) + * [Contact_center_insights.list_issue_models](#contact_center_insights.list_issue_models) + * [Contact_center_insights.list_issues](#contact_center_insights.list_issues) + * [Contact_center_insights.list_phrase_matchers](#contact_center_insights.list_phrase_matchers) + * [Contact_center_insights.list_views](#contact_center_insights.list_views) + * [Contact_center_insights.undeploy_issue_model](#contact_center_insights.undeploy_issue_model) + * [Contact_center_insights.update_conversation](#contact_center_insights.update_conversation) + * [Contact_center_insights.update_issue](#contact_center_insights.update_issue) + * [Contact_center_insights.update_issue_model](#contact_center_insights.update_issue_model) + * [Contact_center_insights.update_phrase_matcher](#contact_center_insights.update_phrase_matcher) + * [Contact_center_insights.update_settings](#contact_center_insights.update_settings) + * [Contact_center_insights.update_view](#contact_center_insights.update_view) + * [Quickstart](#quickstart) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Contact_center_insights.calculate_issue_model_stats + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js` + + +----- + + + + +### Contact_center_insights.calculate_stats + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js` + + +----- + + + + +### Contact_center_insights.create_analysis + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js` + + +----- + + + + +### Contact_center_insights.create_conversation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js` + + +----- + + + + +### Contact_center_insights.create_issue_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js` + + +----- + + + + +### Contact_center_insights.create_phrase_matcher + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.js` + + +----- + + + + +### Contact_center_insights.create_view + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js` + + +----- + + + + +### Contact_center_insights.delete_analysis + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js` + + +----- + + + + +### Contact_center_insights.delete_conversation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js` + + +----- + + + + +### Contact_center_insights.delete_issue_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js` + + +----- + + + + +### Contact_center_insights.delete_phrase_matcher + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js` + + +----- + + + + +### Contact_center_insights.delete_view + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js` + + +----- + + + + +### Contact_center_insights.deploy_issue_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js` + + +----- + + + + +### Contact_center_insights.export_insights_data + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js` + + +----- + + + + +### Contact_center_insights.get_analysis + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js` + + +----- + + + + +### Contact_center_insights.get_conversation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js` + + +----- + + + + +### Contact_center_insights.get_issue + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js` + + +----- + + + + +### Contact_center_insights.get_issue_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js` + + +----- + + + + +### Contact_center_insights.get_phrase_matcher + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js` + + +----- + + + + +### Contact_center_insights.get_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js` + + +----- + + + + +### Contact_center_insights.get_view + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js` + + +----- + + + + +### Contact_center_insights.list_analyses + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js` + + +----- + + + + +### Contact_center_insights.list_conversations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js` + + +----- + + + + +### Contact_center_insights.list_issue_models + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js` + + +----- + + + + +### Contact_center_insights.list_issues + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.js` + + +----- + + + + +### Contact_center_insights.list_phrase_matchers + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.js` + + +----- + + + + +### Contact_center_insights.list_views + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js` + + +----- + + + + +### Contact_center_insights.undeploy_issue_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js` + + +----- + + + + +### Contact_center_insights.update_conversation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js` + + +----- + + + + +### Contact_center_insights.update_issue + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js` + + +----- + + + + +### Contact_center_insights.update_issue_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.js` + + +----- + + + + +### Contact_center_insights.update_phrase_matcher + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.js` + + +----- + + + + +### Contact_center_insights.update_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js` + + +----- + + + + +### Contact_center_insights.update_view + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/quickstart.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/test/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/test/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/test/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/solutions/contact-center diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js new file mode 100644 index 00000000000..c672863a42b --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js @@ -0,0 +1,61 @@ +// Copyright 2022 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(issueModel) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_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 resource name of the issue model to query against. + */ + // const issueModel = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCalculateIssueModelStats() { + // Construct request + const request = { + issueModel, + }; + + // Run request + const response = await contactcenterinsightsClient.calculateIssueModelStats(request); + console.log(response); + } + + callCalculateIssueModelStats(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js new file mode 100644 index 00000000000..8935fc364ac --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js @@ -0,0 +1,66 @@ +// Copyright 2022 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(location) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CalculateStats_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 location of the conversations. + */ + // const location = 'abc123' + /** + * A filter to reduce results to a specific subset. This field is useful for + * getting statistics about conversations with specific properties. + */ + // const filter = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCalculateStats() { + // Construct request + const request = { + location, + }; + + // Run request + const response = await contactcenterinsightsClient.calculateStats(request); + console.log(response); + } + + callCalculateStats(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CalculateStats_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js new file mode 100644 index 00000000000..679fe549909 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js @@ -0,0 +1,67 @@ +// Copyright 2022 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, analysis) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_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 parent resource of the analysis. + */ + // const parent = 'abc123' + /** + * Required. The analysis to create. + */ + // const analysis = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreateAnalysis() { + // Construct request + const request = { + parent, + analysis, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.createAnalysis(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateAnalysis(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js new file mode 100644 index 00000000000..92ff6b7db32 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js @@ -0,0 +1,74 @@ +// Copyright 2022 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, conversation) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_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 parent resource of the conversation. + */ + // const parent = 'abc123' + /** + * Required. The conversation resource to create. + */ + // const conversation = {} + /** + * A unique ID for the new conversation. This ID will become the final + * component of the conversation's resource name. If no ID is specified, a + * server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + */ + // const conversationId = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreateConversation() { + // Construct request + const request = { + parent, + conversation, + }; + + // Run request + const response = await contactcenterinsightsClient.createConversation(request); + console.log(response); + } + + callCreateConversation(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js new file mode 100644 index 00000000000..5dbcb70672f --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js @@ -0,0 +1,67 @@ +// Copyright 2022 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, issueModel) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_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 parent resource of the issue model. + */ + // const parent = 'abc123' + /** + * Required. The issue model to create. + */ + // const issueModel = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreateIssueModel() { + // Construct request + const request = { + parent, + issueModel, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.createIssueModel(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateIssueModel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.js new file mode 100644 index 00000000000..0564e15f0c7 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.js @@ -0,0 +1,69 @@ +// Copyright 2022 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, phraseMatcher) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreatePhraseMatcher_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 parent resource of the phrase matcher. Required. The location to create + * a phrase matcher for. + * Format: `projects//locations/` or + * `projects//locations/` + */ + // const parent = 'abc123' + /** + * Required. The phrase matcher resource to create. + */ + // const phraseMatcher = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreatePhraseMatcher() { + // Construct request + const request = { + parent, + phraseMatcher, + }; + + // Run request + const response = await contactcenterinsightsClient.createPhraseMatcher(request); + console.log(response); + } + + callCreatePhraseMatcher(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreatePhraseMatcher_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js new file mode 100644 index 00000000000..6faa48a506f --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js @@ -0,0 +1,69 @@ +// Copyright 2022 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, view) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_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 parent resource of the view. Required. The location to create + * a view for. + * Format: `projects//locations/` or + * `projects//locations/` + */ + // const parent = 'abc123' + /** + * Required. The view resource to create. + */ + // const view = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreateView() { + // Construct request + const request = { + parent, + view, + }; + + // Run request + const response = await contactcenterinsightsClient.createView(request); + console.log(response); + } + + callCreateView(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js new file mode 100644 index 00000000000..1608d0b6918 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysis_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 analysis to delete. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeleteAnalysis() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deleteAnalysis(request); + console.log(response); + } + + callDeleteAnalysis(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysis_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js new file mode 100644 index 00000000000..6afcbbccd01 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js @@ -0,0 +1,67 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeleteConversation_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 conversation to delete. + */ + // const name = 'abc123' + /** + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + */ + // const force = true + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeleteConversation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deleteConversation(request); + console.log(response); + } + + callDeleteConversation(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteConversation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js new file mode 100644 index 00000000000..1c193bf1d0c --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js @@ -0,0 +1,62 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_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 issue model to delete. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeleteIssueModel() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.deleteIssueModel(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteIssueModel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js new file mode 100644 index 00000000000..da8bb0ea342 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeletePhraseMatcher_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 phrase matcher to delete. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeletePhraseMatcher() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deletePhraseMatcher(request); + console.log(response); + } + + callDeletePhraseMatcher(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeletePhraseMatcher_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js new file mode 100644 index 00000000000..f16c9572571 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_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 view to delete. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeleteView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deleteView(request); + console.log(response); + } + + callDeleteView(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js new file mode 100644 index 00000000000..720266cc2d1 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js @@ -0,0 +1,62 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_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 issue model to deploy. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeployIssueModel() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.deployIssueModel(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeployIssueModel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js new file mode 100644 index 00000000000..a217af60a77 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js @@ -0,0 +1,81 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_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. + */ + /** + * Specified if sink is a BigQuery table. + */ + // const bigQueryDestination = {} + /** + * Required. The parent resource to export data from. + */ + // const parent = 'abc123' + /** + * A filter to reduce results to a specific subset. Useful for exporting + * conversations with specific properties. + */ + // const filter = 'abc123' + /** + * A fully qualified KMS key name for BigQuery tables protected by CMEK. + * Format: + * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} + */ + // const kmsKey = 'abc123' + /** + * Options for what to do if the destination table already exists. + */ + // const writeDisposition = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callExportInsightsData() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.exportInsightsData(request); + const [response] = await operation.promise(); + console.log(response); + } + + callExportInsightsData(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js new file mode 100644 index 00000000000..9352b396b22 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysis_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 analysis to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetAnalysis() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getAnalysis(request); + console.log(response); + } + + callGetAnalysis(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysis_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js new file mode 100644 index 00000000000..4c33825e6b3 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js @@ -0,0 +1,65 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetConversation_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 conversation to get. + */ + // const name = 'abc123' + /** + * The level of details of the conversation. Default is `FULL`. + */ + // const view = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetConversation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getConversation(request); + console.log(response); + } + + callGetConversation(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetConversation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js new file mode 100644 index 00000000000..1862cc15195 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_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 issue to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetIssue() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getIssue(request); + console.log(response); + } + + callGetIssue(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js new file mode 100644 index 00000000000..014e48e8c94 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetIssueModel_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 issue model to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetIssueModel() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getIssueModel(request); + console.log(response); + } + + callGetIssueModel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetIssueModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js new file mode 100644 index 00000000000..07419bb40b3 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_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 phrase matcher to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetPhraseMatcher() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getPhraseMatcher(request); + console.log(response); + } + + callGetPhraseMatcher(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js new file mode 100644 index 00000000000..4819fa4c657 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetSettings_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 settings resource to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getSettings(request); + console.log(response); + } + + callGetSettings(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js new file mode 100644 index 00000000000..5e332347813 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetView_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 view to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetView() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getView(request); + console.log(response); + } + + callGetView(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js new file mode 100644 index 00000000000..951d859cb28 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js @@ -0,0 +1,81 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_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 parent resource of the analyses. + */ + // const parent = 'abc123' + /** + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + */ + // const pageSize = 1234 + /** + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + */ + // const pageToken = 'abc123' + /** + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + */ + // const filter = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListAnalyses() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await contactcenterinsightsClient.listAnalysesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAnalyses(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js new file mode 100644 index 00000000000..a7328a9ea27 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js @@ -0,0 +1,85 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_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 parent resource of the conversation. + */ + // const parent = 'abc123' + /** + * The maximum number of conversations to return in the response. A valid page + * size ranges from 0 to 1,000 inclusive. If the page size is zero or + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + */ + // const pageSize = 1234 + /** + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + */ + // const pageToken = 'abc123' + /** + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + */ + // const filter = 'abc123' + /** + * The level of details of the conversation. Default is `BASIC`. + */ + // const view = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListConversations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await contactcenterinsightsClient.listConversationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConversations(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js new file mode 100644 index 00000000000..c493e90cd97 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListIssueModels_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 parent resource of the issue model. + */ + // const parent = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListIssueModels() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await contactcenterinsightsClient.listIssueModels(request); + console.log(response); + } + + callListIssueModels(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListIssueModels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.js new file mode 100644 index 00000000000..3dd60cb31e7 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.js @@ -0,0 +1,61 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListIssues_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 parent resource of the issue. + */ + // const parent = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListIssues() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await contactcenterinsightsClient.listIssues(request); + console.log(response); + } + + callListIssues(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListIssues_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.js new file mode 100644 index 00000000000..d18d56dabe7 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.js @@ -0,0 +1,81 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_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 parent resource of the phrase matcher. + */ + // const parent = 'abc123' + /** + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + */ + // const pageSize = 1234 + /** + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + */ + // const pageToken = 'abc123' + /** + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + */ + // const filter = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListPhraseMatchers() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await contactcenterinsightsClient.listPhraseMatchersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPhraseMatchers(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js new file mode 100644 index 00000000000..b01eabb3c9a --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js @@ -0,0 +1,76 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_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 parent resource of the views. + */ + // const parent = 'abc123' + /** + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + */ + // const pageSize = 1234 + /** + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + */ + // const pageToken = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListViews() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await contactcenterinsightsClient.listViewsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListViews(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js new file mode 100644 index 00000000000..8ec02172b6b --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js @@ -0,0 +1,62 @@ +// Copyright 2022 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 contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_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 issue model to undeploy. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUndeployIssueModel() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.undeployIssueModel(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUndeployIssueModel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js new file mode 100644 index 00000000000..53be2c18b81 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js @@ -0,0 +1,65 @@ +// Copyright 2022 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(conversation) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateConversation_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 new values for the conversation. + */ + // const conversation = {} + /** + * The list of fields to be updated. + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdateConversation() { + // Construct request + const request = { + conversation, + }; + + // Run request + const response = await contactcenterinsightsClient.updateConversation(request); + console.log(response); + } + + callUpdateConversation(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateConversation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js new file mode 100644 index 00000000000..e01afb85cc8 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js @@ -0,0 +1,65 @@ +// Copyright 2022 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(issue) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssue_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 new values for the issue. + */ + // const issue = {} + /** + * The list of fields to be updated. + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdateIssue() { + // Construct request + const request = { + issue, + }; + + // Run request + const response = await contactcenterinsightsClient.updateIssue(request); + console.log(response); + } + + callUpdateIssue(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssue_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.js new file mode 100644 index 00000000000..13e04b841c2 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.js @@ -0,0 +1,65 @@ +// Copyright 2022 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(issueModel) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssueModel_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 new values for the issue model. + */ + // const issueModel = {} + /** + * The list of fields to be updated. + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdateIssueModel() { + // Construct request + const request = { + issueModel, + }; + + // Run request + const response = await contactcenterinsightsClient.updateIssueModel(request); + console.log(response); + } + + callUpdateIssueModel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssueModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.js new file mode 100644 index 00000000000..b33b4cc0115 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.js @@ -0,0 +1,65 @@ +// Copyright 2022 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(phraseMatcher) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdatePhraseMatcher_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 new values for the phrase matcher. + */ + // const phraseMatcher = {} + /** + * The list of fields to be updated. + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdatePhraseMatcher() { + // Construct request + const request = { + phraseMatcher, + }; + + // Run request + const response = await contactcenterinsightsClient.updatePhraseMatcher(request); + console.log(response); + } + + callUpdatePhraseMatcher(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdatePhraseMatcher_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js new file mode 100644 index 00000000000..f64596152fe --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js @@ -0,0 +1,66 @@ +// Copyright 2022 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(settings, updateMask) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateSettings_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 new settings values. + */ + // const settings = {} + /** + * Required. The list of fields to be updated. + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdateSettings() { + // Construct request + const request = { + settings, + updateMask, + }; + + // Run request + const response = await contactcenterinsightsClient.updateSettings(request); + console.log(response); + } + + callUpdateSettings(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.js new file mode 100644 index 00000000000..809e22badf4 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.js @@ -0,0 +1,65 @@ +// Copyright 2022 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(view) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_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 new view. + */ + // const view = {} + /** + * The list of fields to be updated. + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdateView() { + // Construct request + const request = { + view, + }; + + // Run request + const response = await contactcenterinsightsClient.updateView(request); + console.log(response); + } + + callUpdateView(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json new file mode 100644 index 00000000000..f6704aa2812 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -0,0 +1,1499 @@ +{ + "clientLibrary": { + "name": "nodejs-contactcenterinsights", + "version": "2.1.2", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.contactcenterinsights.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_async", + "title": "ContactCenterInsights createConversation Sample", + "origin": "API_DEFINITION", + "description": " Creates a conversation.", + "canonical": true, + "file": "contact_center_insights.create_conversation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConversation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateConversation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "conversation", + "type": ".google.cloud.contactcenterinsights.v1.Conversation" + }, + { + "name": "conversation_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.Conversation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreateConversation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateConversation", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateConversation_async", + "title": "ContactCenterInsights updateConversation Sample", + "origin": "API_DEFINITION", + "description": " Updates a conversation.", + "canonical": true, + "file": "contact_center_insights.update_conversation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConversation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateConversation", + "async": true, + "parameters": [ + { + "name": "conversation", + "type": ".google.cloud.contactcenterinsights.v1.Conversation" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.Conversation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdateConversation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateConversation", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetConversation_async", + "title": "ContactCenterInsights getConversation Sample", + "origin": "API_DEFINITION", + "description": " Gets a conversation.", + "canonical": true, + "file": "contact_center_insights.get_conversation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConversation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetConversation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.contactcenterinsights.v1.ConversationView" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.Conversation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetConversation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetConversation", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_async", + "title": "ContactCenterInsights listConversations Sample", + "origin": "API_DEFINITION", + "description": " Lists conversations.", + "canonical": true, + "file": "contact_center_insights.list_conversations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConversations", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListConversations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.contactcenterinsights.v1.ConversationView" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListConversationsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListConversations", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListConversations", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteConversation_async", + "title": "ContactCenterInsights deleteConversation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a conversation.", + "canonical": true, + "file": "contact_center_insights.delete_conversation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConversation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteConversation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteConversation", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteConversation", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_async", + "title": "ContactCenterInsights createAnalysis Sample", + "origin": "API_DEFINITION", + "description": " Creates an analysis. The long running operation is done when the analysis has completed.", + "canonical": true, + "file": "contact_center_insights.create_analysis.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAnalysis", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateAnalysis", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "analysis", + "type": ".google.cloud.contactcenterinsights.v1.Analysis" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreateAnalysis", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateAnalysis", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysis_async", + "title": "ContactCenterInsights getAnalysis Sample", + "origin": "API_DEFINITION", + "description": " Gets an analysis.", + "canonical": true, + "file": "contact_center_insights.get_analysis.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAnalysis", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetAnalysis", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.Analysis", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetAnalysis", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetAnalysis", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_async", + "title": "ContactCenterInsights listAnalyses Sample", + "origin": "API_DEFINITION", + "description": " Lists analyses.", + "canonical": true, + "file": "contact_center_insights.list_analyses.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAnalyses", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAnalyses", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListAnalysesResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListAnalyses", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAnalyses", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysis_async", + "title": "ContactCenterInsights deleteAnalysis Sample", + "origin": "API_DEFINITION", + "description": " Deletes an analysis.", + "canonical": true, + "file": "contact_center_insights.delete_analysis.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAnalysis", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteAnalysis", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteAnalysis", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteAnalysis", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_async", + "title": "ContactCenterInsights exportInsightsData Sample", + "origin": "API_DEFINITION", + "description": " Export insights data to a destination defined in the request body.", + "canonical": true, + "file": "contact_center_insights.export_insights_data.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExportInsightsData", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportInsightsData", + "async": true, + "parameters": [ + { + "name": "big_query_destination", + "type": ".google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "kms_key", + "type": "TYPE_STRING" + }, + { + "name": "write_disposition", + "type": ".google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ExportInsightsData", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportInsightsData", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_async", + "title": "ContactCenterInsights createIssueModel Sample", + "origin": "API_DEFINITION", + "description": " Creates an issue model.", + "canonical": true, + "file": "contact_center_insights.create_issue_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateIssueModel", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "issue_model", + "type": ".google.cloud.contactcenterinsights.v1.IssueModel" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreateIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateIssueModel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssueModel_async", + "title": "ContactCenterInsights updateIssueModel Sample", + "origin": "API_DEFINITION", + "description": " Updates an issue model.", + "canonical": true, + "file": "contact_center_insights.update_issue_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssueModel", + "async": true, + "parameters": [ + { + "name": "issue_model", + "type": ".google.cloud.contactcenterinsights.v1.IssueModel" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.IssueModel", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdateIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssueModel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetIssueModel_async", + "title": "ContactCenterInsights getIssueModel Sample", + "origin": "API_DEFINITION", + "description": " Gets an issue model.", + "canonical": true, + "file": "contact_center_insights.get_issue_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssueModel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.IssueModel", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssueModel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListIssueModels_async", + "title": "ContactCenterInsights listIssueModels Sample", + "origin": "API_DEFINITION", + "description": " Lists issue models.", + "canonical": true, + "file": "contact_center_insights.list_issue_models.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListIssueModels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssueModels", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListIssueModelsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListIssueModels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssueModels", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_async", + "title": "ContactCenterInsights deleteIssueModel Sample", + "origin": "API_DEFINITION", + "description": " Deletes an issue model.", + "canonical": true, + "file": "contact_center_insights.delete_issue_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssueModel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssueModel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_async", + "title": "ContactCenterInsights deployIssueModel Sample", + "origin": "API_DEFINITION", + "description": " Deploys an issue model. Returns an error if a model is already deployed. An issue model can only be used in analysis after it has been deployed.", + "canonical": true, + "file": "contact_center_insights.deploy_issue_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeployIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeployIssueModel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeployIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeployIssueModel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_async", + "title": "ContactCenterInsights undeployIssueModel Sample", + "origin": "API_DEFINITION", + "description": " Undeploys an issue model. An issue model can not be used in analysis after it has been undeployed.", + "canonical": true, + "file": "contact_center_insights.undeploy_issue_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeployIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UndeployIssueModel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UndeployIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UndeployIssueModel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_async", + "title": "ContactCenterInsights getIssue Sample", + "origin": "API_DEFINITION", + "description": " Gets an issue.", + "canonical": true, + "file": "contact_center_insights.get_issue.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIssue", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssue", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.Issue", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetIssue", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssue", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListIssues_async", + "title": "ContactCenterInsights listIssues Sample", + "origin": "API_DEFINITION", + "description": " Lists issues.", + "canonical": true, + "file": "contact_center_insights.list_issues.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListIssues", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssues", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListIssuesResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListIssues", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssues", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssue_async", + "title": "ContactCenterInsights updateIssue Sample", + "origin": "API_DEFINITION", + "description": " Updates an issue.", + "canonical": true, + "file": "contact_center_insights.update_issue.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateIssue", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssue", + "async": true, + "parameters": [ + { + "name": "issue", + "type": ".google.cloud.contactcenterinsights.v1.Issue" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.Issue", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdateIssue", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssue", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_async", + "title": "ContactCenterInsights calculateIssueModelStats Sample", + "origin": "API_DEFINITION", + "description": " Gets an issue model's statistics.", + "canonical": true, + "file": "contact_center_insights.calculate_issue_model_stats.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CalculateIssueModelStats", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateIssueModelStats", + "async": true, + "parameters": [ + { + "name": "issue_model", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CalculateIssueModelStats", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateIssueModelStats", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreatePhraseMatcher_async", + "title": "ContactCenterInsights createPhraseMatcher Sample", + "origin": "API_DEFINITION", + "description": " Creates a phrase matcher.", + "canonical": true, + "file": "contact_center_insights.create_phrase_matcher.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePhraseMatcher", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreatePhraseMatcher", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "phrase_matcher", + "type": ".google.cloud.contactcenterinsights.v1.PhraseMatcher" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.PhraseMatcher", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreatePhraseMatcher", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreatePhraseMatcher", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_async", + "title": "ContactCenterInsights getPhraseMatcher Sample", + "origin": "API_DEFINITION", + "description": " Gets a phrase matcher.", + "canonical": true, + "file": "contact_center_insights.get_phrase_matcher.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPhraseMatcher", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetPhraseMatcher", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.PhraseMatcher", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetPhraseMatcher", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetPhraseMatcher", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_async", + "title": "ContactCenterInsights listPhraseMatchers Sample", + "origin": "API_DEFINITION", + "description": " Lists phrase matchers.", + "canonical": true, + "file": "contact_center_insights.list_phrase_matchers.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPhraseMatchers", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListPhraseMatchers", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListPhraseMatchers", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListPhraseMatchers", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeletePhraseMatcher_async", + "title": "ContactCenterInsights deletePhraseMatcher Sample", + "origin": "API_DEFINITION", + "description": " Deletes a phrase matcher.", + "canonical": true, + "file": "contact_center_insights.delete_phrase_matcher.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePhraseMatcher", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeletePhraseMatcher", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeletePhraseMatcher", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeletePhraseMatcher", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdatePhraseMatcher_async", + "title": "ContactCenterInsights updatePhraseMatcher Sample", + "origin": "API_DEFINITION", + "description": " Updates a phrase matcher.", + "canonical": true, + "file": "contact_center_insights.update_phrase_matcher.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdatePhraseMatcher", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdatePhraseMatcher", + "async": true, + "parameters": [ + { + "name": "phrase_matcher", + "type": ".google.cloud.contactcenterinsights.v1.PhraseMatcher" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.PhraseMatcher", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdatePhraseMatcher", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdatePhraseMatcher", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CalculateStats_async", + "title": "ContactCenterInsights calculateStats Sample", + "origin": "API_DEFINITION", + "description": " Gets conversation statistics.", + "canonical": true, + "file": "contact_center_insights.calculate_stats.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CalculateStats", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateStats", + "async": true, + "parameters": [ + { + "name": "location", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.CalculateStatsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CalculateStats", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateStats", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetSettings_async", + "title": "ContactCenterInsights getSettings Sample", + "origin": "API_DEFINITION", + "description": " Gets project-level settings.", + "canonical": true, + "file": "contact_center_insights.get_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSettings", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.Settings", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetSettings", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetSettings", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateSettings_async", + "title": "ContactCenterInsights updateSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates project-level settings.", + "canonical": true, + "file": "contact_center_insights.update_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSettings", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateSettings", + "async": true, + "parameters": [ + { + "name": "settings", + "type": ".google.cloud.contactcenterinsights.v1.Settings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.Settings", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdateSettings", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateSettings", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_async", + "title": "ContactCenterInsights createView Sample", + "origin": "API_DEFINITION", + "description": " Creates a view.", + "canonical": true, + "file": "contact_center_insights.create_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateView", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateView", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.contactcenterinsights.v1.View" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.View", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreateView", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateView", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetView_async", + "title": "ContactCenterInsights getView Sample", + "origin": "API_DEFINITION", + "description": " Gets a view.", + "canonical": true, + "file": "contact_center_insights.get_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetView", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.View", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetView", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetView", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_async", + "title": "ContactCenterInsights listViews Sample", + "origin": "API_DEFINITION", + "description": " Lists views.", + "canonical": true, + "file": "contact_center_insights.list_views.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListViews", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListViews", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListViewsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListViews", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListViews", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_async", + "title": "ContactCenterInsights updateView Sample", + "origin": "API_DEFINITION", + "description": " Updates a view.", + "canonical": true, + "file": "contact_center_insights.update_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateView", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateView", + "async": true, + "parameters": [ + { + "name": "view", + "type": ".google.cloud.contactcenterinsights.v1.View" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.View", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdateView", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateView", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_async", + "title": "ContactCenterInsights deleteView Sample", + "origin": "API_DEFINITION", + "description": " Deletes a view.", + "canonical": true, + "file": "contact_center_insights.delete_view.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteView", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteView", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteView", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteView", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-contactcenterinsights/samples/package.json b/packages/google-cloud-contactcenterinsights/samples/package.json new file mode 100644 index 00000000000..ea2f4be25ae --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/package.json @@ -0,0 +1,26 @@ +{ + "name": "nodejs-contact-center-insights", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=12.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-cloud/bigquery": "^6.0.0", + "@google-cloud/contact-center-insights": "^2.1.2", + "@google-cloud/pubsub": "^3.0.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^9.0.0", + "uuid": "^9.0.0" + } +} \ No newline at end of file diff --git a/packages/google-cloud-contactcenterinsights/samples/quickstart.js b/packages/google-cloud-contactcenterinsights/samples/quickstart.js new file mode 100644 index 00000000000..1f9b56b5dfe --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/quickstart.js @@ -0,0 +1,47 @@ +// 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. +// + +'use strict'; + +async function main(projectId, location) { + // [START nodejs_contact_center_insights_quickstart] + // Imports the Google Cloud client library + + const { + ContactCenterInsightsClient, + } = require('@google-cloud/contact-center-insights'); + + // TODO(developer): replace with your prefered project ID. + // const projectId = 'my-project' + + const client = new ContactCenterInsightsClient(); + + //TODO(library generator): write the actual function you will be testing + async function listConversations() { + const conversations = await client.listConversations({ + parent: `projects/${projectId}/locations/${location}`, + }); + console.info(conversations); + } + listConversations(); + // [END nodejs_contact_center_insights_quickstart] +} + +main(...process.argv.slice(2)).catch(err => { + console.error(err.message); + process.exitCode = 1; +}); +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); diff --git a/packages/google-cloud-contactcenterinsights/samples/test/quickstart.js b/packages/google-cloud-contactcenterinsights/samples/test/quickstart.js new file mode 100644 index 00000000000..c2a9f580a56 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/test/quickstart.js @@ -0,0 +1,49 @@ +// +// 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'; + +const path = require('path'); +const cp = require('child_process'); +const {before, describe, it} = require('mocha'); +// eslint-disable-next-line node/no-missing-require +const { + ContactCenterInsightsClient, +} = require('@google-cloud/contact-center-insights'); +// eslint-disable-next-line no-unused-vars, node/no-missing-require +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +const client = new ContactCenterInsightsClient(); + +describe('Quickstart', () => { + let projectId; + + before(async () => { + projectId = await client.getProjectId(); + }); + + it('should run quickstart', async () => { + const stdout = execSync(`node ./quickstart.js ${projectId} us-central1`, { + cwd, + }); + assert.match(stdout, /\[\]/); + }); +}); diff --git a/packages/google-cloud-contactcenterinsights/src/index.ts b/packages/google-cloud-contactcenterinsights/src/index.ts new file mode 100644 index 00000000000..f76ba9cb2b7 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2022 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 synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const ContactCenterInsightsClient = v1.ContactCenterInsightsClient; +type ContactCenterInsightsClient = v1.ContactCenterInsightsClient; + +export {v1, ContactCenterInsightsClient}; +export default {v1, ContactCenterInsightsClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts new file mode 100644 index 00000000000..5c7d5c96dcb --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts @@ -0,0 +1,5168 @@ +// Copyright 2022 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, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/contact_center_insights_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './contact_center_insights_client_config.json'; +const version = require('../../../package.json').version; + +/** + * An API that lets users analyze and explore their business conversation data. + * @class + * @memberof v1 + */ +export class ContactCenterInsightsClient { + 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}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + contactCenterInsightsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ContactCenterInsightsClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 ContactCenterInsightsClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof ContactCenterInsightsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + analysisPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}' + ), + conversationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/conversations/{conversation}' + ), + issuePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}' + ), + issueModelPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/issueModels/{issue_model}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + phraseMatcherPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}' + ), + settingsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/settings' + ), + viewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/views/{view}' + ), + }; + + // 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 = { + listConversations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'conversations' + ), + listAnalyses: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'analyses' + ), + listPhraseMatchers: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'phraseMatchers' + ), + listViews: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'views' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createAnalysisResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.Analysis' + ) as gax.protobuf.Type; + const createAnalysisMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata' + ) as gax.protobuf.Type; + const exportInsightsDataResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse' + ) as gax.protobuf.Type; + const exportInsightsDataMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata' + ) as gax.protobuf.Type; + const createIssueModelResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.IssueModel' + ) as gax.protobuf.Type; + const createIssueModelMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata' + ) as gax.protobuf.Type; + const deleteIssueModelResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteIssueModelMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata' + ) as gax.protobuf.Type; + const deployIssueModelResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse' + ) as gax.protobuf.Type; + const deployIssueModelMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata' + ) as gax.protobuf.Type; + const undeployIssueModelResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse' + ) as gax.protobuf.Type; + const undeployIssueModelMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createAnalysis: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createAnalysisResponse.decode.bind(createAnalysisResponse), + createAnalysisMetadata.decode.bind(createAnalysisMetadata) + ), + exportInsightsData: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + exportInsightsDataResponse.decode.bind(exportInsightsDataResponse), + exportInsightsDataMetadata.decode.bind(exportInsightsDataMetadata) + ), + createIssueModel: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createIssueModelResponse.decode.bind(createIssueModelResponse), + createIssueModelMetadata.decode.bind(createIssueModelMetadata) + ), + deleteIssueModel: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteIssueModelResponse.decode.bind(deleteIssueModelResponse), + deleteIssueModelMetadata.decode.bind(deleteIssueModelMetadata) + ), + deployIssueModel: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deployIssueModelResponse.decode.bind(deployIssueModelResponse), + deployIssueModelMetadata.decode.bind(deployIssueModelMetadata) + ), + undeployIssueModel: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + undeployIssueModelResponse.decode.bind(undeployIssueModelResponse), + undeployIssueModelMetadata.decode.bind(undeployIssueModelMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.contactcenterinsights.v1.ContactCenterInsights', + 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.contactCenterInsightsStub) { + return this.contactCenterInsightsStub; + } + + // Put together the "service stub" for + // google.cloud.contactcenterinsights.v1.ContactCenterInsights. + this.contactCenterInsightsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.contactcenterinsights.v1.ContactCenterInsights' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.contactcenterinsights.v1 + .ContactCenterInsights, + 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 contactCenterInsightsStubMethods = [ + 'createConversation', + 'updateConversation', + 'getConversation', + 'listConversations', + 'deleteConversation', + 'createAnalysis', + 'getAnalysis', + 'listAnalyses', + 'deleteAnalysis', + 'exportInsightsData', + 'createIssueModel', + 'updateIssueModel', + 'getIssueModel', + 'listIssueModels', + 'deleteIssueModel', + 'deployIssueModel', + 'undeployIssueModel', + 'getIssue', + 'listIssues', + 'updateIssue', + 'calculateIssueModelStats', + 'createPhraseMatcher', + 'getPhraseMatcher', + 'listPhraseMatchers', + 'deletePhraseMatcher', + 'updatePhraseMatcher', + 'calculateStats', + 'getSettings', + 'updateSettings', + 'createView', + 'getView', + 'listViews', + 'updateView', + 'deleteView', + ]; + for (const methodName of contactCenterInsightsStubMethods) { + const callPromise = this.contactCenterInsightsStub.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] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.contactCenterInsightsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'contactcenterinsights.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'contactcenterinsights.googleapis.com'; + } + + /** + * 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 -- + // ------------------- + /** + * Creates a conversation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the conversation. + * @param {google.cloud.contactcenterinsights.v1.Conversation} request.conversation + * Required. The conversation resource to create. + * @param {string} request.conversationId + * A unique ID for the new conversation. This ID will become the final + * component of the conversation's resource name. If no ID is specified, a + * server-generated ID will be used. + * + * This value should be 4-64 characters and must match the regular + * expression `^{@link 0-9|a-z0-9-]{4,64}$`. Valid characters are `[a-z}-` + * @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 [Conversation]{@link google.cloud.contactcenterinsights.v1.Conversation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_conversation.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_async + */ + createConversation( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest + | undefined + ), + {} | undefined + ] + >; + createConversation( + request: protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConversation( + request: protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConversation( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateConversationRequest + | 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(); + return this.innerApiCalls.createConversation(request, options, callback); + } + /** + * Updates a conversation. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.Conversation} request.conversation + * Required. The new values for the conversation. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be 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 [Conversation]{@link google.cloud.contactcenterinsights.v1.Conversation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.update_conversation.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateConversation_async + */ + updateConversation( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest + | undefined + ), + {} | undefined + ] + >; + updateConversation( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateConversation( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateConversation( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateConversationRequest + | 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({ + 'conversation.name': request.conversation!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateConversation(request, options, callback); + } + /** + * Gets a conversation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the conversation to get. + * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view + * The level of details of the conversation. Default is `FULL`. + * @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 [Conversation]{@link google.cloud.contactcenterinsights.v1.Conversation}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.get_conversation.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetConversation_async + */ + getConversation( + request?: protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest + | undefined + ), + {} | undefined + ] + >; + getConversation( + request: protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConversation( + request: protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConversation( + request?: protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IConversation, + | protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetConversationRequest + | 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(); + return this.innerApiCalls.getConversation(request, options, callback); + } + /** + * Deletes a conversation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the conversation to delete. + * @param {boolean} request.force + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.delete_conversation.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteConversation_async + */ + deleteConversation( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest + | undefined + ), + {} | undefined + ] + >; + deleteConversation( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConversation( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConversation( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteConversationRequest + | 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(); + return this.innerApiCalls.deleteConversation(request, options, callback); + } + /** + * Gets an analysis. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the analysis to get. + * @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 [Analysis]{@link google.cloud.contactcenterinsights.v1.Analysis}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.get_analysis.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysis_async + */ + getAnalysis( + request?: protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest + | undefined + ), + {} | undefined + ] + >; + getAnalysis( + request: protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAnalysis( + request: protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAnalysis( + request?: protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRequest + | 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(); + return this.innerApiCalls.getAnalysis(request, options, callback); + } + /** + * Deletes an analysis. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the analysis to delete. + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.delete_analysis.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysis_async + */ + deleteAnalysis( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest + | undefined + ), + {} | undefined + ] + >; + deleteAnalysis( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAnalysis( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAnalysis( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest + | 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(); + return this.innerApiCalls.deleteAnalysis(request, options, callback); + } + /** + * Updates an issue model. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.IssueModel} request.issueModel + * Required. The new values for the issue model. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be 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 [IssueModel]{@link google.cloud.contactcenterinsights.v1.IssueModel}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.update_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssueModel_async + */ + updateIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest + | undefined + ), + {} | undefined + ] + >; + updateIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueModelRequest + | 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({ + 'issue_model.name': request.issueModel!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateIssueModel(request, options, callback); + } + /** + * Gets an issue model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the issue model to get. + * @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 [IssueModel]{@link google.cloud.contactcenterinsights.v1.IssueModel}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.get_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetIssueModel_async + */ + getIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest + | undefined + ), + {} | undefined + ] + >; + getIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + | protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + | protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + | protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + | protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetIssueModelRequest + | 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(); + return this.innerApiCalls.getIssueModel(request, options, callback); + } + /** + * Lists issue models. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the issue model. + * @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 [ListIssueModelsResponse]{@link google.cloud.contactcenterinsights.v1.ListIssueModelsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.list_issue_models.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListIssueModels_async + */ + listIssueModels( + request?: protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IListIssueModelsResponse, + ( + | protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest + | undefined + ), + {} | undefined + ] + >; + listIssueModels( + request: protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IListIssueModelsResponse, + | protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + listIssueModels( + request: protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IListIssueModelsResponse, + | protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + listIssueModels( + request?: protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IListIssueModelsResponse, + | protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IListIssueModelsResponse, + | protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IListIssueModelsResponse, + ( + | protos.google.cloud.contactcenterinsights.v1.IListIssueModelsRequest + | 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(); + return this.innerApiCalls.listIssueModels(request, options, callback); + } + /** + * Gets an issue. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the issue to get. + * @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 [Issue]{@link google.cloud.contactcenterinsights.v1.Issue}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.get_issue.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_async + */ + getIssue( + request?: protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IIssue, + protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest | undefined, + {} | undefined + ] + >; + getIssue( + request: protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssue, + | protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getIssue( + request: protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssue, + | protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getIssue( + request?: protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IIssue, + | protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssue, + | protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IIssue, + protos.google.cloud.contactcenterinsights.v1.IGetIssueRequest | 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(); + return this.innerApiCalls.getIssue(request, options, callback); + } + /** + * Lists issues. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the issue. + * @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 [ListIssuesResponse]{@link google.cloud.contactcenterinsights.v1.ListIssuesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.list_issues.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListIssues_async + */ + listIssues( + request?: protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IListIssuesResponse, + ( + | protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest + | undefined + ), + {} | undefined + ] + >; + listIssues( + request: protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IListIssuesResponse, + | protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + listIssues( + request: protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IListIssuesResponse, + | protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + listIssues( + request?: protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IListIssuesResponse, + | protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IListIssuesResponse, + | protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IListIssuesResponse, + ( + | protos.google.cloud.contactcenterinsights.v1.IListIssuesRequest + | 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(); + return this.innerApiCalls.listIssues(request, options, callback); + } + /** + * Updates an issue. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.Issue} request.issue + * Required. The new values for the issue. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be 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 [Issue]{@link google.cloud.contactcenterinsights.v1.Issue}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.update_issue.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssue_async + */ + updateIssue( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IIssue, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest + | undefined + ), + {} | undefined + ] + >; + updateIssue( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssue, + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateIssue( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssue, + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateIssue( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IIssue, + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IIssue, + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IIssue, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateIssueRequest + | 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({ + 'issue.name': request.issue!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateIssue(request, options, callback); + } + /** + * Gets an issue model's statistics. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.issueModel + * Required. The resource name of the issue model to query against. + * @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 [CalculateIssueModelStatsResponse]{@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_async + */ + calculateIssueModelStats( + request?: protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, + ( + | protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest + | undefined + ), + {} | undefined + ] + >; + calculateIssueModelStats( + request: protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, + | protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + calculateIssueModelStats( + request: protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, + | protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + calculateIssueModelStats( + request?: protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, + | protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, + | protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, + ( + | protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest + | 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({ + issue_model: request.issueModel ?? '', + }); + this.initialize(); + return this.innerApiCalls.calculateIssueModelStats( + request, + options, + callback + ); + } + /** + * Creates a phrase matcher. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the phrase matcher. Required. The location to create + * a phrase matcher for. + * Format: `projects//locations/` or + * `projects//locations/` + * @param {google.cloud.contactcenterinsights.v1.PhraseMatcher} request.phraseMatcher + * Required. The phrase matcher resource to create. + * @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 [PhraseMatcher]{@link google.cloud.contactcenterinsights.v1.PhraseMatcher}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_phrase_matcher.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreatePhraseMatcher_async + */ + createPhraseMatcher( + request?: protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest + | undefined + ), + {} | undefined + ] + >; + createPhraseMatcher( + request: protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createPhraseMatcher( + request: protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createPhraseMatcher( + request?: protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest + | 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(); + return this.innerApiCalls.createPhraseMatcher(request, options, callback); + } + /** + * Gets a phrase matcher. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the phrase matcher to get. + * @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 [PhraseMatcher]{@link google.cloud.contactcenterinsights.v1.PhraseMatcher}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.get_phrase_matcher.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_async + */ + getPhraseMatcher( + request?: protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest + | undefined + ), + {} | undefined + ] + >; + getPhraseMatcher( + request: protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPhraseMatcher( + request: protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPhraseMatcher( + request?: protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest + | 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(); + return this.innerApiCalls.getPhraseMatcher(request, options, callback); + } + /** + * Deletes a phrase matcher. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the phrase matcher to delete. + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.delete_phrase_matcher.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeletePhraseMatcher_async + */ + deletePhraseMatcher( + request?: protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest + | undefined + ), + {} | undefined + ] + >; + deletePhraseMatcher( + request: protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deletePhraseMatcher( + request: protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deletePhraseMatcher( + request?: protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest + | 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(); + return this.innerApiCalls.deletePhraseMatcher(request, options, callback); + } + /** + * Updates a phrase matcher. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.PhraseMatcher} request.phraseMatcher + * Required. The new values for the phrase matcher. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be 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 [PhraseMatcher]{@link google.cloud.contactcenterinsights.v1.PhraseMatcher}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.update_phrase_matcher.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdatePhraseMatcher_async + */ + updatePhraseMatcher( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest + | undefined + ), + {} | undefined + ] + >; + updatePhraseMatcher( + request: protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updatePhraseMatcher( + request: protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updatePhraseMatcher( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + | protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest + | 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({ + 'phrase_matcher.name': request.phraseMatcher!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updatePhraseMatcher(request, options, callback); + } + /** + * Gets conversation statistics. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.location + * Required. The location of the conversations. + * @param {string} request.filter + * A filter to reduce results to a specific subset. This field is useful for + * getting statistics about conversations with specific properties. + * @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 [CalculateStatsResponse]{@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.calculate_stats.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CalculateStats_async + */ + calculateStats( + request?: protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.ICalculateStatsResponse, + ( + | protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest + | undefined + ), + {} | undefined + ] + >; + calculateStats( + request: protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.ICalculateStatsResponse, + | protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + calculateStats( + request: protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.ICalculateStatsResponse, + | protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + calculateStats( + request?: protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.ICalculateStatsResponse, + | protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.ICalculateStatsResponse, + | protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.ICalculateStatsResponse, + ( + | protos.google.cloud.contactcenterinsights.v1.ICalculateStatsRequest + | 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({ + location: request.location ?? '', + }); + this.initialize(); + return this.innerApiCalls.calculateStats(request, options, callback); + } + /** + * Gets project-level settings. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the settings resource to get. + * @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 [Settings]{@link google.cloud.contactcenterinsights.v1.Settings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.get_settings.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetSettings_async + */ + getSettings( + request?: protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.ISettings, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest + | undefined + ), + {} | undefined + ] + >; + getSettings( + request: protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.ISettings, + | protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getSettings( + request: protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.ISettings, + | protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getSettings( + request?: protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.ISettings, + | protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.ISettings, + | protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.ISettings, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetSettingsRequest + | 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(); + return this.innerApiCalls.getSettings(request, options, callback); + } + /** + * Updates project-level settings. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.Settings} request.settings + * Required. The new settings values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be 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 [Settings]{@link google.cloud.contactcenterinsights.v1.Settings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.update_settings.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateSettings_async + */ + updateSettings( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.ISettings, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest + | undefined + ), + {} | undefined + ] + >; + updateSettings( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.ISettings, + | protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateSettings( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.ISettings, + | protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateSettings( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.ISettings, + | protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.ISettings, + | protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.ISettings, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest + | 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({ + 'settings.name': request.settings!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateSettings(request, options, callback); + } + /** + * Creates a view. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the view. Required. The location to create + * a view for. + * Format: `projects//locations/` or + * `projects//locations/` + * @param {google.cloud.contactcenterinsights.v1.View} request.view + * Required. The view resource to create. + * @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 [View]{@link google.cloud.contactcenterinsights.v1.View}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_view.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_async + */ + createView( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | undefined + ), + {} | undefined + ] + >; + createView( + request: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createView( + request: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createView( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | 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(); + return this.innerApiCalls.createView(request, options, callback); + } + /** + * Gets a view. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the view to get. + * @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 [View]{@link google.cloud.contactcenterinsights.v1.View}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.get_view.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetView_async + */ + getView( + request?: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView, + protos.google.cloud.contactcenterinsights.v1.IGetViewRequest | undefined, + {} | undefined + ] + >; + getView( + request: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getView( + request: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getView( + request?: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView, + protos.google.cloud.contactcenterinsights.v1.IGetViewRequest | 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(); + return this.innerApiCalls.getView(request, options, callback); + } + /** + * Updates a view. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.View} request.view + * Required. The new view. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be 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 [View]{@link google.cloud.contactcenterinsights.v1.View}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.update_view.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_async + */ + updateView( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | undefined + ), + {} | undefined + ] + >; + updateView( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateView( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateView( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | 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({ + 'view.name': request.view!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateView(request, options, callback); + } + /** + * Deletes a view. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the view to delete. + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.delete_view.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_async + */ + deleteView( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | undefined + ), + {} | undefined + ] + >; + deleteView( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteView( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteView( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | 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(); + return this.innerApiCalls.deleteView(request, options, callback); + } + + /** + * Creates an analysis. The long running operation is done when the analysis + * has completed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the analysis. + * @param {google.cloud.contactcenterinsights.v1.Analysis} request.analysis + * Required. The analysis to create. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_analysis.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_async + */ + createAnalysis( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createAnalysis( + request: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAnalysis( + request: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAnalysis( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | 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(); + return this.innerApiCalls.createAnalysis(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createAnalysis()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_analysis.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_async + */ + async checkCreateAnalysisProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.Analysis, + protos.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createAnalysis, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.Analysis, + protos.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + >; + } + /** + * Export insights data to a destination defined in the request body. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination} request.bigQueryDestination + * Specified if sink is a BigQuery table. + * @param {string} request.parent + * Required. The parent resource to export data from. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for exporting + * conversations with specific properties. + * @param {string} request.kmsKey + * A fully qualified KMS key name for BigQuery tables protected by CMEK. + * Format: + * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition} request.writeDisposition + * Options for what to do if the destination table already exists. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.export_insights_data.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_async + */ + exportInsightsData( + request?: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + exportInsightsData( + request: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportInsightsData( + request: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportInsightsData( + request?: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | 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(); + return this.innerApiCalls.exportInsightsData(request, options, callback); + } + /** + * Check the status of the long running operation returned by `exportInsightsData()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.export_insights_data.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_async + */ + async checkExportInsightsDataProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.exportInsightsData, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + >; + } + /** + * Creates an issue model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the issue model. + * @param {google.cloud.contactcenterinsights.v1.IssueModel} request.issueModel + * Required. The issue model to create. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_async + */ + createIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | 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(); + return this.innerApiCalls.createIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_async + */ + async checkCreateIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IssueModel, + protos.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.IssueModel, + protos.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + >; + } + /** + * Deletes an issue model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the issue model to delete. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.delete_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_async + */ + deleteIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | 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(); + return this.innerApiCalls.deleteIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.delete_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_async + */ + async checkDeleteIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + >; + } + /** + * Deploys an issue model. Returns an error if a model is already deployed. + * An issue model can only be used in analysis after it has been deployed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The issue model to deploy. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.deploy_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_async + */ + deployIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deployIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deployIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deployIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | 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(); + return this.innerApiCalls.deployIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deployIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.deploy_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_async + */ + async checkDeployIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deployIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + >; + } + /** + * Undeploys an issue model. + * An issue model can not be used in analysis after it has been undeployed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The issue model to undeploy. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.undeploy_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_async + */ + undeployIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + undeployIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + undeployIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + undeployIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | 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(); + return this.innerApiCalls.undeployIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `undeployIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.undeploy_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_async + */ + async checkUndeployIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.undeployIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + >; + } + /** + * Lists conversations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the conversation. + * @param {number} request.pageSize + * The maximum number of conversations to return in the response. A valid page + * size ranges from 0 to 1,000 inclusive. If the page size is zero or + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + * @param {string} request.pageToken + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view + * The level of details of the conversation. Default is `BASIC`. + * @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 [Conversation]{@link google.cloud.contactcenterinsights.v1.Conversation}. + * 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 `listConversationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation[], + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + ] + >; + listConversations( + request: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IConversation + > + ): void; + listConversations( + request: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IConversation + > + ): void; + listConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IConversation + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IConversation + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation[], + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + ] + > | 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(); + return this.innerApiCalls.listConversations(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the conversation. + * @param {number} request.pageSize + * The maximum number of conversations to return in the response. A valid page + * size ranges from 0 to 1,000 inclusive. If the page size is zero or + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + * @param {string} request.pageToken + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view + * The level of details of the conversation. Default is `BASIC`. + * @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 [Conversation]{@link google.cloud.contactcenterinsights.v1.Conversation} 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 `listConversationsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConversationsStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + 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['listConversations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConversations.createStream( + this.innerApiCalls.listConversations as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listConversations`, 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. The parent resource of the conversation. + * @param {number} request.pageSize + * The maximum number of conversations to return in the response. A valid page + * size ranges from 0 to 1,000 inclusive. If the page size is zero or + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + * @param {string} request.pageToken + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view + * The level of details of the conversation. Default is `BASIC`. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Conversation]{@link google.cloud.contactcenterinsights.v1.Conversation}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.list_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_async + */ + listConversationsAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + 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['listConversations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConversations.asyncIterate( + this.innerApiCalls['listConversations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists analyses. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the analyses. + * @param {number} request.pageSize + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @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 [Analysis]{@link google.cloud.contactcenterinsights.v1.Analysis}. + * 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 `listAnalysesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAnalyses( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IAnalysis[], + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + ] + >; + listAnalyses( + request: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysis + > + ): void; + listAnalyses( + request: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysis + > + ): void; + listAnalyses( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysis + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysis + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IAnalysis[], + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + ] + > | 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(); + return this.innerApiCalls.listAnalyses(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the analyses. + * @param {number} request.pageSize + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @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 [Analysis]{@link google.cloud.contactcenterinsights.v1.Analysis} 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 `listAnalysesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAnalysesStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + 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['listAnalyses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAnalyses.createStream( + this.innerApiCalls.listAnalyses as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAnalyses`, 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. The parent resource of the analyses. + * @param {number} request.pageSize + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Analysis]{@link google.cloud.contactcenterinsights.v1.Analysis}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.list_analyses.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_async + */ + listAnalysesAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + 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['listAnalyses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAnalyses.asyncIterate( + this.innerApiCalls['listAnalyses'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists phrase matchers. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the phrase matcher. + * @param {number} request.pageSize + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * @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 [PhraseMatcher]{@link google.cloud.contactcenterinsights.v1.PhraseMatcher}. + * 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 `listPhraseMatchersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPhraseMatchers( + request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[], + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + ] + >; + listPhraseMatchers( + request: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + > + ): void; + listPhraseMatchers( + request: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + > + ): void; + listPhraseMatchers( + request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[], + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + ] + > | 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(); + return this.innerApiCalls.listPhraseMatchers(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the phrase matcher. + * @param {number} request.pageSize + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * @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 [PhraseMatcher]{@link google.cloud.contactcenterinsights.v1.PhraseMatcher} 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 `listPhraseMatchersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPhraseMatchersStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + 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['listPhraseMatchers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPhraseMatchers.createStream( + this.innerApiCalls.listPhraseMatchers as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listPhraseMatchers`, 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. The parent resource of the phrase matcher. + * @param {number} request.pageSize + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [PhraseMatcher]{@link google.cloud.contactcenterinsights.v1.PhraseMatcher}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.list_phrase_matchers.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_async + */ + listPhraseMatchersAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + 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['listPhraseMatchers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPhraseMatchers.asyncIterate( + this.innerApiCalls['listPhraseMatchers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists views. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the views. + * @param {number} request.pageSize + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * @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 [View]{@link google.cloud.contactcenterinsights.v1.View}. + * 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 `listViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listViews( + request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView[], + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + ] + >; + listViews( + request: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IView + > + ): void; + listViews( + request: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IView + > + ): void; + listViews( + request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IView + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IView + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView[], + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + ] + > | 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(); + return this.innerApiCalls.listViews(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the views. + * @param {number} request.pageSize + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * @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 [View]{@link google.cloud.contactcenterinsights.v1.View} 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 `listViewsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listViewsStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + 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['listViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listViews.createStream( + this.innerApiCalls.listViews as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listViews`, 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. The parent resource of the views. + * @param {number} request.pageSize + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [View]{@link google.cloud.contactcenterinsights.v1.View}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.list_views.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_async + */ + listViewsAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + 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['listViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listViews.asyncIterate( + this.innerApiCalls['listViews'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * [google.longrunning.Operation]{@link + * external:"google.longrunning.Operation"}. The promise has a method named + * "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See [gax.CallOptions]{@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified analysis resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} conversation + * @param {string} analysis + * @returns {string} Resource name string. + */ + analysisPath( + project: string, + location: string, + conversation: string, + analysis: string + ) { + return this.pathTemplates.analysisPathTemplate.render({ + project: project, + location: location, + conversation: conversation, + analysis: analysis, + }); + } + + /** + * Parse the project from Analysis resource. + * + * @param {string} analysisName + * A fully-qualified path representing Analysis resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnalysisName(analysisName: string) { + return this.pathTemplates.analysisPathTemplate.match(analysisName).project; + } + + /** + * Parse the location from Analysis resource. + * + * @param {string} analysisName + * A fully-qualified path representing Analysis resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnalysisName(analysisName: string) { + return this.pathTemplates.analysisPathTemplate.match(analysisName).location; + } + + /** + * Parse the conversation from Analysis resource. + * + * @param {string} analysisName + * A fully-qualified path representing Analysis resource. + * @returns {string} A string representing the conversation. + */ + matchConversationFromAnalysisName(analysisName: string) { + return this.pathTemplates.analysisPathTemplate.match(analysisName) + .conversation; + } + + /** + * Parse the analysis from Analysis resource. + * + * @param {string} analysisName + * A fully-qualified path representing Analysis resource. + * @returns {string} A string representing the analysis. + */ + matchAnalysisFromAnalysisName(analysisName: string) { + return this.pathTemplates.analysisPathTemplate.match(analysisName).analysis; + } + + /** + * Return a fully-qualified conversation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} conversation + * @returns {string} Resource name string. + */ + conversationPath(project: string, location: string, conversation: string) { + return this.pathTemplates.conversationPathTemplate.render({ + project: project, + location: location, + conversation: conversation, + }); + } + + /** + * Parse the project from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName) + .project; + } + + /** + * Parse the location from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName) + .location; + } + + /** + * Parse the conversation from Conversation resource. + * + * @param {string} conversationName + * A fully-qualified path representing Conversation resource. + * @returns {string} A string representing the conversation. + */ + matchConversationFromConversationName(conversationName: string) { + return this.pathTemplates.conversationPathTemplate.match(conversationName) + .conversation; + } + + /** + * Return a fully-qualified issue resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} issue_model + * @param {string} issue + * @returns {string} Resource name string. + */ + issuePath( + project: string, + location: string, + issueModel: string, + issue: string + ) { + return this.pathTemplates.issuePathTemplate.render({ + project: project, + location: location, + issue_model: issueModel, + issue: issue, + }); + } + + /** + * Parse the project from Issue resource. + * + * @param {string} issueName + * A fully-qualified path representing Issue resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIssueName(issueName: string) { + return this.pathTemplates.issuePathTemplate.match(issueName).project; + } + + /** + * Parse the location from Issue resource. + * + * @param {string} issueName + * A fully-qualified path representing Issue resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIssueName(issueName: string) { + return this.pathTemplates.issuePathTemplate.match(issueName).location; + } + + /** + * Parse the issue_model from Issue resource. + * + * @param {string} issueName + * A fully-qualified path representing Issue resource. + * @returns {string} A string representing the issue_model. + */ + matchIssueModelFromIssueName(issueName: string) { + return this.pathTemplates.issuePathTemplate.match(issueName).issue_model; + } + + /** + * Parse the issue from Issue resource. + * + * @param {string} issueName + * A fully-qualified path representing Issue resource. + * @returns {string} A string representing the issue. + */ + matchIssueFromIssueName(issueName: string) { + return this.pathTemplates.issuePathTemplate.match(issueName).issue; + } + + /** + * Return a fully-qualified issueModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} issue_model + * @returns {string} Resource name string. + */ + issueModelPath(project: string, location: string, issueModel: string) { + return this.pathTemplates.issueModelPathTemplate.render({ + project: project, + location: location, + issue_model: issueModel, + }); + } + + /** + * Parse the project from IssueModel resource. + * + * @param {string} issueModelName + * A fully-qualified path representing IssueModel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIssueModelName(issueModelName: string) { + return this.pathTemplates.issueModelPathTemplate.match(issueModelName) + .project; + } + + /** + * Parse the location from IssueModel resource. + * + * @param {string} issueModelName + * A fully-qualified path representing IssueModel resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIssueModelName(issueModelName: string) { + return this.pathTemplates.issueModelPathTemplate.match(issueModelName) + .location; + } + + /** + * Parse the issue_model from IssueModel resource. + * + * @param {string} issueModelName + * A fully-qualified path representing IssueModel resource. + * @returns {string} A string representing the issue_model. + */ + matchIssueModelFromIssueModelName(issueModelName: string) { + return this.pathTemplates.issueModelPathTemplate.match(issueModelName) + .issue_model; + } + + /** + * 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 phraseMatcher resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} phrase_matcher + * @returns {string} Resource name string. + */ + phraseMatcherPath(project: string, location: string, phraseMatcher: string) { + return this.pathTemplates.phraseMatcherPathTemplate.render({ + project: project, + location: location, + phrase_matcher: phraseMatcher, + }); + } + + /** + * Parse the project from PhraseMatcher resource. + * + * @param {string} phraseMatcherName + * A fully-qualified path representing PhraseMatcher resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPhraseMatcherName(phraseMatcherName: string) { + return this.pathTemplates.phraseMatcherPathTemplate.match(phraseMatcherName) + .project; + } + + /** + * Parse the location from PhraseMatcher resource. + * + * @param {string} phraseMatcherName + * A fully-qualified path representing PhraseMatcher resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPhraseMatcherName(phraseMatcherName: string) { + return this.pathTemplates.phraseMatcherPathTemplate.match(phraseMatcherName) + .location; + } + + /** + * Parse the phrase_matcher from PhraseMatcher resource. + * + * @param {string} phraseMatcherName + * A fully-qualified path representing PhraseMatcher resource. + * @returns {string} A string representing the phrase_matcher. + */ + matchPhraseMatcherFromPhraseMatcherName(phraseMatcherName: string) { + return this.pathTemplates.phraseMatcherPathTemplate.match(phraseMatcherName) + .phrase_matcher; + } + + /** + * Return a fully-qualified settings resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + settingsPath(project: string, location: string) { + return this.pathTemplates.settingsPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Settings resource. + * + * @param {string} settingsName + * A fully-qualified path representing Settings resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSettingsName(settingsName: string) { + return this.pathTemplates.settingsPathTemplate.match(settingsName).project; + } + + /** + * Parse the location from Settings resource. + * + * @param {string} settingsName + * A fully-qualified path representing Settings resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSettingsName(settingsName: string) { + return this.pathTemplates.settingsPathTemplate.match(settingsName).location; + } + + /** + * Return a fully-qualified view resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} view + * @returns {string} Resource name string. + */ + viewPath(project: string, location: string, view: string) { + return this.pathTemplates.viewPathTemplate.render({ + project: project, + location: location, + view: view, + }); + } + + /** + * Parse the project from View resource. + * + * @param {string} viewName + * A fully-qualified path representing View resource. + * @returns {string} A string representing the project. + */ + matchProjectFromViewName(viewName: string) { + return this.pathTemplates.viewPathTemplate.match(viewName).project; + } + + /** + * Parse the location from View resource. + * + * @param {string} viewName + * A fully-qualified path representing View resource. + * @returns {string} A string representing the location. + */ + matchLocationFromViewName(viewName: string) { + return this.pathTemplates.viewPathTemplate.match(viewName).location; + } + + /** + * Parse the view from View resource. + * + * @param {string} viewName + * A fully-qualified path representing View resource. + * @returns {string} A string representing the view. + */ + matchViewFromViewName(viewName: string) { + return this.pathTemplates.viewPathTemplate.match(viewName).view; + } + + /** + * 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.contactCenterInsightsStub && !this._terminated) { + return this.contactCenterInsightsStub.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json new file mode 100644 index 00000000000..185d8b39a84 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json @@ -0,0 +1,208 @@ +{ + "interfaces": { + "google.cloud.contactcenterinsights.v1.ContactCenterInsights": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "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 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateConversation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateConversation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetConversation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListConversations": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteConversation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateAnalysis": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetAnalysis": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAnalyses": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteAnalysis": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ExportInsightsData": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListIssueModels": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeployIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UndeployIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetIssue": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListIssues": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateIssue": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CalculateIssueModelStats": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreatePhraseMatcher": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetPhraseMatcher": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListPhraseMatchers": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeletePhraseMatcher": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdatePhraseMatcher": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CalculateStats": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateView": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetView": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListViews": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateView": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteView": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_proto_list.json b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_proto_list.json new file mode 100644 index 00000000000..a3a2efbf679 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto", + "../../protos/google/cloud/contactcenterinsights/v1/resources.proto" +] diff --git a/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json b/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..660ed0a1e33 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json @@ -0,0 +1,379 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.contactcenterinsights.v1", + "libraryPackage": "@google-cloud/contact-center-insights", + "services": { + "ContactCenterInsights": { + "clients": { + "grpc": { + "libraryClient": "ContactCenterInsightsClient", + "rpcs": { + "CreateConversation": { + "methods": [ + "createConversation" + ] + }, + "UpdateConversation": { + "methods": [ + "updateConversation" + ] + }, + "GetConversation": { + "methods": [ + "getConversation" + ] + }, + "DeleteConversation": { + "methods": [ + "deleteConversation" + ] + }, + "GetAnalysis": { + "methods": [ + "getAnalysis" + ] + }, + "DeleteAnalysis": { + "methods": [ + "deleteAnalysis" + ] + }, + "UpdateIssueModel": { + "methods": [ + "updateIssueModel" + ] + }, + "GetIssueModel": { + "methods": [ + "getIssueModel" + ] + }, + "ListIssueModels": { + "methods": [ + "listIssueModels" + ] + }, + "GetIssue": { + "methods": [ + "getIssue" + ] + }, + "ListIssues": { + "methods": [ + "listIssues" + ] + }, + "UpdateIssue": { + "methods": [ + "updateIssue" + ] + }, + "CalculateIssueModelStats": { + "methods": [ + "calculateIssueModelStats" + ] + }, + "CreatePhraseMatcher": { + "methods": [ + "createPhraseMatcher" + ] + }, + "GetPhraseMatcher": { + "methods": [ + "getPhraseMatcher" + ] + }, + "DeletePhraseMatcher": { + "methods": [ + "deletePhraseMatcher" + ] + }, + "UpdatePhraseMatcher": { + "methods": [ + "updatePhraseMatcher" + ] + }, + "CalculateStats": { + "methods": [ + "calculateStats" + ] + }, + "GetSettings": { + "methods": [ + "getSettings" + ] + }, + "UpdateSettings": { + "methods": [ + "updateSettings" + ] + }, + "CreateView": { + "methods": [ + "createView" + ] + }, + "GetView": { + "methods": [ + "getView" + ] + }, + "UpdateView": { + "methods": [ + "updateView" + ] + }, + "DeleteView": { + "methods": [ + "deleteView" + ] + }, + "CreateAnalysis": { + "methods": [ + "createAnalysis" + ] + }, + "ExportInsightsData": { + "methods": [ + "exportInsightsData" + ] + }, + "CreateIssueModel": { + "methods": [ + "createIssueModel" + ] + }, + "DeleteIssueModel": { + "methods": [ + "deleteIssueModel" + ] + }, + "DeployIssueModel": { + "methods": [ + "deployIssueModel" + ] + }, + "UndeployIssueModel": { + "methods": [ + "undeployIssueModel" + ] + }, + "ListConversations": { + "methods": [ + "listConversations", + "listConversationsStream", + "listConversationsAsync" + ] + }, + "ListAnalyses": { + "methods": [ + "listAnalyses", + "listAnalysesStream", + "listAnalysesAsync" + ] + }, + "ListPhraseMatchers": { + "methods": [ + "listPhraseMatchers", + "listPhraseMatchersStream", + "listPhraseMatchersAsync" + ] + }, + "ListViews": { + "methods": [ + "listViews", + "listViewsStream", + "listViewsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ContactCenterInsightsClient", + "rpcs": { + "CreateConversation": { + "methods": [ + "createConversation" + ] + }, + "UpdateConversation": { + "methods": [ + "updateConversation" + ] + }, + "GetConversation": { + "methods": [ + "getConversation" + ] + }, + "DeleteConversation": { + "methods": [ + "deleteConversation" + ] + }, + "GetAnalysis": { + "methods": [ + "getAnalysis" + ] + }, + "DeleteAnalysis": { + "methods": [ + "deleteAnalysis" + ] + }, + "UpdateIssueModel": { + "methods": [ + "updateIssueModel" + ] + }, + "GetIssueModel": { + "methods": [ + "getIssueModel" + ] + }, + "ListIssueModels": { + "methods": [ + "listIssueModels" + ] + }, + "GetIssue": { + "methods": [ + "getIssue" + ] + }, + "ListIssues": { + "methods": [ + "listIssues" + ] + }, + "UpdateIssue": { + "methods": [ + "updateIssue" + ] + }, + "CalculateIssueModelStats": { + "methods": [ + "calculateIssueModelStats" + ] + }, + "CreatePhraseMatcher": { + "methods": [ + "createPhraseMatcher" + ] + }, + "GetPhraseMatcher": { + "methods": [ + "getPhraseMatcher" + ] + }, + "DeletePhraseMatcher": { + "methods": [ + "deletePhraseMatcher" + ] + }, + "UpdatePhraseMatcher": { + "methods": [ + "updatePhraseMatcher" + ] + }, + "CalculateStats": { + "methods": [ + "calculateStats" + ] + }, + "GetSettings": { + "methods": [ + "getSettings" + ] + }, + "UpdateSettings": { + "methods": [ + "updateSettings" + ] + }, + "CreateView": { + "methods": [ + "createView" + ] + }, + "GetView": { + "methods": [ + "getView" + ] + }, + "UpdateView": { + "methods": [ + "updateView" + ] + }, + "DeleteView": { + "methods": [ + "deleteView" + ] + }, + "CreateAnalysis": { + "methods": [ + "createAnalysis" + ] + }, + "ExportInsightsData": { + "methods": [ + "exportInsightsData" + ] + }, + "CreateIssueModel": { + "methods": [ + "createIssueModel" + ] + }, + "DeleteIssueModel": { + "methods": [ + "deleteIssueModel" + ] + }, + "DeployIssueModel": { + "methods": [ + "deployIssueModel" + ] + }, + "UndeployIssueModel": { + "methods": [ + "undeployIssueModel" + ] + }, + "ListConversations": { + "methods": [ + "listConversations", + "listConversationsStream", + "listConversationsAsync" + ] + }, + "ListAnalyses": { + "methods": [ + "listAnalyses", + "listAnalysesStream", + "listAnalysesAsync" + ] + }, + "ListPhraseMatchers": { + "methods": [ + "listPhraseMatchers", + "listPhraseMatchersStream", + "listPhraseMatchersAsync" + ] + }, + "ListViews": { + "methods": [ + "listViews", + "listViewsStream", + "listViewsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-contactcenterinsights/src/v1/index.ts b/packages/google-cloud-contactcenterinsights/src/v1/index.ts new file mode 100644 index 00000000000..e558952e41d --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2022 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 {ContactCenterInsightsClient} from './contact_center_insights_client'; diff --git a/packages/google-cloud-contactcenterinsights/system-test/fixtures/sample/src/index.js b/packages/google-cloud-contactcenterinsights/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..e0ad6e6f3cb --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2022 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 contactcenterinsights = require('@google-cloud/contact-center-insights'); + +function main() { + const contactCenterInsightsClient = + new contactcenterinsights.ContactCenterInsightsClient(); +} + +main(); diff --git a/packages/google-cloud-contactcenterinsights/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-contactcenterinsights/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..68549091647 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,34 @@ +// Copyright 2022 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 {ContactCenterInsightsClient} from '@google-cloud/contact-center-insights'; + +// check that the client class type name can be used +function doStuffWithContactCenterInsightsClient( + client: ContactCenterInsightsClient +) { + client.close(); +} + +function main() { + // check that the client instance can be created + const contactCenterInsightsClient = new ContactCenterInsightsClient(); + doStuffWithContactCenterInsightsClient(contactCenterInsightsClient); +} + +main(); diff --git a/packages/google-cloud-contactcenterinsights/system-test/install.ts b/packages/google-cloud-contactcenterinsights/system-test/install.ts new file mode 100644 index 00000000000..6dd1eaadafa --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2022 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', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts new file mode 100644 index 00000000000..3fe31da3776 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts @@ -0,0 +1,6908 @@ +// Copyright 2022 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 contactcenterinsightsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} 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 stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +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('v1.ContactCenterInsightsClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + contactcenterinsightsModule.v1.ContactCenterInsightsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + contactcenterinsightsModule.v1.ContactCenterInsightsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + contactcenterinsightsModule.v1.ContactCenterInsightsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.contactCenterInsightsStub, undefined); + await client.initialize(); + assert(client.contactCenterInsightsStub); + }); + + it('has close method for the initialized client', done => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.contactCenterInsightsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.contactCenterInsightsStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + 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 contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + 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('createConversation', () => { + it('invokes createConversation without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateConversationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ); + client.innerApiCalls.createConversation = + stubSimpleCall(expectedResponse); + const [response] = await client.createConversation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversation without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateConversationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ); + client.innerApiCalls.createConversation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConversation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IConversation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversation with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateConversationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConversation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createConversation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversation with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateConversationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createConversation(request), expectedError); + }); + }); + + describe('updateConversation', () => { + it('invokes updateConversation without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateConversationRequest() + ); + request.conversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateConversationRequest', + ['conversation', 'name'] + ); + request.conversation.name = defaultValue1; + const expectedHeaderRequestParams = `conversation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ); + client.innerApiCalls.updateConversation = + stubSimpleCall(expectedResponse); + const [response] = await client.updateConversation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConversation without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateConversationRequest() + ); + request.conversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateConversationRequest', + ['conversation', 'name'] + ); + request.conversation.name = defaultValue1; + const expectedHeaderRequestParams = `conversation.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ); + client.innerApiCalls.updateConversation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConversation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IConversation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConversation with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateConversationRequest() + ); + request.conversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateConversationRequest', + ['conversation', 'name'] + ); + request.conversation.name = defaultValue1; + const expectedHeaderRequestParams = `conversation.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConversation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateConversation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConversation with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateConversationRequest() + ); + request.conversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateConversationRequest', + ['conversation', 'name'] + ); + request.conversation.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateConversation(request), expectedError); + }); + }); + + describe('getConversation', () => { + it('invokes getConversation without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetConversationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ); + client.innerApiCalls.getConversation = stubSimpleCall(expectedResponse); + const [response] = await client.getConversation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversation without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetConversationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ); + client.innerApiCalls.getConversation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConversation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IConversation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversation with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetConversationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConversation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getConversation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversation with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetConversationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConversation(request), expectedError); + }); + }); + + describe('deleteConversation', () => { + it('invokes deleteConversation without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteConversationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConversation = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteConversation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversation without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteConversationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConversation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConversation( + 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.deleteConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversation with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteConversationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConversation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteConversation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversation with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteConversationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteConversation(request), expectedError); + }); + }); + + describe('getAnalysis', () => { + it('invokes getAnalysis without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetAnalysisRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ); + client.innerApiCalls.getAnalysis = stubSimpleCall(expectedResponse); + const [response] = await client.getAnalysis(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAnalysis without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetAnalysisRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ); + client.innerApiCalls.getAnalysis = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAnalysis( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IAnalysis | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAnalysis with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetAnalysisRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAnalysis = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getAnalysis(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAnalysis with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetAnalysisRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAnalysis(request), expectedError); + }); + }); + + describe('deleteAnalysis', () => { + it('invokes deleteAnalysis without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAnalysis = stubSimpleCall(expectedResponse); + const [response] = await client.deleteAnalysis(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAnalysis without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAnalysis = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAnalysis( + 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.deleteAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAnalysis with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAnalysis = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteAnalysis(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAnalysis with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteAnalysis(request), expectedError); + }); + }); + + describe('updateIssueModel', () => { + it('invokes updateIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest() + ); + request.issueModel ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest', + ['issueModel', 'name'] + ); + request.issueModel.name = defaultValue1; + const expectedHeaderRequestParams = `issue_model.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IssueModel() + ); + client.innerApiCalls.updateIssueModel = stubSimpleCall(expectedResponse); + const [response] = await client.updateIssueModel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest() + ); + request.issueModel ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest', + ['issueModel', 'name'] + ); + request.issueModel.name = defaultValue1; + const expectedHeaderRequestParams = `issue_model.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IssueModel() + ); + client.innerApiCalls.updateIssueModel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateIssueModel( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IIssueModel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateIssueModel with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest() + ); + request.issueModel ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest', + ['issueModel', 'name'] + ); + request.issueModel.name = defaultValue1; + const expectedHeaderRequestParams = `issue_model.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateIssueModel = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateIssueModel with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest() + ); + request.issueModel ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest', + ['issueModel', 'name'] + ); + request.issueModel.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateIssueModel(request), expectedError); + }); + }); + + describe('getIssueModel', () => { + it('invokes getIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IssueModel() + ); + client.innerApiCalls.getIssueModel = stubSimpleCall(expectedResponse); + const [response] = await client.getIssueModel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IssueModel() + ); + client.innerApiCalls.getIssueModel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIssueModel( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IIssueModel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIssueModel with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIssueModel = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIssueModel with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getIssueModel(request), expectedError); + }); + }); + + describe('listIssueModels', () => { + it('invokes listIssueModels without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsResponse() + ); + client.innerApiCalls.listIssueModels = stubSimpleCall(expectedResponse); + const [response] = await client.listIssueModels(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listIssueModels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listIssueModels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listIssueModels without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsResponse() + ); + client.innerApiCalls.listIssueModels = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listIssueModels( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IListIssueModelsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listIssueModels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listIssueModels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listIssueModels with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listIssueModels = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listIssueModels(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listIssueModels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listIssueModels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listIssueModels with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listIssueModels(request), expectedError); + }); + }); + + describe('getIssue', () => { + it('invokes getIssue without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetIssueRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetIssueRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Issue() + ); + client.innerApiCalls.getIssue = stubSimpleCall(expectedResponse); + const [response] = await client.getIssue(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getIssue as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIssue as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIssue without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetIssueRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetIssueRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Issue() + ); + client.innerApiCalls.getIssue = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIssue( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IIssue | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getIssue as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIssue as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIssue with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetIssueRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetIssueRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIssue = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIssue(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getIssue as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getIssue as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIssue with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetIssueRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetIssueRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getIssue(request), expectedError); + }); + }); + + describe('listIssues', () => { + it('invokes listIssues without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssuesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListIssuesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssuesResponse() + ); + client.innerApiCalls.listIssues = stubSimpleCall(expectedResponse); + const [response] = await client.listIssues(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listIssues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listIssues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listIssues without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssuesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListIssuesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssuesResponse() + ); + client.innerApiCalls.listIssues = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listIssues( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IListIssuesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listIssues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listIssues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listIssues with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssuesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListIssuesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listIssues = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listIssues(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listIssues as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listIssues as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listIssues with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListIssuesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListIssuesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listIssues(request), expectedError); + }); + }); + + describe('updateIssue', () => { + it('invokes updateIssue without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateIssueRequest() + ); + request.issue ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateIssueRequest', + ['issue', 'name'] + ); + request.issue.name = defaultValue1; + const expectedHeaderRequestParams = `issue.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Issue() + ); + client.innerApiCalls.updateIssue = stubSimpleCall(expectedResponse); + const [response] = await client.updateIssue(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateIssue as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateIssue as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateIssue without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateIssueRequest() + ); + request.issue ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateIssueRequest', + ['issue', 'name'] + ); + request.issue.name = defaultValue1; + const expectedHeaderRequestParams = `issue.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Issue() + ); + client.innerApiCalls.updateIssue = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateIssue( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IIssue | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateIssue as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateIssue as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateIssue with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateIssueRequest() + ); + request.issue ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateIssueRequest', + ['issue', 'name'] + ); + request.issue.name = defaultValue1; + const expectedHeaderRequestParams = `issue.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateIssue = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateIssue(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateIssue as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateIssue as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateIssue with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateIssueRequest() + ); + request.issue ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateIssueRequest', + ['issue', 'name'] + ); + request.issue.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateIssue(request), expectedError); + }); + }); + + describe('calculateIssueModelStats', () => { + it('invokes calculateIssueModelStats without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest', + ['issueModel'] + ); + request.issueModel = defaultValue1; + const expectedHeaderRequestParams = `issue_model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse() + ); + client.innerApiCalls.calculateIssueModelStats = + stubSimpleCall(expectedResponse); + const [response] = await client.calculateIssueModelStats(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.calculateIssueModelStats as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.calculateIssueModelStats as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes calculateIssueModelStats without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest', + ['issueModel'] + ); + request.issueModel = defaultValue1; + const expectedHeaderRequestParams = `issue_model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse() + ); + client.innerApiCalls.calculateIssueModelStats = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.calculateIssueModelStats( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.calculateIssueModelStats as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.calculateIssueModelStats as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes calculateIssueModelStats with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest', + ['issueModel'] + ); + request.issueModel = defaultValue1; + const expectedHeaderRequestParams = `issue_model=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.calculateIssueModelStats = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.calculateIssueModelStats(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.calculateIssueModelStats as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.calculateIssueModelStats as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes calculateIssueModelStats with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest', + ['issueModel'] + ); + request.issueModel = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.calculateIssueModelStats(request), + expectedError + ); + }); + }); + + describe('createPhraseMatcher', () => { + it('invokes createPhraseMatcher without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ); + client.innerApiCalls.createPhraseMatcher = + stubSimpleCall(expectedResponse); + const [response] = await client.createPhraseMatcher(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createPhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPhraseMatcher without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ); + client.innerApiCalls.createPhraseMatcher = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPhraseMatcher( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createPhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPhraseMatcher with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPhraseMatcher = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createPhraseMatcher(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createPhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPhraseMatcher with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createPhraseMatcher(request), expectedError); + }); + }); + + describe('getPhraseMatcher', () => { + it('invokes getPhraseMatcher without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ); + client.innerApiCalls.getPhraseMatcher = stubSimpleCall(expectedResponse); + const [response] = await client.getPhraseMatcher(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getPhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPhraseMatcher without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ); + client.innerApiCalls.getPhraseMatcher = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPhraseMatcher( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getPhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPhraseMatcher with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPhraseMatcher = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getPhraseMatcher(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getPhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPhraseMatcher with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPhraseMatcher(request), expectedError); + }); + }); + + describe('deletePhraseMatcher', () => { + it('invokes deletePhraseMatcher without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePhraseMatcher = + stubSimpleCall(expectedResponse); + const [response] = await client.deletePhraseMatcher(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deletePhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePhraseMatcher without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deletePhraseMatcher = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePhraseMatcher( + 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.deletePhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePhraseMatcher with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePhraseMatcher = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deletePhraseMatcher(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deletePhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePhraseMatcher with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deletePhraseMatcher(request), expectedError); + }); + }); + + describe('updatePhraseMatcher', () => { + it('invokes updatePhraseMatcher without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest() + ); + request.phraseMatcher ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest', + ['phraseMatcher', 'name'] + ); + request.phraseMatcher.name = defaultValue1; + const expectedHeaderRequestParams = `phrase_matcher.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ); + client.innerApiCalls.updatePhraseMatcher = + stubSimpleCall(expectedResponse); + const [response] = await client.updatePhraseMatcher(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updatePhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePhraseMatcher without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest() + ); + request.phraseMatcher ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest', + ['phraseMatcher', 'name'] + ); + request.phraseMatcher.name = defaultValue1; + const expectedHeaderRequestParams = `phrase_matcher.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ); + client.innerApiCalls.updatePhraseMatcher = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updatePhraseMatcher( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updatePhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePhraseMatcher with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest() + ); + request.phraseMatcher ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest', + ['phraseMatcher', 'name'] + ); + request.phraseMatcher.name = defaultValue1; + const expectedHeaderRequestParams = `phrase_matcher.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updatePhraseMatcher = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updatePhraseMatcher(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updatePhraseMatcher as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updatePhraseMatcher as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updatePhraseMatcher with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest() + ); + request.phraseMatcher ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest', + ['phraseMatcher', 'name'] + ); + request.phraseMatcher.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updatePhraseMatcher(request), expectedError); + }); + }); + + describe('calculateStats', () => { + it('invokes calculateStats without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateStatsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CalculateStatsRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateStatsResponse() + ); + client.innerApiCalls.calculateStats = stubSimpleCall(expectedResponse); + const [response] = await client.calculateStats(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.calculateStats as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.calculateStats as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes calculateStats without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateStatsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CalculateStatsRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateStatsResponse() + ); + client.innerApiCalls.calculateStats = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.calculateStats( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.ICalculateStatsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.calculateStats as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.calculateStats as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes calculateStats with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateStatsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CalculateStatsRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.calculateStats = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.calculateStats(request), expectedError); + const actualRequest = ( + client.innerApiCalls.calculateStats as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.calculateStats as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes calculateStats with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CalculateStatsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CalculateStatsRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.calculateStats(request), expectedError); + }); + }); + + describe('getSettings', () => { + it('invokes getSettings without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Settings() + ); + client.innerApiCalls.getSettings = stubSimpleCall(expectedResponse); + const [response] = await client.getSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSettings without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Settings() + ); + client.innerApiCalls.getSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSettings( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.ISettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSettings with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getSettings(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSettings with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSettings(request), expectedError); + }); + }); + + describe('updateSettings', () => { + it('invokes updateSettings without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest() + ); + request.settings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest', + ['settings', 'name'] + ); + request.settings.name = defaultValue1; + const expectedHeaderRequestParams = `settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Settings() + ); + client.innerApiCalls.updateSettings = stubSimpleCall(expectedResponse); + const [response] = await client.updateSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSettings without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest() + ); + request.settings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest', + ['settings', 'name'] + ); + request.settings.name = defaultValue1; + const expectedHeaderRequestParams = `settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Settings() + ); + client.innerApiCalls.updateSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSettings( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.ISettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSettings with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest() + ); + request.settings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest', + ['settings', 'name'] + ); + request.settings.name = defaultValue1; + const expectedHeaderRequestParams = `settings.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateSettings(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSettings with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest() + ); + request.settings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest', + ['settings', 'name'] + ); + request.settings.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateSettings(request), expectedError); + }); + }); + + describe('createView', () => { + it('invokes createView without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateViewRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ); + client.innerApiCalls.createView = stubSimpleCall(expectedResponse); + const [response] = await client.createView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createView without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateViewRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ); + client.innerApiCalls.createView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createView( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IView | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createView with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateViewRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createView = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createView with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateViewRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createView(request), expectedError); + }); + }); + + describe('getView', () => { + it('invokes getView without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ); + client.innerApiCalls.getView = stubSimpleCall(expectedResponse); + const [response] = await client.getView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getView without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ); + client.innerApiCalls.getView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getView( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IView | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getView with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getView = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getView(request), expectedError); + const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getView with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getView(request), expectedError); + }); + }); + + describe('updateView', () => { + it('invokes updateView without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() + ); + request.view ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', + ['view', 'name'] + ); + request.view.name = defaultValue1; + const expectedHeaderRequestParams = `view.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ); + client.innerApiCalls.updateView = stubSimpleCall(expectedResponse); + const [response] = await client.updateView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateView without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() + ); + request.view ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', + ['view', 'name'] + ); + request.view.name = defaultValue1; + const expectedHeaderRequestParams = `view.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ); + client.innerApiCalls.updateView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateView( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IView | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateView with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() + ); + request.view ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', + ['view', 'name'] + ); + request.view.name = defaultValue1; + const expectedHeaderRequestParams = `view.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateView = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateView with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() + ); + request.view ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', + ['view', 'name'] + ); + request.view.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateView(request), expectedError); + }); + }); + + describe('deleteView', () => { + it('invokes deleteView without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteView = stubSimpleCall(expectedResponse); + const [response] = await client.deleteView(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteView without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteView( + 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.deleteView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteView with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteView = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteView with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteView(request), expectedError); + }); + }); + + describe('createAnalysis', () => { + it('invokes createAnalysis without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAnalysis = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createAnalysis(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAnalysis without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAnalysis = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAnalysis( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAnalysis with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAnalysis = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createAnalysis(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAnalysis with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAnalysis = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createAnalysis(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAnalysisProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateAnalysisProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAnalysisProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateAnalysisProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('exportInsightsData', () => { + it('invokes exportInsightsData without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportInsightsData = + stubLongRunningCall(expectedResponse); + const [operation] = await client.exportInsightsData(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportInsightsData without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportInsightsData = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportInsightsData( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportInsightsData with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportInsightsData = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.exportInsightsData(request), expectedError); + const actualRequest = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportInsightsData with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportInsightsData = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.exportInsightsData(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkExportInsightsDataProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkExportInsightsDataProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkExportInsightsDataProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkExportInsightsDataProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createIssueModel', () => { + it('invokes createIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteIssueModel', () => { + it('invokes deleteIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deployIssueModel', () => { + it('invokes deployIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deployIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deployIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deployIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deployIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deployIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deployIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deployIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deployIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deployIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deployIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deployIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeployIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeployIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeployIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeployIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('undeployIssueModel', () => { + it('invokes undeployIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.undeployIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.undeployIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes undeployIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.undeployIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.undeployIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes undeployIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.undeployIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.undeployIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes undeployIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.undeployIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.undeployIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUndeployIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUndeployIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUndeployIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUndeployIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listConversations', () => { + it('invokes listConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.innerApiCalls.listConversations = stubSimpleCall(expectedResponse); + const [response] = await client.listConversations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.innerApiCalls.listConversations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConversations( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IConversation[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConversations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listConversations(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversationsStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.descriptors.page.listConversations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConversationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.Conversation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.Conversation + ) => { + 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.listConversations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversations, request) + ); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConversationsStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConversationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.Conversation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.Conversation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversations, request) + ); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.descriptors.page.listConversations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IConversation[] = + []; + const iterable = client.listConversationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversations with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConversationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IConversation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAnalyses', () => { + it('invokes listAnalyses without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + ]; + client.innerApiCalls.listAnalyses = stubSimpleCall(expectedResponse); + const [response] = await client.listAnalyses(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalyses without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + ]; + client.innerApiCalls.listAnalyses = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAnalyses( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IAnalysis[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalyses with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAnalyses = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAnalyses(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalysesStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + ]; + client.descriptors.page.listAnalyses.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAnalysesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.Analysis[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.contactcenterinsights.v1.Analysis) => { + 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.listAnalyses.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAnalyses, request) + ); + assert( + (client.descriptors.page.listAnalyses.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAnalysesStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAnalyses.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAnalysesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.Analysis[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.contactcenterinsights.v1.Analysis) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAnalyses.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAnalyses, request) + ); + assert( + (client.descriptors.page.listAnalyses.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAnalyses without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + ]; + client.descriptors.page.listAnalyses.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IAnalysis[] = + []; + const iterable = client.listAnalysesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAnalyses.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAnalyses.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAnalyses with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAnalyses.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAnalysesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IAnalysis[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAnalyses.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAnalyses.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listPhraseMatchers', () => { + it('invokes listPhraseMatchers without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + ]; + client.innerApiCalls.listPhraseMatchers = + stubSimpleCall(expectedResponse); + const [response] = await client.listPhraseMatchers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPhraseMatchers without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + ]; + client.innerApiCalls.listPhraseMatchers = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPhraseMatchers( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPhraseMatchers with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPhraseMatchers = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listPhraseMatchers(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPhraseMatchersStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + ]; + client.descriptors.page.listPhraseMatchers.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPhraseMatchersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher + ) => { + 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.listPhraseMatchers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPhraseMatchers, request) + ); + assert( + (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPhraseMatchersStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPhraseMatchers.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPhraseMatchersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPhraseMatchers, request) + ); + assert( + (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPhraseMatchers without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + ]; + client.descriptors.page.listPhraseMatchers.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[] = + []; + const iterable = client.listPhraseMatchersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPhraseMatchers with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPhraseMatchers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPhraseMatchersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listViews', () => { + it('invokes listViews without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + ]; + client.innerApiCalls.listViews = stubSimpleCall(expectedResponse); + const [response] = await client.listViews(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listViews without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + ]; + client.innerApiCalls.listViews = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listViews( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IView[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listViews with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listViews = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listViews(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listViewsStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + ]; + client.descriptors.page.listViews.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.View[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.contactcenterinsights.v1.View) => { + 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.listViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listViews, request) + ); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listViewsStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listViews.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.View[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.contactcenterinsights.v1.View) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listViews, request) + ); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listViews without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + ]; + client.descriptors.page.listViews.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IView[] = + []; + const iterable = client.listViewsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert( + (client.descriptors.page.listViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listViews with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listViewsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IView[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert( + (client.descriptors.page.listViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('analysis', () => { + const fakePath = '/rendered/path/analysis'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + conversation: 'conversationValue', + analysis: 'analysisValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.analysisPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.analysisPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('analysisPath', () => { + const result = client.analysisPath( + 'projectValue', + 'locationValue', + 'conversationValue', + 'analysisValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.analysisPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAnalysisName', () => { + const result = client.matchProjectFromAnalysisName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.analysisPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAnalysisName', () => { + const result = client.matchLocationFromAnalysisName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.analysisPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConversationFromAnalysisName', () => { + const result = client.matchConversationFromAnalysisName(fakePath); + assert.strictEqual(result, 'conversationValue'); + assert( + (client.pathTemplates.analysisPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAnalysisFromAnalysisName', () => { + const result = client.matchAnalysisFromAnalysisName(fakePath); + assert.strictEqual(result, 'analysisValue'); + assert( + (client.pathTemplates.analysisPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('conversation', () => { + const fakePath = '/rendered/path/conversation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + conversation: 'conversationValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.conversationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.conversationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('conversationPath', () => { + const result = client.conversationPath( + 'projectValue', + 'locationValue', + 'conversationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.conversationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromConversationName', () => { + const result = client.matchProjectFromConversationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromConversationName', () => { + const result = client.matchLocationFromConversationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConversationFromConversationName', () => { + const result = client.matchConversationFromConversationName(fakePath); + assert.strictEqual(result, 'conversationValue'); + assert( + (client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('issue', () => { + const fakePath = '/rendered/path/issue'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + issue_model: 'issueModelValue', + issue: 'issueValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.issuePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.issuePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('issuePath', () => { + const result = client.issuePath( + 'projectValue', + 'locationValue', + 'issueModelValue', + 'issueValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.issuePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIssueName', () => { + const result = client.matchProjectFromIssueName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.issuePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIssueName', () => { + const result = client.matchLocationFromIssueName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.issuePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIssueModelFromIssueName', () => { + const result = client.matchIssueModelFromIssueName(fakePath); + assert.strictEqual(result, 'issueModelValue'); + assert( + (client.pathTemplates.issuePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIssueFromIssueName', () => { + const result = client.matchIssueFromIssueName(fakePath); + assert.strictEqual(result, 'issueValue'); + assert( + (client.pathTemplates.issuePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('issueModel', () => { + const fakePath = '/rendered/path/issueModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + issue_model: 'issueModelValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.issueModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.issueModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('issueModelPath', () => { + const result = client.issueModelPath( + 'projectValue', + 'locationValue', + 'issueModelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.issueModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIssueModelName', () => { + const result = client.matchProjectFromIssueModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.issueModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIssueModelName', () => { + const result = client.matchLocationFromIssueModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.issueModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIssueModelFromIssueModelName', () => { + const result = client.matchIssueModelFromIssueModelName(fakePath); + assert.strictEqual(result, 'issueModelValue'); + assert( + (client.pathTemplates.issueModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('phraseMatcher', () => { + const fakePath = '/rendered/path/phraseMatcher'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + phrase_matcher: 'phraseMatcherValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.phraseMatcherPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.phraseMatcherPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('phraseMatcherPath', () => { + const result = client.phraseMatcherPath( + 'projectValue', + 'locationValue', + 'phraseMatcherValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.phraseMatcherPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPhraseMatcherName', () => { + const result = client.matchProjectFromPhraseMatcherName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.phraseMatcherPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPhraseMatcherName', () => { + const result = client.matchLocationFromPhraseMatcherName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.phraseMatcherPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPhraseMatcherFromPhraseMatcherName', () => { + const result = client.matchPhraseMatcherFromPhraseMatcherName(fakePath); + assert.strictEqual(result, 'phraseMatcherValue'); + assert( + (client.pathTemplates.phraseMatcherPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('settings', () => { + const fakePath = '/rendered/path/settings'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.settingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.settingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('settingsPath', () => { + const result = client.settingsPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.settingsPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSettingsName', () => { + const result = client.matchProjectFromSettingsName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.settingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSettingsName', () => { + const result = client.matchLocationFromSettingsName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.settingsPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('view', () => { + const fakePath = '/rendered/path/view'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + view: 'viewValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.viewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.viewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('viewPath', () => { + const result = client.viewPath( + 'projectValue', + 'locationValue', + 'viewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.viewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromViewName', () => { + const result = client.matchProjectFromViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.viewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromViewName', () => { + const result = client.matchLocationFromViewName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.viewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchViewFromViewName', () => { + const result = client.matchViewFromViewName(fakePath); + assert.strictEqual(result, 'viewValue'); + assert( + (client.pathTemplates.viewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-contactcenterinsights/tsconfig.json b/packages/google-cloud-contactcenterinsights/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-contactcenterinsights/webpack.config.js b/packages/google-cloud-contactcenterinsights/webpack.config.js new file mode 100644 index 00000000000..38bfaa90b53 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/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: 'ContactCenterInsights', + filename: './contact-center-insights.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', +}; diff --git a/release-please-config.json b/release-please-config.json index 57fe73b2376..5bb5a92a1a2 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -20,6 +20,7 @@ "packages/google-cloud-billing": {}, "packages/google-cloud-billing-budgets": {}, "packages/google-cloud-certificatemanager": {}, + "packages/google-cloud-contactcenterinsights": {}, "packages/google-cloud-channel": {}, "packages/google-cloud-contentwarehouse": {}, "packages/google-cloud-datafusion": {},