From c220d495cde64b1855b86df9550168e43e1c2f98 Mon Sep 17 00:00:00 2001
From: "owlbot-bootstrapper[bot]"
<104649659+owlbot-bootstrapper[bot]@users.noreply.github.com>
Date: Wed, 19 Oct 2022 16:08:06 -0400
Subject: [PATCH 1/2] feat: add initial files for
google.cloud.discoveryengine.v1beta (#3445)
---
...nippet_metadata.google.cloud.batch.v1.json | 2 +-
...t_metadata.google.cloud.batch.v1alpha.json | 2 +-
.../google-cloud-discoveryengine/.OwlBot.yaml | 17 +
.../.eslintignore | 7 +
.../.eslintrc.json | 3 +
.../.gitattributes | 4 +
.../google-cloud-discoveryengine/.gitignore | 14 +
.../google-cloud-discoveryengine/.jsdoc.js | 55 +
.../google-cloud-discoveryengine/.mocharc.js | 29 +
packages/google-cloud-discoveryengine/.nycrc | 24 +
.../.prettierignore | 6 +
.../.prettierrc.js | 17 +
.../.repo-metadata.json | 16 +
.../CODE_OF_CONDUCT.md | 94 +
.../CONTRIBUTING.md | 76 +
packages/google-cloud-discoveryengine/LICENSE | 202 +
.../google-cloud-discoveryengine/README.md | 209 +
.../linkinator.config.json | 16 +
.../google-cloud-discoveryengine/package.json | 66 +
.../cloud/discoveryengine/v1beta/common.proto | 93 +
.../discoveryengine/v1beta/document.proto | 77 +
.../v1beta/document_service.proto | 261 +
.../v1beta/import_config.proto | 265 +
.../v1beta/recommendation_service.proto | 182 +
.../discoveryengine/v1beta/user_event.proto | 453 +
.../v1beta/user_event_service.proto | 122 +
.../protos/protos.d.ts | 10120 ++++++
.../protos/protos.js | 26050 ++++++++++++++++
.../protos/protos.json | 2682 ++
.../samples/README.md | 248 +
.../document_service.create_document.js | 86 +
.../document_service.delete_document.js | 68 +
.../v1beta/document_service.get_document.js | 68 +
.../document_service.import_documents.js | 86 +
.../v1beta/document_service.list_documents.js | 88 +
.../document_service.update_document.js | 75 +
.../recommendation_service.recommend.js | 138 +
...a.google.cloud.discoveryengine.v1beta.json | 507 +
.../user_event_service.collect_user_event.js | 81 +
.../user_event_service.import_user_events.js | 83 +
.../user_event_service.write_user_event.js | 67 +
.../samples/package.json | 24 +
.../samples/quickstart.js | 87 +
.../samples/test/quickstart.js | 42 +
.../google-cloud-discoveryengine/src/index.ts | 41 +
.../src/v1beta/document_service_client.ts | 1591 +
.../document_service_client_config.json | 77 +
.../v1beta/document_service_proto_list.json | 9 +
.../src/v1beta/gapic_metadata.json | 155 +
.../src/v1beta/index.ts | 21 +
.../v1beta/recommendation_service_client.ts | 657 +
.../recommendation_service_client_config.json | 43 +
.../recommendation_service_proto_list.json | 9 +
.../src/v1beta/user_event_service_client.ts | 1074 +
.../user_event_service_client_config.json | 62 +
.../v1beta/user_event_service_proto_list.json | 9 +
.../system-test/fixtures/sample/src/index.js | 29 +
.../system-test/fixtures/sample/src/index.ts | 50 +
.../system-test/install.ts | 51 +
.../test/gapic_document_service_v1beta.ts | 1781 ++
.../gapic_recommendation_service_v1beta.ts | 475 +
.../test/gapic_user_event_service_v1beta.ts | 1131 +
.../tsconfig.json | 19 +
.../webpack.config.js | 64 +
release-please-config.json | 3 +-
65 files changed, 50260 insertions(+), 3 deletions(-)
create mode 100644 packages/google-cloud-discoveryengine/.OwlBot.yaml
create mode 100644 packages/google-cloud-discoveryengine/.eslintignore
create mode 100644 packages/google-cloud-discoveryengine/.eslintrc.json
create mode 100644 packages/google-cloud-discoveryengine/.gitattributes
create mode 100644 packages/google-cloud-discoveryengine/.gitignore
create mode 100644 packages/google-cloud-discoveryengine/.jsdoc.js
create mode 100644 packages/google-cloud-discoveryengine/.mocharc.js
create mode 100644 packages/google-cloud-discoveryengine/.nycrc
create mode 100644 packages/google-cloud-discoveryengine/.prettierignore
create mode 100644 packages/google-cloud-discoveryengine/.prettierrc.js
create mode 100644 packages/google-cloud-discoveryengine/.repo-metadata.json
create mode 100644 packages/google-cloud-discoveryengine/CODE_OF_CONDUCT.md
create mode 100644 packages/google-cloud-discoveryengine/CONTRIBUTING.md
create mode 100644 packages/google-cloud-discoveryengine/LICENSE
create mode 100644 packages/google-cloud-discoveryengine/README.md
create mode 100644 packages/google-cloud-discoveryengine/linkinator.config.json
create mode 100644 packages/google-cloud-discoveryengine/package.json
create mode 100644 packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/common.proto
create mode 100644 packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document.proto
create mode 100644 packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document_service.proto
create mode 100644 packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/import_config.proto
create mode 100644 packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto
create mode 100644 packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event.proto
create mode 100644 packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto
create mode 100644 packages/google-cloud-discoveryengine/protos/protos.d.ts
create mode 100644 packages/google-cloud-discoveryengine/protos/protos.js
create mode 100644 packages/google-cloud-discoveryengine/protos/protos.json
create mode 100644 packages/google-cloud-discoveryengine/samples/README.md
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.js
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.js
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.import_documents.js
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.js
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.import_user_events.js
create mode 100644 packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.write_user_event.js
create mode 100644 packages/google-cloud-discoveryengine/samples/package.json
create mode 100644 packages/google-cloud-discoveryengine/samples/quickstart.js
create mode 100644 packages/google-cloud-discoveryengine/samples/test/quickstart.js
create mode 100644 packages/google-cloud-discoveryengine/src/index.ts
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/document_service_client_config.json
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/document_service_proto_list.json
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/gapic_metadata.json
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/index.ts
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client_config.json
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_proto_list.json
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client_config.json
create mode 100644 packages/google-cloud-discoveryengine/src/v1beta/user_event_service_proto_list.json
create mode 100644 packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.js
create mode 100644 packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.ts
create mode 100644 packages/google-cloud-discoveryengine/system-test/install.ts
create mode 100644 packages/google-cloud-discoveryengine/test/gapic_document_service_v1beta.ts
create mode 100644 packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1beta.ts
create mode 100644 packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1beta.ts
create mode 100644 packages/google-cloud-discoveryengine/tsconfig.json
create mode 100644 packages/google-cloud-discoveryengine/webpack.config.js
diff --git a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json
index a96f2aa3b9f..00747dd5bcf 100644
--- a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json
+++ b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json
@@ -1,7 +1,7 @@
{
"clientLibrary": {
"name": "nodejs-batch",
- "version": "0.1.2",
+ "version": "0.2.0",
"language": "TYPESCRIPT",
"apis": [
{
diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json
index 6f3c8f2d539..adc0e47a469 100644
--- a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json
+++ b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json
@@ -1,7 +1,7 @@
{
"clientLibrary": {
"name": "nodejs-batch",
- "version": "0.1.2",
+ "version": "0.2.0",
"language": "TYPESCRIPT",
"apis": [
{
diff --git a/packages/google-cloud-discoveryengine/.OwlBot.yaml b/packages/google-cloud-discoveryengine/.OwlBot.yaml
new file mode 100644
index 00000000000..6b86225330d
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.OwlBot.yaml
@@ -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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+deep-copy-regex:
+ - source: /google/cloud/discoveryengine/(.*)/.*-nodejs
+ dest: /owl-bot-staging/google-cloud-discoveryengine/$1
\ No newline at end of file
diff --git a/packages/google-cloud-discoveryengine/.eslintignore b/packages/google-cloud-discoveryengine/.eslintignore
new file mode 100644
index 00000000000..ea5b04aebe6
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.eslintignore
@@ -0,0 +1,7 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
+samples/generated/
diff --git a/packages/google-cloud-discoveryengine/.eslintrc.json b/packages/google-cloud-discoveryengine/.eslintrc.json
new file mode 100644
index 00000000000..78215349546
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "./node_modules/gts"
+}
diff --git a/packages/google-cloud-discoveryengine/.gitattributes b/packages/google-cloud-discoveryengine/.gitattributes
new file mode 100644
index 00000000000..33739cb74e4
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.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-discoveryengine/.gitignore b/packages/google-cloud-discoveryengine/.gitignore
new file mode 100644
index 00000000000..5d32b23782f
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.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-discoveryengine/.jsdoc.js b/packages/google-cloud-discoveryengine/.jsdoc.js
new file mode 100644
index 00000000000..3719c62bcd9
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.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/discoveryengine',
+ theme: 'lumen',
+ default: {
+ outputSourceFiles: false
+ }
+ },
+ markdown: {
+ idInHeadings: true
+ }
+};
diff --git a/packages/google-cloud-discoveryengine/.mocharc.js b/packages/google-cloud-discoveryengine/.mocharc.js
new file mode 100644
index 00000000000..cdb7b752160
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.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-discoveryengine/.nycrc b/packages/google-cloud-discoveryengine/.nycrc
new file mode 100644
index 00000000000..b18d5472b62
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.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-discoveryengine/.prettierignore b/packages/google-cloud-discoveryengine/.prettierignore
new file mode 100644
index 00000000000..9340ad9b86d
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.prettierignore
@@ -0,0 +1,6 @@
+**/node_modules
+**/coverage
+test/fixtures
+build/
+docs/
+protos/
diff --git a/packages/google-cloud-discoveryengine/.prettierrc.js b/packages/google-cloud-discoveryengine/.prettierrc.js
new file mode 100644
index 00000000000..d546a4ad546
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.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-discoveryengine/.repo-metadata.json b/packages/google-cloud-discoveryengine/.repo-metadata.json
new file mode 100644
index 00000000000..cbab3036535
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/.repo-metadata.json
@@ -0,0 +1,16 @@
+{
+ "name": "discoveryengine",
+ "name_pretty": "Discovery Engine API",
+ "product_documentation": "cloud.google.com/discovery-engine/",
+ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/discoveryengine/latest",
+ "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues",
+ "release_level": "beta",
+ "language": "nodejs",
+ "repo": "googleapis/google-cloud-node",
+ "distribution_name": "@google-cloud/discoveryengine",
+ "api_id": "google.cloud.discoveryengine.v1beta",
+ "default_version": "v1beta",
+ "requires_billing": true,
+ "library_type": "GAPIC_AUTO"
+}
+
diff --git a/packages/google-cloud-discoveryengine/CODE_OF_CONDUCT.md b/packages/google-cloud-discoveryengine/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000000..2add2547a81
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/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-discoveryengine/CONTRIBUTING.md b/packages/google-cloud-discoveryengine/CONTRIBUTING.md
new file mode 100644
index 00000000000..07d4e913b49
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/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 Discovery Engine 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=google.cloud.discoveryengine.v1beta
+[auth]: https://cloud.google.com/docs/authentication/getting-started
\ No newline at end of file
diff --git a/packages/google-cloud-discoveryengine/LICENSE b/packages/google-cloud-discoveryengine/LICENSE
new file mode 100644
index 00000000000..d6456956733
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/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-discoveryengine/README.md b/packages/google-cloud-discoveryengine/README.md
new file mode 100644
index 00000000000..39310a59821
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/README.md
@@ -0,0 +1,209 @@
+[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
+[//]: # "To regenerate it, use `python -m synthtool`."
+
+
+# [Discovery Engine API: Node.js Client](https://github.com/googleapis/google-cloud-node)
+
+[](https://cloud.google.com/terms/launch-stages)
+[](https://www.npmjs.org/package/@google-cloud/discoveryengine)
+
+
+
+
+Discovery Engine API 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/blob/main/CHANGELOG.md).
+
+* [Discovery Engine API Node.js Client API Reference][client-docs]
+* [Discovery Engine API Documentation][product-docs]
+* [github.com/googleapis/google-cloud-node](https://github.com/googleapis/google-cloud-node)
+
+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 Discovery Engine 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/discoveryengine
+```
+
+
+### Using the client library
+
+```javascript
+/**
+ * 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 branch resource name, such as
+ * `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.
+ * Use `default_branch` as the branch ID, to list documents under the default
+ * branch.
+ * If the caller does not have permission to list Documents s under this
+ * branch, regardless of whether or not this branch exists, a
+ * PERMISSION_DENIED error is returned.
+ */
+// const parent = 'abc123'
+/**
+ * Maximum number of Document google.cloud.discoveryengine.v1beta.Document s
+ * to return. If unspecified, defaults to 100. The maximum allowed value is
+ * 1000. Values above 1000 will be coerced to 1000.
+ * If this field is negative, an INVALID_ARGUMENT error is returned.
+ */
+// const pageSize = 1234
+/**
+ * A page token
+ * ListDocumentsResponse.next_page_token google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token,
+ * received from a previous
+ * DocumentService.ListDocuments google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments
+ * call. Provide this to retrieve the subsequent page.
+ * When paginating, all other parameters provided to
+ * DocumentService.ListDocuments google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments
+ * must match the call that provided the page token. Otherwise, an
+ * INVALID_ARGUMENT error is returned.
+ */
+// const pageToken = 'abc123'
+
+// Imports the Discoveryengine library
+const {DocumentServiceClient} =
+ require('@google-cloud/discoveryengine').v1beta;
+
+// Instantiates a client
+const discoveryengineClient = new DocumentServiceClient();
+
+async function callListDocuments() {
+ // Construct request
+ const request = {
+ parent,
+ };
+
+ // Run request
+ const iterable = await discoveryengineClient.listDocumentsAsync(request);
+ for await (const response of iterable) {
+ console.log(response);
+ }
+}
+
+callListDocuments();
+
+```
+
+
+
+## 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 |
+| --------------------------- | --------------------------------- | ------ |
+| Document_service.create_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.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-discoveryengine/samples/generated/v1beta/document_service.create_document.js,samples/README.md) |
+| Document_service.delete_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.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-discoveryengine/samples/generated/v1beta/document_service.delete_document.js,samples/README.md) |
+| Document_service.get_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.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-discoveryengine/samples/generated/v1beta/document_service.get_document.js,samples/README.md) |
+| Document_service.import_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.import_documents.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-discoveryengine/samples/generated/v1beta/document_service.import_documents.js,samples/README.md) |
+| Document_service.list_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.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-discoveryengine/samples/generated/v1beta/document_service.list_documents.js,samples/README.md) |
+| Document_service.update_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.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-discoveryengine/samples/generated/v1beta/document_service.update_document.js,samples/README.md) |
+| Recommendation_service.recommend | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.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-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js,samples/README.md) |
+| User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.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-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.js,samples/README.md) |
+| User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.import_user_events.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-discoveryengine/samples/generated/v1beta/user_event_service.import_user_events.js,samples/README.md) |
+| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.write_user_event.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-discoveryengine/samples/generated/v1beta/user_event_service.write_user_event.js,samples/README.md) |
+| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/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-discoveryengine/samples/quickstart.js,samples/README.md) |
+| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/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-discoveryengine/samples/test/quickstart.js,samples/README.md) |
+
+
+
+The [Discovery Engine 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/discoveryengine@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 in **beta**. This means it is expected to be
+mostly stable while we work toward a general availability release; however,
+complete stability is not guaranteed. We will address issues and requests
+against beta libraries with a high 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/discoveryengine/latest
+[product-docs]: cloud.google.com/discovery-engine/
+[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=google.cloud.discoveryengine.v1beta
+[auth]: https://cloud.google.com/docs/authentication/getting-started
diff --git a/packages/google-cloud-discoveryengine/linkinator.config.json b/packages/google-cloud-discoveryengine/linkinator.config.json
new file mode 100644
index 00000000000..befd23c8633
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/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-discoveryengine/package.json b/packages/google-cloud-discoveryengine/package.json
new file mode 100644
index 00000000000..a5d9ca06af9
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@google-cloud/discoveryengine",
+ "version": "0.0.0",
+ "description": "Discovery Engine API client for Node.js",
+ "repository": "googleapis/google-cloud-node",
+ "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 discoveryengine",
+ "discoveryengine",
+ "Discovery Engine API"
+ ],
+ "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.0.1"
+ },
+ "devDependencies": {
+ "@types/mocha": "^9.0.0",
+ "@types/node": "^16.0.0",
+ "@types/sinon": "^10.0.0",
+ "c8": "^7.3.5",
+ "gts": "^3.1.0",
+ "jsdoc": "^3.6.6",
+ "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.0.0",
+ "typescript": "^4.6.4",
+ "webpack": "^5.9.0",
+ "webpack-cli": "^4.2.0"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+}
diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/common.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/common.proto
new file mode 100644
index 00000000000..0d5e187b17d
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/common.proto
@@ -0,0 +1,93 @@
+// 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.discoveryengine.v1beta;
+
+import "google/api/resource.proto";
+
+option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
+option java_multiple_files = true;
+option java_outer_classname = "CommonProto";
+option java_package = "com.google.cloud.discoveryengine.v1beta";
+option objc_class_prefix = "DISCOVERYENGINE";
+option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
+option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
+option (google.api.resource_definition) = {
+ type: "discoveryengine.googleapis.com/Branch"
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}"
+};
+option (google.api.resource_definition) = {
+ type: "discoveryengine.googleapis.com/DataStore"
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}"
+};
+option (google.api.resource_definition) = {
+ type: "discoveryengine.googleapis.com/ServingConfig"
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"
+};
+
+// A custom attribute that is not explicitly modeled in a resource, e.g.
+// [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent].
+message CustomAttribute {
+ // The textual values of this custom attribute. For example, `["yellow",
+ // "green"]` when the key is "color".
+ //
+ // Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is
+ // returned.
+ //
+ // Exactly one of
+ // [text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] or
+ // [numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers]
+ // should be set. Otherwise, an INVALID_ARGUMENT error is returned.
+ repeated string text = 1;
+
+ // The numerical values of this custom attribute. For example, `[2.3, 15.4]`
+ // when the key is "lengths_cm".
+ //
+ // Exactly one of
+ // [text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] or
+ // [numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers]
+ // should be set. Otherwise, an INVALID_ARGUMENT error is returned.
+ repeated double numbers = 2;
+}
+
+// Information of an end user.
+message UserInfo {
+ // Highly recommended for logged-in users. Unique identifier for logged-in
+ // user, such as a user name. Don't set for anonymous users.
+ //
+ // Always use a hashed value for this ID.
+ //
+ // Don't set the field to the same fixed ID for different users. This mixes
+ // the event history of those users together, which results in degraded
+ // model quality.
+ //
+ // The field must be a UTF-8 encoded string with a length limit of 128
+ // characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ string user_id = 1;
+
+ // User agent as included in the HTTP header. Required for getting
+ // [SearchResponse.sponsored_results][].
+ //
+ // The field must be a UTF-8 encoded string with a length limit of 1,000
+ // characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ //
+ // This should not be set when using the client side event reporting with
+ // GTM or JavaScript tag in
+ // [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]
+ // or if [direct_user_request][] is set.
+ string user_agent = 2;
+}
diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document.proto
new file mode 100644
index 00000000000..38c000233bd
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document.proto
@@ -0,0 +1,77 @@
+// 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.discoveryengine.v1beta;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/struct.proto";
+
+option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentProto";
+option java_package = "com.google.cloud.discoveryengine.v1beta";
+option objc_class_prefix = "DISCOVERYENGINE";
+option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
+option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
+
+// Document captures all raw metadata information of items to be recommended or
+// searched.
+message Document {
+ option (google.api.resource) = {
+ type: "discoveryengine.googleapis.com/Document"
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}"
+ };
+
+ // Data representation. One of
+ // [struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data] or
+ // [json_data][google.cloud.discoveryengine.v1beta.Document.json_data] should
+ // be provided otherwise an INVALID_ARGUMENT error is thrown.
+ oneof data {
+ // The structured JSON data for the document. It should conform to the
+ // registered [schema][] or an INVALID_ARGUMENT error is thrown.
+ google.protobuf.Struct struct_data = 4;
+
+ // The JSON string representation of the document. It should conform to the
+ // registered [schema][] or an INVALID_ARGUMENT error is thrown.
+ string json_data = 5;
+ }
+
+ // Immutable. The full resource name of the document.
+ // Format:
+ // `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`.
+ //
+ // This field must be a UTF-8 encoded string with a length limit of 1024
+ // characters.
+ string name = 1 [(google.api.field_behavior) = IMMUTABLE];
+
+ // Immutable. The identifier of the document.
+ //
+ // Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+ // standard with a length limit of 63 characters.
+ string id = 2 [(google.api.field_behavior) = IMMUTABLE];
+
+ // Required. The identifier of the schema located in the same data store.
+ string schema_id = 3 [(google.api.field_behavior) = REQUIRED];
+
+ // The identifier of the parent document. Currently supports at most two level
+ // document hierarchy.
+ //
+ // Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+ // standard with a length limit of 63 characters.
+ string parent_document_id = 7;
+}
diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document_service.proto
new file mode 100644
index 00000000000..78080294189
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document_service.proto
@@ -0,0 +1,261 @@
+// 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.discoveryengine.v1beta;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/discoveryengine/v1beta/document.proto";
+import "google/cloud/discoveryengine/v1beta/import_config.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+
+option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentServiceProto";
+option java_package = "com.google.cloud.discoveryengine.v1beta";
+option objc_class_prefix = "DISCOVERYENGINE";
+option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
+option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
+
+// Service for ingesting
+// [Document][google.cloud.discoveryengine.v1beta.Document] information of the
+// customer's website.
+service DocumentService {
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-platform";
+
+ // Gets a [Document][google.cloud.discoveryengine.v1beta.Document].
+ rpc GetDocument(GetDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ get: "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Gets a list of [Document][google.cloud.discoveryengine.v1beta.Document]s.
+ rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
+ option (google.api.http) = {
+ get: "/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents"
+ };
+ option (google.api.method_signature) = "parent";
+ }
+
+ // Creates a [Document][google.cloud.discoveryengine.v1beta.Document].
+ rpc CreateDocument(CreateDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents"
+ body: "document"
+ };
+ option (google.api.method_signature) = "parent,document,document_id";
+ }
+
+ // Updates a [Document][google.cloud.discoveryengine.v1beta.Document].
+ rpc UpdateDocument(UpdateDocumentRequest) returns (Document) {
+ option (google.api.http) = {
+ patch: "/v1beta/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}"
+ body: "document"
+ };
+ }
+
+ // Deletes a [Document][google.cloud.discoveryengine.v1beta.Document].
+ rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}"
+ };
+ option (google.api.method_signature) = "name";
+ }
+
+ // Bulk import of multiple
+ // [Document][google.cloud.discoveryengine.v1beta.Document]s. Request
+ // processing may be synchronous. Non-existing items will be created.
+ //
+ // Note: It is possible for a subset of the
+ // [Document][google.cloud.discoveryengine.v1beta.Document]s to be
+ // successfully updated.
+ rpc ImportDocuments(ImportDocumentsRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import"
+ body: "*"
+ };
+ option (google.longrunning.operation_info) = {
+ response_type: "google.cloud.discoveryengine.v1beta.ImportDocumentsResponse"
+ metadata_type: "google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata"
+ };
+ }
+}
+
+// Request message for
+// [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument]
+// method.
+message GetDocumentRequest {
+ // Required. Full resource name of
+ // [Document][google.cloud.discoveryengine.v1beta.Document], such as
+ // `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+ //
+ // If the caller does not have permission to access the
+ // [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
+ // whether or not it exists, a PERMISSION_DENIED error is returned.
+ //
+ // If the requested [Document][google.cloud.discoveryengine.v1beta.Document]
+ // does not exist, a NOT_FOUND error is returned.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/Document"
+ }
+ ];
+}
+
+// Request message for
+// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]
+// method.
+message ListDocumentsRequest {
+ // Required. The parent branch resource name, such as
+ // `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.
+ // Use `default_branch` as the branch ID, to list documents under the default
+ // branch.
+ //
+ // If the caller does not have permission to list [Documents][]s under this
+ // branch, regardless of whether or not this branch exists, a
+ // PERMISSION_DENIED error is returned.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/Branch"
+ }
+ ];
+
+ // Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
+ // to return. If unspecified, defaults to 100. The maximum allowed value is
+ // 1000. Values above 1000 will be coerced to 1000.
+ //
+ // If this field is negative, an INVALID_ARGUMENT error is returned.
+ int32 page_size = 2;
+
+ // A page token
+ // [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token],
+ // received from a previous
+ // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]
+ // call. Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to
+ // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]
+ // must match the call that provided the page token. Otherwise, an
+ // INVALID_ARGUMENT error is returned.
+ string page_token = 3;
+}
+
+// Response message for
+// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]
+// method.
+message ListDocumentsResponse {
+ // The [Document][google.cloud.discoveryengine.v1beta.Document]s.
+ repeated Document documents = 1;
+
+ // A token that can be sent as
+ // [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token]
+ // to retrieve the next page. If this field is omitted, there are no
+ // subsequent pages.
+ string next_page_token = 2;
+}
+
+// Request message for
+// [DocumentService.CreateDocument][google.cloud.discoveryengine.v1beta.DocumentService.CreateDocument]
+// method.
+message CreateDocumentRequest {
+ // Required. The parent resource name, such as
+ // `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/Branch"
+ }
+ ];
+
+ // Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to
+ // create.
+ Document document = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. The ID to use for the
+ // [Document][google.cloud.discoveryengine.v1beta.Document], which will become
+ // the final component of the
+ // [Document.name][google.cloud.discoveryengine.v1beta.Document.name].
+ //
+ // If the caller does not have permission to create the
+ // [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
+ // whether or not it exists, a PERMISSION_DENIED error is returned.
+ //
+ // This field must be unique among all
+ // [Document][google.cloud.discoveryengine.v1beta.Document]s with the same
+ // [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent].
+ // Otherwise, an ALREADY_EXISTS error is returned.
+ //
+ // This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
+ // standard with a length limit of 63 characters. Otherwise, an
+ // INVALID_ARGUMENT error is returned.
+ string document_id = 3 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for
+// [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocument]
+// method.
+message UpdateDocumentRequest {
+ // Required. The document to update/create.
+ //
+ // If the caller does not have permission to update the
+ // [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
+ // whether or not it exists, a PERMISSION_DENIED error is returned.
+ //
+ // If the [Document][google.cloud.discoveryengine.v1beta.Document] to update
+ // does not exist and
+ // [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing]
+ // is not set, a NOT_FOUND error is returned.
+ Document document = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // If set to true, and the
+ // [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a
+ // new [Document][google.cloud.discoveryengine.v1beta.Document] will be
+ // created.
+ bool allow_missing = 2;
+}
+
+// Request message for
+// [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocument]
+// method.
+message DeleteDocumentRequest {
+ // Required. Full resource name of
+ // [Document][google.cloud.discoveryengine.v1beta.Document], such as
+ // `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
+ //
+ // If the caller does not have permission to delete the
+ // [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
+ // whether or not it exists, a PERMISSION_DENIED error is returned.
+ //
+ // If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete
+ // does not exist, a NOT_FOUND error is returned.
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/Document"
+ }
+ ];
+}
diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/import_config.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/import_config.proto
new file mode 100644
index 00000000000..a2b2cf8ffca
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/import_config.proto
@@ -0,0 +1,265 @@
+// 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.discoveryengine.v1beta;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/discoveryengine/v1beta/document.proto";
+import "google/cloud/discoveryengine/v1beta/user_event.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+import "google/type/date.proto";
+
+option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
+option java_multiple_files = true;
+option java_outer_classname = "ImportConfigProto";
+option java_package = "com.google.cloud.discoveryengine.v1beta";
+option objc_class_prefix = "DISCOVERYENGINE";
+option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
+option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
+
+// Google Cloud Storage location for input content.
+// format.
+message GcsSource {
+ // Required. Google Cloud Storage URIs to input files. URI can be up to
+ // 2000 characters long. URIs can match the full object path (for example,
+ // `gs://bucket/directory/object.json`) or a pattern matching one or more
+ // files, such as `gs://bucket/directory/*.json`. A request can
+ // contain at most 100 files, and each file can be up to 2 GB.
+ repeated string input_uris = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The schema to use when parsing the data from the source.
+ //
+ // Supported values for imports:
+ //
+ // * `user_event` (default): One JSON
+ // [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line.
+ //
+ // * `document` (default): One JSON
+ // [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each
+ // document must
+ // have a valid
+ // [Document.id][google.cloud.discoveryengine.v1beta.Document.id].
+ string data_schema = 2;
+}
+
+// BigQuery source import data from.
+message BigQuerySource {
+ // BigQuery table partition info. Leave this empty if the BigQuery table
+ // is not partitioned.
+ oneof partition {
+ // BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
+ google.type.Date partition_date = 5;
+ }
+
+ // The project ID (can be project # or ID) that the BigQuery source is in with
+ // a length limit of 128 characters. If not specified, inherits the project
+ // ID from the parent request.
+ string project_id = 1;
+
+ // Required. The BigQuery data set to copy the data from with a length limit
+ // of 1,024 characters.
+ string dataset_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. The BigQuery table to copy the data from with a length limit of
+ // 1,024 characters.
+ string table_id = 3 [(google.api.field_behavior) = REQUIRED];
+
+ // Intermediate Cloud Storage directory used for the import with a length
+ // limit of 2,000 characters. Can be specified if one wants to have the
+ // BigQuery export to a specific Cloud Storage directory.
+ string gcs_staging_dir = 4;
+
+ // The schema to use when parsing the data from the source.
+ //
+ // Supported values for imports:
+ //
+ // * `user_event` (default): One JSON
+ // [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line.
+ //
+ // * `document` (default): One JSON
+ // [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each
+ // document must have a valid [document.id][].
+ string data_schema = 6;
+}
+
+// Configuration of destination for Import related errors.
+message ImportErrorConfig {
+ // Required. Errors destination.
+ oneof destination {
+ // Google Cloud Storage prefix for import errors. This must be an empty,
+ // existing Cloud Storage directory. Import errors will be written to
+ // sharded files in this directory, one per line, as a JSON-encoded
+ // `google.rpc.Status` message.
+ string gcs_prefix = 1;
+ }
+}
+
+// Request message for the ImportUserEvents request.
+message ImportUserEventsRequest {
+ // The inline source for the input config for ImportUserEvents method.
+ message InlineSource {
+ // Required. A list of user events to import. Recommended max of 10k items.
+ repeated UserEvent user_events = 1 [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // The desired input source of the user event data.
+ oneof source {
+ // Required. The Inline source for the input content for UserEvents.
+ InlineSource inline_source = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. Google Cloud Storage location for the input content.
+ GcsSource gcs_source = 3 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. BigQuery input source.
+ BigQuerySource bigquery_source = 4 [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // Required. Parent DataStore resource name, of the form
+ // `projects/{project}/locations/{location}/dataStores/{data_store}`
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/DataStore"
+ }
+ ];
+
+ // The desired location of errors incurred during the Import. Cannot be set
+ // for inline user event imports.
+ ImportErrorConfig error_config = 5;
+}
+
+// Response of the ImportUserEventsRequest. If the long running
+// operation was successful, then this message is returned by the
+// google.longrunning.Operations.response field if the operation was successful.
+message ImportUserEventsResponse {
+ // A sample of errors encountered while processing the request.
+ repeated google.rpc.Status error_samples = 1;
+
+ // Echoes the destination for the complete errors if this field was set in
+ // the request.
+ ImportErrorConfig error_config = 2;
+
+ // Count of user events imported with complete existing Documents.
+ int64 joined_events_count = 3;
+
+ // Count of user events imported, but with Document information not found
+ // in the existing Branch.
+ int64 unjoined_events_count = 4;
+}
+
+// Metadata related to the progress of the Import operation. This will be
+// returned by the google.longrunning.Operation.metadata field.
+message ImportUserEventsMetadata {
+ // Operation create time.
+ google.protobuf.Timestamp create_time = 1;
+
+ // Operation last update time. If the operation is done, this is also the
+ // finish time.
+ google.protobuf.Timestamp update_time = 2;
+
+ // Count of entries that were processed successfully.
+ int64 success_count = 3;
+
+ // Count of entries that encountered errors while processing.
+ int64 failure_count = 4;
+}
+
+// Metadata related to the progress of the ImportDocuments operation. This will
+// be returned by the google.longrunning.Operation.metadata field.
+message ImportDocumentsMetadata {
+ // Operation create time.
+ google.protobuf.Timestamp create_time = 1;
+
+ // Operation last update time. If the operation is done, this is also the
+ // finish time.
+ google.protobuf.Timestamp update_time = 2;
+
+ // Count of entries that were processed successfully.
+ int64 success_count = 3;
+
+ // Count of entries that encountered errors while processing.
+ int64 failure_count = 4;
+}
+
+// Request message for Import methods.
+message ImportDocumentsRequest {
+ // The inline source for the input config for ImportDocuments method.
+ message InlineSource {
+ // Required. A list of documents to update/create. Each document must have a
+ // valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id].
+ // Recommended max of 100 items.
+ repeated Document documents = 1 [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // Indicates how imported documents are reconciled with the existing documents
+ // created or imported before.
+ enum ReconciliationMode {
+ // Defaults to INCREMENTAL.
+ RECONCILIATION_MODE_UNSPECIFIED = 0;
+
+ // Inserts new documents or updates existing documents.
+ INCREMENTAL = 1;
+
+ // Calculates diff and replaces the entire document dataset. Existing
+ // documents may be deleted if they are not present in the source location.
+ FULL = 2;
+ }
+
+ // Required. The source of the input.
+ oneof source {
+ // The Inline source for the input content for documents.
+ InlineSource inline_source = 2;
+
+ // Google Cloud Storage location for the input content.
+ GcsSource gcs_source = 3;
+
+ // BigQuery input source.
+ BigQuerySource bigquery_source = 4;
+ }
+
+ // Required. The parent branch resource name, such as
+ // `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.
+ // Requires create/update permission.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/Branch"
+ }
+ ];
+
+ // The desired location of errors incurred during the Import.
+ ImportErrorConfig error_config = 5;
+
+ // The mode of reconciliation between existing documents and the documents to
+ // be imported. Defaults to
+ // [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
+ ReconciliationMode reconciliation_mode = 6;
+}
+
+// Response of the
+// [ImportDocumentsRequest][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest].
+// If the long running operation is done, then this message is returned by the
+// google.longrunning.Operations.response field if the operation was successful.
+message ImportDocumentsResponse {
+ // A sample of errors encountered while processing the request.
+ repeated google.rpc.Status error_samples = 1;
+
+ // Echoes the destination for the complete errors in the request if set.
+ ImportErrorConfig error_config = 2;
+}
diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto
new file mode 100644
index 00000000000..8efe0df3748
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto
@@ -0,0 +1,182 @@
+// 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.discoveryengine.v1beta;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/discoveryengine/v1beta/document.proto";
+import "google/cloud/discoveryengine/v1beta/user_event.proto";
+import "google/protobuf/struct.proto";
+
+option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
+option java_multiple_files = true;
+option java_outer_classname = "RecommendationServiceProto";
+option java_package = "com.google.cloud.discoveryengine.v1beta";
+option objc_class_prefix = "DISCOVERYENGINE";
+option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
+option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
+
+// Service for making recommendations.
+service RecommendationService {
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-platform";
+
+ // Makes a recommendation, which requires a contextual user event.
+ rpc Recommend(RecommendRequest) returns (RecommendResponse) {
+ option (google.api.http) = {
+ post: "/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:recommend"
+ body: "*"
+ };
+ }
+}
+
+// Request message for Recommend method.
+message RecommendRequest {
+ // Required. Full resource name of the format:
+ // projects/*/locations/global/dataStores/*/servingConfigs/*
+ //
+ // Before you can request recommendations from your model, you must create at
+ // least one serving config for it.
+ string serving_config = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/ServingConfig"
+ }
+ ];
+
+ // Required. Context about the user, what they are looking at and what action
+ // they took to trigger the Recommend request. Note that this user event
+ // detail won't be ingested to userEvent logs. Thus, a separate userEvent
+ // write request is required for event logging.
+ //
+ // Don't set
+ // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
+ // or
+ // [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id]
+ // to the same fixed ID for different users. If you are trying to receive
+ // non-personalized recommendations (not recommended; this can negatively
+ // impact model performance), instead set
+ // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
+ // to a random unique ID and leave
+ // [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1beta.UserInfo.user_id]
+ // unset.
+ UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Maximum number of results to return. Set this property
+ // to the number of recommendation results needed. If zero, the service will
+ // choose a reasonable default. The maximum allowed value is 100. Values
+ // above 100 will be coerced to 100.
+ int32 page_size = 3;
+
+ // Filter for restricting recommendation results with a length limit of 5,000
+ // characters. Currently, only filter expressions on the `filter_tags`
+ // attribute is supported.
+ //
+ //
+ // Examples:
+ //
+ // * (filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))
+ // * (filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))
+ //
+ // If your filter blocks all results, the API will return generic
+ // (unfiltered) popular Documents. If you only want results strictly matching
+ // the filters, set `strictFiltering` to True in
+ // [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]
+ // to receive empty results instead.
+ //
+ // Note that the API will never return Documents with storageStatus of
+ // "EXPIRED" or "DELETED" regardless of filter choices.
+ string filter = 4;
+
+ // Use validate only mode for this recommendation query. If set to true, a
+ // fake model will be used that returns arbitrary Document IDs.
+ // Note that the validate only mode should only be used for testing the API,
+ // or if the model is not ready.
+ bool validate_only = 5;
+
+ // Additional domain specific parameters for the recommendations.
+ //
+ // Allowed values:
+ //
+ // * `returnDocument`: Boolean. If set to true, the associated Document
+ // object will be returned in
+ // [RecommendResponse.results.document][RecommendationResult.document].
+ // * `returnScore`: Boolean. If set to true, the recommendation 'score'
+ // corresponding to each returned Document will be set in
+ // [RecommendResponse.results.metadata][RecommendationResult.metadata]. The
+ // given 'score' indicates the probability of a Document conversion given
+ // the user's context and history.
+ // * `strictFiltering`: Boolean. True by default. If set to false, the service
+ // will return generic (unfiltered) popular Documents instead of empty if
+ // your filter blocks all recommendation results.
+ // * `diversityLevel`: String. Default empty. If set to be non-empty, then
+ // it needs to be one of:
+ // * 'no-diversity'
+ // * 'low-diversity'
+ // * 'medium-diversity'
+ // * 'high-diversity'
+ // * 'auto-diversity'
+ // This gives request-level control and adjusts recommendation results
+ // based on Document category.
+ map params = 6;
+}
+
+// Response message for Recommend method.
+message RecommendResponse {
+ // RecommendationResult represents a generic recommendation result with
+ // associated metadata.
+ message RecommendationResult {
+ // Resource ID of the recommended Document.
+ string id = 1;
+
+ // Set if `returnDocument` is set to true in
+ // [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params].
+ Document document = 2;
+
+ // Additional Document metadata / annotations.
+ //
+ // Possible values:
+ //
+ // * `score`: Recommendation score in double value. Is set if
+ // `returnScore` is set to true in
+ // [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params].
+ map metadata = 3;
+ }
+
+ // A list of recommended Documents. The order represents the ranking (from the
+ // most relevant Document to the least).
+ repeated RecommendationResult results = 1;
+
+ // A unique attribution token. This should be included in the
+ // [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting
+ // from this recommendation, which enables accurate attribution of
+ // recommendation model performance.
+ string attribution_token = 2;
+
+ // IDs of documents in the request that were missing from the default Branch
+ // associated with the requested ServingConfig.
+ repeated string missing_ids = 3;
+
+ // True if
+ // [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only]
+ // was set.
+ bool validate_only = 4;
+}
diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event.proto
new file mode 100644
index 00000000000..0e2af5afcb8
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event.proto
@@ -0,0 +1,453 @@
+// 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.discoveryengine.v1beta;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/discoveryengine/v1beta/common.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
+option java_multiple_files = true;
+option java_outer_classname = "UserEventProto";
+option java_package = "com.google.cloud.discoveryengine.v1beta";
+option objc_class_prefix = "DISCOVERYENGINE";
+option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
+option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
+
+// UserEvent captures all metadata information DiscoveryEngine API needs to know
+// about how end users interact with customers' website.
+message UserEvent {
+ // Required. User event type. Allowed values are:
+ //
+ // Generic values:
+ // * `search`: Search for Documents.
+ // * `view-item`: Detailed page view of a Document.
+ // * `view-item-list`: View of a panel or ordered list of Documents.
+ // * `view-home-page`: View of the home page.
+ // * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
+ //
+ // Retail-related values:
+ // * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
+ // * `purchase`: Purchase an item(s)
+ //
+ // Media-related values:
+ // * `media-play`: Start/resume watching a video, playing a song, etc.
+ // * `media-complete`: Finished or stopped midway through a video, song, etc.
+ string event_type = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. A unique identifier for tracking visitors.
+ //
+ // For example, this could be implemented with an HTTP cookie, which should be
+ // able to uniquely identify a visitor on a single device. This unique
+ // identifier should not change if the visitor log in/out of the website.
+ //
+ // Do not set the field to the same fixed ID for different users. This mixes
+ // the event history of those users together, which results in degraded model
+ // quality.
+ //
+ // The field must be a UTF-8 encoded string with a length limit of 128
+ // characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ //
+ // The field should not contain PII or user-data. We recommend to use Google
+ // Analytics [Client
+ // ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
+ // for this field.
+ string user_pseudo_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Only required for
+ // [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEvents]
+ // method. Timestamp of when the user event happened.
+ google.protobuf.Timestamp event_time = 3;
+
+ // Information about the end user.
+ UserInfo user_info = 4;
+
+ // Should set to true if the request is made directly from the end user, in
+ // which case the
+ // [UserEvent.user_info.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
+ // can be populated from the HTTP request.
+ //
+ // This flag should be set only if the API request is made directly from the
+ // end user such as a mobile app (and not if a gateway or a server is
+ // processing and pushing the user events).
+ //
+ // This should not be set when using the JavaScript tag in
+ // [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent].
+ bool direct_user_request = 5;
+
+ // A unique identifier for tracking a visitor session with a length limit of
+ // 128 bytes. A session is an aggregation of an end user behavior in a time
+ // span.
+ //
+ // A general guideline to populate the sesion_id:
+ // 1. If user has no activity for 30 min, a new session_id should be assigned.
+ // 2. The session_id should be unique across users, suggest use uuid or add
+ // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
+ // as prefix.
+ string session_id = 6;
+
+ // Page metadata such as categories and other critical information for certain
+ // event types such as `view-category-page`.
+ PageInfo page_info = 7;
+
+ // Token to attribute an API response to user action(s) to trigger the event.
+ //
+ // Highly recommended for user events that are the result of
+ // [PredictionService.Predict][]. This field enables accurate attribution of
+ // recommendation model performance.
+ //
+ // The value must be one of:
+ //
+ // * [PredictResponse.attribution_token][] for events that are the result of
+ // [PredictionService.Predict][].
+ // * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of
+ // [SearchService.Search][].
+ // * [CompleteQueryResponse.attribution_token][] for events that are the
+ // result of [SearchService.CompleteQuery][].
+ //
+ // This token enables us to accurately attribute page view or conversion
+ // completion back to the event and the particular predict response containing
+ // this clicked/purchased product. If user clicks on product K in the
+ // recommendation results, pass [PredictResponse.attribution_token][] as a URL
+ // parameter to product K's page. When recording events on product K's page,
+ // log the [PredictResponse.attribution_token][] to this field.
+ string attribution_token = 8;
+
+ // The filter syntax consists of an expression language for constructing a
+ // predicate from one or more fields of the documents being filtered.
+ //
+ // One example is for `search` events, the associated
+ // [SearchService.SearchRequest][] may contain a filter expression in
+ // [SearchService.SearchRequest.filter][] conforming to
+ // https://google.aip.dev/160#filtering.
+ //
+ // Similarly, for `view-item-list` events that are generated from a
+ // [PredictionService.PredictRequest][], this field may be populated directly
+ // from [PredictionService.PredictRequest.filter][] conforming to
+ // https://google.aip.dev/160#filtering.
+ //
+ // The value must be a UTF-8 encoded string with a length limit of 1,000
+ // characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ string filter = 9;
+
+ // List of Documents associated with this user event.
+ //
+ // This field is optional except for the following event types:
+ //
+ // * `view-item`
+ // * `add-to-cart`
+ // * `purchase`
+ // * `media-play`
+ // * `media-complete`
+ //
+ // In a `search` event, this field represents the documents returned to the
+ // end user on the current page (the end user may have not finished browsing
+ // the whole page yet). When a new page is returned to the end user, after
+ // pagination/filtering/ordering even for the same query, a new `search` event
+ // with different
+ // [UserEvent.documents][google.cloud.discoveryengine.v1beta.UserEvent.documents]
+ // is desired.
+ repeated DocumentInfo documents = 10;
+
+ // Panel metadata associated with this user event.
+ PanelInfo panel = 11;
+
+ // Search API details related to the event.
+ //
+ // This field should be set for `search` event.
+ SearchInfo search_info = 12;
+
+ // CompleteQuery API details related to the event.
+ //
+ // This field should be set for `search` event when autocomplete function is
+ // enabled and the user clicks a suggestion for search.
+ CompletionInfo completion_info = 13;
+
+ // The transaction metadata (if any) associated with this user event.
+ TransactionInfo transaction_info = 14;
+
+ // A list of identifiers for the independent experiment groups this user event
+ // belongs to. This is used to distinguish between user events associated with
+ // different experiment setups on the customer end.
+ repeated string tag_ids = 15;
+
+ // The promotion IDs if this is an event associated with promotions.
+ // Currently, this field is restricted to at most one ID.
+ repeated string promotion_ids = 16;
+
+ // Extra user event features to include in the recommendation model.
+ // These attributes must NOT contain data that needs to be parsed or processed
+ // further, e.g. JSON or other encodings.
+ //
+ // If you provide custom attributes for ingested user events, also include
+ // them in the user events that you associate with prediction requests. Custom
+ // attribute formatting must be consistent between imported events and events
+ // provided with prediction requests. This lets the DiscoveryEngine API use
+ // those custom attributes when training models and serving predictions, which
+ // helps improve recommendation quality.
+ //
+ // This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
+ // error is returned:
+ //
+ // * The key must be a UTF-8 encoded string with a length limit of 5,000
+ // characters.
+ // * For text attributes, at most 400 values are allowed. Empty values are not
+ // allowed. Each value must be a UTF-8 encoded string with a length limit of
+ // 256 characters.
+ // * For number attributes, at most 400 values are allowed.
+ //
+ // For product recommendations, an example of extra user information is
+ // traffic_channel, which is how a user arrives at the site. Users can arrive
+ // at the site by coming to the site directly, coming through Google
+ // search, or in other ways.
+ map attributes = 17;
+
+ // Media-specific info.
+ MediaInfo media_info = 18;
+}
+
+// Detailed page information.
+message PageInfo {
+ // A unique ID of a web page view.
+ //
+ // This should be kept the same for all user events triggered from the same
+ // pageview. For example, an item detail page view could trigger multiple
+ // events as the user is browsing the page. The `pageViewId` property should
+ // be kept the same for all these events so that they can be grouped together
+ // properly.
+ //
+ // When using the client side event reporting with JavaScript pixel and Google
+ // Tag Manager, this value is filled in automatically.
+ string pageview_id = 1;
+
+ // The most specific category associated with a category page.
+ //
+ // To represent full path of category, use '>' sign to separate different
+ // hierarchies. If '>' is part of the category name, please replace it with
+ // other character(s).
+ //
+ // Category pages include special pages such as sales or promotions. For
+ // instance, a special sale page may have the category hierarchy:
+ // "pageCategory" : "Sales > 2017 Black Friday Deals".
+ //
+ // Required for `view-category-page` events. Other event types should not set
+ // this field. Otherwise, an INVALID_ARGUMENT error is returned.
+ string page_category = 2;
+
+ // Complete URL (window.location.href) of the user's current page.
+ //
+ // When using the client side event reporting with JavaScript pixel and Google
+ // Tag Manager, this value is filled in automatically. Maximum length 5,000
+ // characters.
+ string uri = 3;
+
+ // The referrer URL of the current page.
+ //
+ // When using the client side event reporting with JavaScript pixel and Google
+ // Tag Manager, this value is filled in automatically. However, some browser
+ // privacy restrictions may cause this field to be empty.
+ string referrer_uri = 4;
+}
+
+// Detailed search information.
+message SearchInfo {
+ // The user's search query.
+ //
+ // See
+ // [SearchRequest.query][google.cloud.discoveryengine.v1beta.SearchRequest.query]
+ // for definition.
+ //
+ // The value must be a UTF-8 encoded string with a length limit of 5,000
+ // characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ //
+ // At least one of
+ // [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query]
+ // or [page_categories][] is required for `search` events. Other event types
+ // should not set this field. Otherwise, an INVALID_ARGUMENT error is
+ // returned.
+ string search_query = 1;
+
+ // The order in which products are returned, if applicable.
+ //
+ // See
+ // [SearchRequest.order_by][google.cloud.discoveryengine.v1beta.SearchRequest.order_by]
+ // for definition and syntax.
+ //
+ // The value must be a UTF-8 encoded string with a length limit of 1,000
+ // characters. Otherwise, an INVALID_ARGUMENT error is returned.
+ //
+ // This can only be set for `search` events. Other event types should not set
+ // this field. Otherwise, an INVALID_ARGUMENT error is returned.
+ string order_by = 2;
+
+ // An integer that specifies the current offset for pagination (the 0-indexed
+ // starting location, amongst the products deemed by the API as relevant).
+ //
+ // See
+ // [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset]
+ // for definition.
+ //
+ // If this field is negative, an INVALID_ARGUMENT is returned.
+ //
+ // This can only be set for `search` events. Other event types should not set
+ // this field. Otherwise, an INVALID_ARGUMENT error is returned.
+ optional int32 offset = 3;
+}
+
+// Detailed completion information including completion attribution token and
+// clicked completion info.
+message CompletionInfo {
+ // End user selected [CompleteQueryResponse.CompletionResult.suggestion][].
+ string selected_suggestion = 1;
+
+ // End user selected [CompleteQueryResponse.CompletionResult.suggestion][]
+ // position, starting from 0.
+ int32 selected_position = 2;
+}
+
+// A transaction represents the entire purchase transaction.
+message TransactionInfo {
+ // Required. Total non-zero value associated with the transaction. This value
+ // may include shipping, tax, or other adjustments to the total value that you
+ // want to include.
+ optional float value = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. Currency code. Use three-character ISO-4217 code.
+ string currency = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // The transaction ID with a length limit of 128 characters.
+ string transaction_id = 3;
+
+ // All the taxes associated with the transaction.
+ optional float tax = 4;
+
+ // All the costs associated with the products. These can be manufacturing
+ // costs, shipping expenses not borne by the end user, or any other costs,
+ // such that:
+ //
+ // * Profit =
+ // [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] -
+ // [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] -
+ // [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
+ optional float cost = 5;
+
+ // The total discount(s) value applied to this transaction.
+ // This figure should be excluded from
+ // [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]
+ //
+ // For example, if a user paid
+ // [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]
+ // amount, then nominal (pre-discount) value of the transaction is the sum of
+ // [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]
+ // and
+ // [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value]
+ //
+ // This means that profit is calculated the same way, regardless of the
+ // discount value, and that
+ // [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value]
+ // can be larger than
+ // [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]:
+ //
+ // * Profit =
+ // [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] -
+ // [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] -
+ // [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
+ optional float discount_value = 6;
+}
+
+// Detailed document information associated with a user event.
+message DocumentInfo {
+ // A required descriptor of the associated Document.
+ //
+ // * If [id][google.cloud.discoveryengine.v1beta.DocumentInfo.id] is
+ // specified, then the default values for , , and
+ // are used when annotating with the stored Document.
+ //
+ // * If [name][google.cloud.discoveryengine.v1beta.DocumentInfo.name] is
+ // specified, then the provided values (default values allowed) for
+ // , , and are used when annotating with
+ // the stored Document.
+ oneof document_descriptor {
+ // Required. The Document resource ID.
+ string id = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Required. The Document resource full name, of the form:
+ // projects//locations//dataStores//branches//documents/
+ string name = 2 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/Document"
+ }
+ ];
+ }
+
+ // Quantity of the Document associated with the user event. Defaults to 1.
+ //
+ // For example, this field will be 2 if two quantities of the same Document
+ // are involved in a `add-to-cart` event.
+ //
+ // Required for events of the following event types:
+ // * `add-to-cart`
+ // * `purchase`
+ optional int32 quantity = 3;
+
+ // The promotion IDs associated with this Document.
+ // Currently, this field is restricted to at most one ID.
+ repeated string promotion_ids = 4;
+}
+
+// Detailed panel information associated with a user event.
+message PanelInfo {
+ // Required. The panel ID.
+ string panel_id = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // The display name of the panel.
+ string display_name = 3;
+
+ // The ordered position of the panel, if shown to the user with other panels.
+ // If set, then
+ // [total_panels][google.cloud.discoveryengine.v1beta.PanelInfo.total_panels]
+ // must also be set.
+ optional int32 panel_position = 4;
+
+ // The total number of panels, including this one, shown to the user.
+ // Must be set if
+ // [panel_position][google.cloud.discoveryengine.v1beta.PanelInfo.panel_position]
+ // is set.
+ optional int32 total_panels = 5;
+}
+
+// Media-specific user event information.
+message MediaInfo {
+ // The media progress time in seconds, if applicable.
+ // For example, if the end user has finished 90 seconds of a playback video,
+ // then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should
+ // be set to 90.
+ google.protobuf.Duration media_progress_duration = 1;
+
+ // Media progress should be computed using only the media_progress_duration
+ // relative to the media total length.
+ //
+ // This value must be between [0, 1.0] inclusive.
+ //
+ // If this is not a playback or the progress cannot be computed (e.g. ongoing
+ // livestream), this field should be unset.
+ optional float media_progress_percentage = 2;
+}
diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto
new file mode 100644
index 00000000000..21900556475
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto
@@ -0,0 +1,122 @@
+// 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.discoveryengine.v1beta;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/httpbody.proto";
+import "google/api/resource.proto";
+import "google/cloud/discoveryengine/v1beta/import_config.proto";
+import "google/cloud/discoveryengine/v1beta/user_event.proto";
+import "google/longrunning/operations.proto";
+
+option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
+option java_multiple_files = true;
+option java_outer_classname = "UserEventServiceProto";
+option java_package = "com.google.cloud.discoveryengine.v1beta";
+option objc_class_prefix = "DISCOVERYENGINE";
+option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
+option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
+
+// Service for ingesting end user actions on a website to Discovery Engine API.
+service UserEventService {
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
+ option (google.api.oauth_scopes) =
+ "https://www.googleapis.com/auth/cloud-platform";
+
+ // Writes a single user event.
+ rpc WriteUserEvent(WriteUserEventRequest) returns (UserEvent) {
+ option (google.api.http) = {
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:write"
+ body: "user_event"
+ };
+ }
+
+ // Writes a single user event from the browser. This uses a GET request to
+ // due to browser restriction of POST-ing to a 3rd party domain.
+ //
+ // This method is used only by the Discovery Engine API JavaScript pixel and
+ // Google Tag Manager. Users should not call this method directly.
+ rpc CollectUserEvent(CollectUserEventRequest) returns (google.api.HttpBody) {
+ option (google.api.http) = {
+ get: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect"
+ };
+ }
+
+ // Bulk import of User events. Request processing might be
+ // synchronous. Events that already exist are skipped.
+ // Use this method for backfilling historical user events.
+ //
+ // Operation.response is of type ImportResponse. Note that it is
+ // possible for a subset of the items to be successfully inserted.
+ // Operation.metadata is of type ImportMetadata.
+ rpc ImportUserEvents(ImportUserEventsRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:import"
+ body: "*"
+ };
+ option (google.longrunning.operation_info) = {
+ response_type: "google.cloud.discoveryengine.v1beta.ImportUserEventsResponse"
+ metadata_type: "google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata"
+ };
+ }
+}
+
+// Request message for WriteUserEvent method.
+message WriteUserEventRequest {
+ // Required. The parent DataStore resource name, such as
+ // `projects/{project}/locations/{location}/dataStores/{data_store}`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/DataStore"
+ }
+ ];
+
+ // Required. User event to write.
+ optional UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request message for CollectUserEvent method.
+message CollectUserEventRequest {
+ // Required. The parent DataStore resource name, such as
+ // `projects/{project}/locations/{location}/dataStores/{data_store}`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "discoveryengine.googleapis.com/DataStore"
+ }
+ ];
+
+ // Required. URL encoded UserEvent proto with a length limit of 2,000,000
+ // characters.
+ string user_event = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // The URL including cgi-parameters but excluding the hash fragment with a
+ // length limit of 5,000 characters. This is often more useful than the
+ // referer URL, because many browsers only send the domain for 3rd party
+ // requests.
+ optional string uri = 3;
+
+ // The event timestamp in milliseconds. This prevents browser caching of
+ // otherwise identical get requests. The name is abbreviated to reduce the
+ // payload bytes.
+ optional int64 ets = 4;
+}
diff --git a/packages/google-cloud-discoveryengine/protos/protos.d.ts b/packages/google-cloud-discoveryengine/protos/protos.d.ts
new file mode 100644
index 00000000000..c346f475825
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/protos/protos.d.ts
@@ -0,0 +1,10120 @@
+// 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 Long = require("long");
+import type {protobuf as $protobuf} from "google-gax";
+/** Namespace google. */
+export namespace google {
+
+ /** Namespace cloud. */
+ namespace cloud {
+
+ /** Namespace discoveryengine. */
+ namespace discoveryengine {
+
+ /** Namespace v1beta. */
+ namespace v1beta {
+
+ /** Properties of a CustomAttribute. */
+ interface ICustomAttribute {
+
+ /** CustomAttribute text */
+ text?: (string[]|null);
+
+ /** CustomAttribute numbers */
+ numbers?: (number[]|null);
+ }
+
+ /** Represents a CustomAttribute. */
+ class CustomAttribute implements ICustomAttribute {
+
+ /**
+ * Constructs a new CustomAttribute.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.ICustomAttribute);
+
+ /** CustomAttribute text. */
+ public text: string[];
+
+ /** CustomAttribute numbers. */
+ public numbers: number[];
+
+ /**
+ * Creates a new CustomAttribute instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CustomAttribute instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.ICustomAttribute): google.cloud.discoveryengine.v1beta.CustomAttribute;
+
+ /**
+ * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CustomAttribute.verify|verify} messages.
+ * @param message CustomAttribute message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CustomAttribute.verify|verify} messages.
+ * @param message CustomAttribute message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICustomAttribute, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CustomAttribute message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CustomAttribute
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.CustomAttribute;
+
+ /**
+ * Decodes a CustomAttribute message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CustomAttribute
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.CustomAttribute;
+
+ /**
+ * Verifies a CustomAttribute message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CustomAttribute
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CustomAttribute;
+
+ /**
+ * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified.
+ * @param message CustomAttribute
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.CustomAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CustomAttribute to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CustomAttribute
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a UserInfo. */
+ interface IUserInfo {
+
+ /** UserInfo userId */
+ userId?: (string|null);
+
+ /** UserInfo userAgent */
+ userAgent?: (string|null);
+ }
+
+ /** Represents a UserInfo. */
+ class UserInfo implements IUserInfo {
+
+ /**
+ * Constructs a new UserInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IUserInfo);
+
+ /** UserInfo userId. */
+ public userId: string;
+
+ /** UserInfo userAgent. */
+ public userAgent: string;
+
+ /**
+ * Creates a new UserInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UserInfo instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IUserInfo): google.cloud.discoveryengine.v1beta.UserInfo;
+
+ /**
+ * Encodes the specified UserInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserInfo.verify|verify} messages.
+ * @param message UserInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IUserInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UserInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserInfo.verify|verify} messages.
+ * @param message UserInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IUserInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a UserInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UserInfo
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.UserInfo;
+
+ /**
+ * Decodes a UserInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UserInfo
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.UserInfo;
+
+ /**
+ * Verifies a UserInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a UserInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UserInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.UserInfo;
+
+ /**
+ * Creates a plain object from a UserInfo message. Also converts values to other types if specified.
+ * @param message UserInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.UserInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UserInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UserInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Document. */
+ interface IDocument {
+
+ /** Document structData */
+ structData?: (google.protobuf.IStruct|null);
+
+ /** Document jsonData */
+ jsonData?: (string|null);
+
+ /** Document name */
+ name?: (string|null);
+
+ /** Document id */
+ id?: (string|null);
+
+ /** Document schemaId */
+ schemaId?: (string|null);
+
+ /** Document parentDocumentId */
+ parentDocumentId?: (string|null);
+ }
+
+ /** Represents a Document. */
+ class Document implements IDocument {
+
+ /**
+ * Constructs a new Document.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IDocument);
+
+ /** Document structData. */
+ public structData?: (google.protobuf.IStruct|null);
+
+ /** Document jsonData. */
+ public jsonData?: (string|null);
+
+ /** Document name. */
+ public name: string;
+
+ /** Document id. */
+ public id: string;
+
+ /** Document schemaId. */
+ public schemaId: string;
+
+ /** Document parentDocumentId. */
+ public parentDocumentId: string;
+
+ /** Document data. */
+ public data?: ("structData"|"jsonData");
+
+ /**
+ * Creates a new Document instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Document instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IDocument): google.cloud.discoveryengine.v1beta.Document;
+
+ /**
+ * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages.
+ * @param message Document message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IDocument, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages.
+ * @param message Document message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDocument, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Document message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Document
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.Document;
+
+ /**
+ * Decodes a Document message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Document
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.Document;
+
+ /**
+ * Verifies a Document message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Document message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Document
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.Document;
+
+ /**
+ * Creates a plain object from a Document message. Also converts values to other types if specified.
+ * @param message Document
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.Document, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Document to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Document
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Represents a DocumentService */
+ class DocumentService extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new DocumentService 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 DocumentService 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): DocumentService;
+
+ /**
+ * Calls GetDocument.
+ * @param request GetDocumentRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Document
+ */
+ public getDocument(request: google.cloud.discoveryengine.v1beta.IGetDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.GetDocumentCallback): void;
+
+ /**
+ * Calls GetDocument.
+ * @param request GetDocumentRequest message or plain object
+ * @returns Promise
+ */
+ public getDocument(request: google.cloud.discoveryengine.v1beta.IGetDocumentRequest): Promise;
+
+ /**
+ * Calls ListDocuments.
+ * @param request ListDocumentsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and ListDocumentsResponse
+ */
+ public listDocuments(request: google.cloud.discoveryengine.v1beta.IListDocumentsRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.ListDocumentsCallback): void;
+
+ /**
+ * Calls ListDocuments.
+ * @param request ListDocumentsRequest message or plain object
+ * @returns Promise
+ */
+ public listDocuments(request: google.cloud.discoveryengine.v1beta.IListDocumentsRequest): Promise;
+
+ /**
+ * Calls CreateDocument.
+ * @param request CreateDocumentRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Document
+ */
+ public createDocument(request: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.CreateDocumentCallback): void;
+
+ /**
+ * Calls CreateDocument.
+ * @param request CreateDocumentRequest message or plain object
+ * @returns Promise
+ */
+ public createDocument(request: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest): Promise;
+
+ /**
+ * Calls UpdateDocument.
+ * @param request UpdateDocumentRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Document
+ */
+ public updateDocument(request: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocumentCallback): void;
+
+ /**
+ * Calls UpdateDocument.
+ * @param request UpdateDocumentRequest message or plain object
+ * @returns Promise
+ */
+ public updateDocument(request: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest): Promise;
+
+ /**
+ * Calls DeleteDocument.
+ * @param request DeleteDocumentRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Empty
+ */
+ public deleteDocument(request: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocumentCallback): void;
+
+ /**
+ * Calls DeleteDocument.
+ * @param request DeleteDocumentRequest message or plain object
+ * @returns Promise
+ */
+ public deleteDocument(request: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest): Promise;
+
+ /**
+ * Calls ImportDocuments.
+ * @param request ImportDocumentsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Operation
+ */
+ public importDocuments(request: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.ImportDocumentsCallback): void;
+
+ /**
+ * Calls ImportDocuments.
+ * @param request ImportDocumentsRequest message or plain object
+ * @returns Promise
+ */
+ public importDocuments(request: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest): Promise;
+ }
+
+ namespace DocumentService {
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|getDocument}.
+ * @param error Error, if any
+ * @param [response] Document
+ */
+ type GetDocumentCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Document) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|listDocuments}.
+ * @param error Error, if any
+ * @param [response] ListDocumentsResponse
+ */
+ type ListDocumentsCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.ListDocumentsResponse) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|createDocument}.
+ * @param error Error, if any
+ * @param [response] Document
+ */
+ type CreateDocumentCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Document) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|updateDocument}.
+ * @param error Error, if any
+ * @param [response] Document
+ */
+ type UpdateDocumentCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Document) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|deleteDocument}.
+ * @param error Error, if any
+ * @param [response] Empty
+ */
+ type DeleteDocumentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|importDocuments}.
+ * @param error Error, if any
+ * @param [response] Operation
+ */
+ type ImportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void;
+ }
+
+ /** Properties of a GetDocumentRequest. */
+ interface IGetDocumentRequest {
+
+ /** GetDocumentRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a GetDocumentRequest. */
+ class GetDocumentRequest implements IGetDocumentRequest {
+
+ /**
+ * Constructs a new GetDocumentRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IGetDocumentRequest);
+
+ /** GetDocumentRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new GetDocumentRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GetDocumentRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IGetDocumentRequest): google.cloud.discoveryengine.v1beta.GetDocumentRequest;
+
+ /**
+ * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages.
+ * @param message GetDocumentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages.
+ * @param message GetDocumentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a GetDocumentRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns GetDocumentRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.GetDocumentRequest;
+
+ /**
+ * Decodes a GetDocumentRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns GetDocumentRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.GetDocumentRequest;
+
+ /**
+ * Verifies a GetDocumentRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a GetDocumentRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns GetDocumentRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.GetDocumentRequest;
+
+ /**
+ * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified.
+ * @param message GetDocumentRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.GetDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this GetDocumentRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for GetDocumentRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListDocumentsRequest. */
+ interface IListDocumentsRequest {
+
+ /** ListDocumentsRequest parent */
+ parent?: (string|null);
+
+ /** ListDocumentsRequest pageSize */
+ pageSize?: (number|null);
+
+ /** ListDocumentsRequest pageToken */
+ pageToken?: (string|null);
+ }
+
+ /** Represents a ListDocumentsRequest. */
+ class ListDocumentsRequest implements IListDocumentsRequest {
+
+ /**
+ * Constructs a new ListDocumentsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsRequest);
+
+ /** ListDocumentsRequest parent. */
+ public parent: string;
+
+ /** ListDocumentsRequest pageSize. */
+ public pageSize: number;
+
+ /** ListDocumentsRequest pageToken. */
+ public pageToken: string;
+
+ /**
+ * Creates a new ListDocumentsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListDocumentsRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsRequest): google.cloud.discoveryengine.v1beta.ListDocumentsRequest;
+
+ /**
+ * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages.
+ * @param message ListDocumentsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages.
+ * @param message ListDocumentsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListDocumentsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListDocumentsRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ListDocumentsRequest;
+
+ /**
+ * Decodes a ListDocumentsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListDocumentsRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ListDocumentsRequest;
+
+ /**
+ * Verifies a ListDocumentsRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListDocumentsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ListDocumentsRequest;
+
+ /**
+ * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified.
+ * @param message ListDocumentsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ListDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListDocumentsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListDocumentsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a ListDocumentsResponse. */
+ interface IListDocumentsResponse {
+
+ /** ListDocumentsResponse documents */
+ documents?: (google.cloud.discoveryengine.v1beta.IDocument[]|null);
+
+ /** ListDocumentsResponse nextPageToken */
+ nextPageToken?: (string|null);
+ }
+
+ /** Represents a ListDocumentsResponse. */
+ class ListDocumentsResponse implements IListDocumentsResponse {
+
+ /**
+ * Constructs a new ListDocumentsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsResponse);
+
+ /** ListDocumentsResponse documents. */
+ public documents: google.cloud.discoveryengine.v1beta.IDocument[];
+
+ /** ListDocumentsResponse nextPageToken. */
+ public nextPageToken: string;
+
+ /**
+ * Creates a new ListDocumentsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListDocumentsResponse instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsResponse): google.cloud.discoveryengine.v1beta.ListDocumentsResponse;
+
+ /**
+ * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages.
+ * @param message ListDocumentsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages.
+ * @param message ListDocumentsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListDocumentsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListDocumentsResponse
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ListDocumentsResponse;
+
+ /**
+ * Decodes a ListDocumentsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListDocumentsResponse
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ListDocumentsResponse;
+
+ /**
+ * Verifies a ListDocumentsResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListDocumentsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ListDocumentsResponse;
+
+ /**
+ * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified.
+ * @param message ListDocumentsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ListDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListDocumentsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListDocumentsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CreateDocumentRequest. */
+ interface ICreateDocumentRequest {
+
+ /** CreateDocumentRequest parent */
+ parent?: (string|null);
+
+ /** CreateDocumentRequest document */
+ document?: (google.cloud.discoveryengine.v1beta.IDocument|null);
+
+ /** CreateDocumentRequest documentId */
+ documentId?: (string|null);
+ }
+
+ /** Represents a CreateDocumentRequest. */
+ class CreateDocumentRequest implements ICreateDocumentRequest {
+
+ /**
+ * Constructs a new CreateDocumentRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest);
+
+ /** CreateDocumentRequest parent. */
+ public parent: string;
+
+ /** CreateDocumentRequest document. */
+ public document?: (google.cloud.discoveryengine.v1beta.IDocument|null);
+
+ /** CreateDocumentRequest documentId. */
+ public documentId: string;
+
+ /**
+ * Creates a new CreateDocumentRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CreateDocumentRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest): google.cloud.discoveryengine.v1beta.CreateDocumentRequest;
+
+ /**
+ * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages.
+ * @param message CreateDocumentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages.
+ * @param message CreateDocumentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CreateDocumentRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CreateDocumentRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.CreateDocumentRequest;
+
+ /**
+ * Decodes a CreateDocumentRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CreateDocumentRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.CreateDocumentRequest;
+
+ /**
+ * Verifies a CreateDocumentRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CreateDocumentRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CreateDocumentRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CreateDocumentRequest;
+
+ /**
+ * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified.
+ * @param message CreateDocumentRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.CreateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CreateDocumentRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CreateDocumentRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an UpdateDocumentRequest. */
+ interface IUpdateDocumentRequest {
+
+ /** UpdateDocumentRequest document */
+ document?: (google.cloud.discoveryengine.v1beta.IDocument|null);
+
+ /** UpdateDocumentRequest allowMissing */
+ allowMissing?: (boolean|null);
+ }
+
+ /** Represents an UpdateDocumentRequest. */
+ class UpdateDocumentRequest implements IUpdateDocumentRequest {
+
+ /**
+ * Constructs a new UpdateDocumentRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest);
+
+ /** UpdateDocumentRequest document. */
+ public document?: (google.cloud.discoveryengine.v1beta.IDocument|null);
+
+ /** UpdateDocumentRequest allowMissing. */
+ public allowMissing: boolean;
+
+ /**
+ * Creates a new UpdateDocumentRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UpdateDocumentRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest): google.cloud.discoveryengine.v1beta.UpdateDocumentRequest;
+
+ /**
+ * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages.
+ * @param message UpdateDocumentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages.
+ * @param message UpdateDocumentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an UpdateDocumentRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UpdateDocumentRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.UpdateDocumentRequest;
+
+ /**
+ * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UpdateDocumentRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.UpdateDocumentRequest;
+
+ /**
+ * Verifies an UpdateDocumentRequest message.
+ * @param message Plain 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 UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UpdateDocumentRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.UpdateDocumentRequest;
+
+ /**
+ * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified.
+ * @param message UpdateDocumentRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.UpdateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UpdateDocumentRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UpdateDocumentRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DeleteDocumentRequest. */
+ interface IDeleteDocumentRequest {
+
+ /** DeleteDocumentRequest name */
+ name?: (string|null);
+ }
+
+ /** Represents a DeleteDocumentRequest. */
+ class DeleteDocumentRequest implements IDeleteDocumentRequest {
+
+ /**
+ * Constructs a new DeleteDocumentRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest);
+
+ /** DeleteDocumentRequest name. */
+ public name: string;
+
+ /**
+ * Creates a new DeleteDocumentRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DeleteDocumentRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest): google.cloud.discoveryengine.v1beta.DeleteDocumentRequest;
+
+ /**
+ * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages.
+ * @param message DeleteDocumentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages.
+ * @param message DeleteDocumentRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DeleteDocumentRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DeleteDocumentRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.DeleteDocumentRequest;
+
+ /**
+ * Decodes a DeleteDocumentRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DeleteDocumentRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.DeleteDocumentRequest;
+
+ /**
+ * Verifies a DeleteDocumentRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DeleteDocumentRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.DeleteDocumentRequest;
+
+ /**
+ * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified.
+ * @param message DeleteDocumentRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.DeleteDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DeleteDocumentRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DeleteDocumentRequest
+ * @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 inputUris */
+ inputUris?: (string[]|null);
+
+ /** GcsSource dataSchema */
+ dataSchema?: (string|null);
+ }
+
+ /** Represents a GcsSource. */
+ class GcsSource implements IGcsSource {
+
+ /**
+ * Constructs a new GcsSource.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IGcsSource);
+
+ /** GcsSource inputUris. */
+ public inputUris: string[];
+
+ /** GcsSource dataSchema. */
+ public dataSchema: string;
+
+ /**
+ * Creates a new GcsSource instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns GcsSource instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IGcsSource): google.cloud.discoveryengine.v1beta.GcsSource;
+
+ /**
+ * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.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.discoveryengine.v1beta.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.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.discoveryengine.v1beta.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.discoveryengine.v1beta.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.discoveryengine.v1beta.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.discoveryengine.v1beta.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.discoveryengine.v1beta.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 BigQuerySource. */
+ interface IBigQuerySource {
+
+ /** BigQuerySource partitionDate */
+ partitionDate?: (google.type.IDate|null);
+
+ /** BigQuerySource projectId */
+ projectId?: (string|null);
+
+ /** BigQuerySource datasetId */
+ datasetId?: (string|null);
+
+ /** BigQuerySource tableId */
+ tableId?: (string|null);
+
+ /** BigQuerySource gcsStagingDir */
+ gcsStagingDir?: (string|null);
+
+ /** BigQuerySource dataSchema */
+ dataSchema?: (string|null);
+ }
+
+ /** Represents a BigQuerySource. */
+ class BigQuerySource implements IBigQuerySource {
+
+ /**
+ * Constructs a new BigQuerySource.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IBigQuerySource);
+
+ /** BigQuerySource partitionDate. */
+ public partitionDate?: (google.type.IDate|null);
+
+ /** BigQuerySource projectId. */
+ public projectId: string;
+
+ /** BigQuerySource datasetId. */
+ public datasetId: string;
+
+ /** BigQuerySource tableId. */
+ public tableId: string;
+
+ /** BigQuerySource gcsStagingDir. */
+ public gcsStagingDir: string;
+
+ /** BigQuerySource dataSchema. */
+ public dataSchema: string;
+
+ /** BigQuerySource partition. */
+ public partition?: "partitionDate";
+
+ /**
+ * Creates a new BigQuerySource instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns BigQuerySource instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IBigQuerySource): google.cloud.discoveryengine.v1beta.BigQuerySource;
+
+ /**
+ * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages.
+ * @param message BigQuerySource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages.
+ * @param message BigQuerySource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a BigQuerySource message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns BigQuerySource
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.BigQuerySource;
+
+ /**
+ * Decodes a BigQuerySource message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns BigQuerySource
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.BigQuerySource;
+
+ /**
+ * Verifies a BigQuerySource message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns BigQuerySource
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.BigQuerySource;
+
+ /**
+ * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified.
+ * @param message BigQuerySource
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.BigQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this BigQuerySource to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for BigQuerySource
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an ImportErrorConfig. */
+ interface IImportErrorConfig {
+
+ /** ImportErrorConfig gcsPrefix */
+ gcsPrefix?: (string|null);
+ }
+
+ /** Represents an ImportErrorConfig. */
+ class ImportErrorConfig implements IImportErrorConfig {
+
+ /**
+ * Constructs a new ImportErrorConfig.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IImportErrorConfig);
+
+ /** ImportErrorConfig gcsPrefix. */
+ public gcsPrefix?: (string|null);
+
+ /** ImportErrorConfig destination. */
+ public destination?: "gcsPrefix";
+
+ /**
+ * Creates a new ImportErrorConfig instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImportErrorConfig instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IImportErrorConfig): google.cloud.discoveryengine.v1beta.ImportErrorConfig;
+
+ /**
+ * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages.
+ * @param message ImportErrorConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IImportErrorConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages.
+ * @param message ImportErrorConfig message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportErrorConfig, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImportErrorConfig message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImportErrorConfig
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ImportErrorConfig;
+
+ /**
+ * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImportErrorConfig
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ImportErrorConfig;
+
+ /**
+ * Verifies an ImportErrorConfig message.
+ * @param message Plain 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 ImportErrorConfig message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImportErrorConfig
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportErrorConfig;
+
+ /**
+ * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified.
+ * @param message ImportErrorConfig
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ImportErrorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImportErrorConfig to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImportErrorConfig
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an ImportUserEventsRequest. */
+ interface IImportUserEventsRequest {
+
+ /** ImportUserEventsRequest inlineSource */
+ inlineSource?: (google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null);
+
+ /** ImportUserEventsRequest gcsSource */
+ gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null);
+
+ /** ImportUserEventsRequest bigquerySource */
+ bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null);
+
+ /** ImportUserEventsRequest parent */
+ parent?: (string|null);
+
+ /** ImportUserEventsRequest errorConfig */
+ errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null);
+ }
+
+ /** Represents an ImportUserEventsRequest. */
+ class ImportUserEventsRequest implements IImportUserEventsRequest {
+
+ /**
+ * Constructs a new ImportUserEventsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest);
+
+ /** ImportUserEventsRequest inlineSource. */
+ public inlineSource?: (google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null);
+
+ /** ImportUserEventsRequest gcsSource. */
+ public gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null);
+
+ /** ImportUserEventsRequest bigquerySource. */
+ public bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null);
+
+ /** ImportUserEventsRequest parent. */
+ public parent: string;
+
+ /** ImportUserEventsRequest errorConfig. */
+ public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null);
+
+ /** ImportUserEventsRequest source. */
+ public source?: ("inlineSource"|"gcsSource"|"bigquerySource");
+
+ /**
+ * Creates a new ImportUserEventsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImportUserEventsRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest;
+
+ /**
+ * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages.
+ * @param message ImportUserEventsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages.
+ * @param message ImportUserEventsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImportUserEventsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImportUserEventsRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ImportUserEventsRequest;
+
+ /**
+ * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImportUserEventsRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ImportUserEventsRequest;
+
+ /**
+ * Verifies an ImportUserEventsRequest message.
+ * @param message Plain 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 ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImportUserEventsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest;
+
+ /**
+ * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified.
+ * @param message ImportUserEventsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImportUserEventsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImportUserEventsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace ImportUserEventsRequest {
+
+ /** Properties of an InlineSource. */
+ interface IInlineSource {
+
+ /** InlineSource userEvents */
+ userEvents?: (google.cloud.discoveryengine.v1beta.IUserEvent[]|null);
+ }
+
+ /** Represents an InlineSource. */
+ class InlineSource implements IInlineSource {
+
+ /**
+ * Constructs a new InlineSource.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource);
+
+ /** InlineSource userEvents. */
+ public userEvents: google.cloud.discoveryengine.v1beta.IUserEvent[];
+
+ /**
+ * Creates a new InlineSource instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns InlineSource instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource;
+
+ /**
+ * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages.
+ * @param message InlineSource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages.
+ * @param message InlineSource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an InlineSource message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns InlineSource
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource;
+
+ /**
+ * Decodes an InlineSource message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns InlineSource
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource;
+
+ /**
+ * Verifies an InlineSource message.
+ * @param message Plain 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 InlineSource message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns InlineSource
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource;
+
+ /**
+ * Creates a plain object from an InlineSource message. Also converts values to other types if specified.
+ * @param message InlineSource
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this InlineSource to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for InlineSource
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Properties of an ImportUserEventsResponse. */
+ interface IImportUserEventsResponse {
+
+ /** ImportUserEventsResponse errorSamples */
+ errorSamples?: (google.rpc.IStatus[]|null);
+
+ /** ImportUserEventsResponse errorConfig */
+ errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null);
+
+ /** ImportUserEventsResponse joinedEventsCount */
+ joinedEventsCount?: (number|Long|string|null);
+
+ /** ImportUserEventsResponse unjoinedEventsCount */
+ unjoinedEventsCount?: (number|Long|string|null);
+ }
+
+ /** Represents an ImportUserEventsResponse. */
+ class ImportUserEventsResponse implements IImportUserEventsResponse {
+
+ /**
+ * Constructs a new ImportUserEventsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse);
+
+ /** ImportUserEventsResponse errorSamples. */
+ public errorSamples: google.rpc.IStatus[];
+
+ /** ImportUserEventsResponse errorConfig. */
+ public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null);
+
+ /** ImportUserEventsResponse joinedEventsCount. */
+ public joinedEventsCount: (number|Long|string);
+
+ /** ImportUserEventsResponse unjoinedEventsCount. */
+ public unjoinedEventsCount: (number|Long|string);
+
+ /**
+ * Creates a new ImportUserEventsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImportUserEventsResponse instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse): google.cloud.discoveryengine.v1beta.ImportUserEventsResponse;
+
+ /**
+ * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages.
+ * @param message ImportUserEventsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages.
+ * @param message ImportUserEventsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImportUserEventsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImportUserEventsResponse
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ImportUserEventsResponse;
+
+ /**
+ * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImportUserEventsResponse
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ImportUserEventsResponse;
+
+ /**
+ * Verifies an ImportUserEventsResponse message.
+ * @param message Plain 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 ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImportUserEventsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsResponse;
+
+ /**
+ * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified.
+ * @param message ImportUserEventsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImportUserEventsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImportUserEventsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an ImportUserEventsMetadata. */
+ interface IImportUserEventsMetadata {
+
+ /** ImportUserEventsMetadata createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportUserEventsMetadata updateTime */
+ updateTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportUserEventsMetadata successCount */
+ successCount?: (number|Long|string|null);
+
+ /** ImportUserEventsMetadata failureCount */
+ failureCount?: (number|Long|string|null);
+ }
+
+ /** Represents an ImportUserEventsMetadata. */
+ class ImportUserEventsMetadata implements IImportUserEventsMetadata {
+
+ /**
+ * Constructs a new ImportUserEventsMetadata.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata);
+
+ /** ImportUserEventsMetadata createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportUserEventsMetadata updateTime. */
+ public updateTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportUserEventsMetadata successCount. */
+ public successCount: (number|Long|string);
+
+ /** ImportUserEventsMetadata failureCount. */
+ public failureCount: (number|Long|string);
+
+ /**
+ * Creates a new ImportUserEventsMetadata instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImportUserEventsMetadata instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata): google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata;
+
+ /**
+ * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages.
+ * @param message ImportUserEventsMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages.
+ * @param message ImportUserEventsMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImportUserEventsMetadata message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImportUserEventsMetadata
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ImportUserEventsMetadata;
+
+ /**
+ * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImportUserEventsMetadata
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ImportUserEventsMetadata;
+
+ /**
+ * Verifies an ImportUserEventsMetadata message.
+ * @param message Plain 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 ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImportUserEventsMetadata
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata;
+
+ /**
+ * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified.
+ * @param message ImportUserEventsMetadata
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImportUserEventsMetadata to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImportUserEventsMetadata
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an ImportDocumentsMetadata. */
+ interface IImportDocumentsMetadata {
+
+ /** ImportDocumentsMetadata createTime */
+ createTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportDocumentsMetadata updateTime */
+ updateTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportDocumentsMetadata successCount */
+ successCount?: (number|Long|string|null);
+
+ /** ImportDocumentsMetadata failureCount */
+ failureCount?: (number|Long|string|null);
+ }
+
+ /** Represents an ImportDocumentsMetadata. */
+ class ImportDocumentsMetadata implements IImportDocumentsMetadata {
+
+ /**
+ * Constructs a new ImportDocumentsMetadata.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata);
+
+ /** ImportDocumentsMetadata createTime. */
+ public createTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportDocumentsMetadata updateTime. */
+ public updateTime?: (google.protobuf.ITimestamp|null);
+
+ /** ImportDocumentsMetadata successCount. */
+ public successCount: (number|Long|string);
+
+ /** ImportDocumentsMetadata failureCount. */
+ public failureCount: (number|Long|string);
+
+ /**
+ * Creates a new ImportDocumentsMetadata instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImportDocumentsMetadata instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata): google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata;
+
+ /**
+ * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages.
+ * @param message ImportDocumentsMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages.
+ * @param message ImportDocumentsMetadata message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImportDocumentsMetadata message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImportDocumentsMetadata
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ImportDocumentsMetadata;
+
+ /**
+ * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImportDocumentsMetadata
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ImportDocumentsMetadata;
+
+ /**
+ * Verifies an ImportDocumentsMetadata message.
+ * @param message Plain 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 ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImportDocumentsMetadata
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata;
+
+ /**
+ * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified.
+ * @param message ImportDocumentsMetadata
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImportDocumentsMetadata to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImportDocumentsMetadata
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of an ImportDocumentsRequest. */
+ interface IImportDocumentsRequest {
+
+ /** ImportDocumentsRequest inlineSource */
+ inlineSource?: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null);
+
+ /** ImportDocumentsRequest gcsSource */
+ gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null);
+
+ /** ImportDocumentsRequest bigquerySource */
+ bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null);
+
+ /** ImportDocumentsRequest parent */
+ parent?: (string|null);
+
+ /** ImportDocumentsRequest errorConfig */
+ errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null);
+
+ /** ImportDocumentsRequest reconciliationMode */
+ reconciliationMode?: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|null);
+ }
+
+ /** Represents an ImportDocumentsRequest. */
+ class ImportDocumentsRequest implements IImportDocumentsRequest {
+
+ /**
+ * Constructs a new ImportDocumentsRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest);
+
+ /** ImportDocumentsRequest inlineSource. */
+ public inlineSource?: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null);
+
+ /** ImportDocumentsRequest gcsSource. */
+ public gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null);
+
+ /** ImportDocumentsRequest bigquerySource. */
+ public bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null);
+
+ /** ImportDocumentsRequest parent. */
+ public parent: string;
+
+ /** ImportDocumentsRequest errorConfig. */
+ public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null);
+
+ /** ImportDocumentsRequest reconciliationMode. */
+ public reconciliationMode: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode);
+
+ /** ImportDocumentsRequest source. */
+ public source?: ("inlineSource"|"gcsSource"|"bigquerySource");
+
+ /**
+ * Creates a new ImportDocumentsRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImportDocumentsRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest;
+
+ /**
+ * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages.
+ * @param message ImportDocumentsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages.
+ * @param message ImportDocumentsRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImportDocumentsRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImportDocumentsRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ImportDocumentsRequest;
+
+ /**
+ * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImportDocumentsRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ImportDocumentsRequest;
+
+ /**
+ * Verifies an ImportDocumentsRequest message.
+ * @param message Plain 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 ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImportDocumentsRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest;
+
+ /**
+ * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified.
+ * @param message ImportDocumentsRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImportDocumentsRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImportDocumentsRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace ImportDocumentsRequest {
+
+ /** Properties of an InlineSource. */
+ interface IInlineSource {
+
+ /** InlineSource documents */
+ documents?: (google.cloud.discoveryengine.v1beta.IDocument[]|null);
+ }
+
+ /** Represents an InlineSource. */
+ class InlineSource implements IInlineSource {
+
+ /**
+ * Constructs a new InlineSource.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource);
+
+ /** InlineSource documents. */
+ public documents: google.cloud.discoveryengine.v1beta.IDocument[];
+
+ /**
+ * Creates a new InlineSource instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns InlineSource instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource;
+
+ /**
+ * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages.
+ * @param message InlineSource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages.
+ * @param message InlineSource message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an InlineSource message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns InlineSource
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource;
+
+ /**
+ * Decodes an InlineSource message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns InlineSource
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource;
+
+ /**
+ * Verifies an InlineSource message.
+ * @param message Plain 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 InlineSource message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns InlineSource
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource;
+
+ /**
+ * Creates a plain object from an InlineSource message. Also converts values to other types if specified.
+ * @param message InlineSource
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this InlineSource to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for InlineSource
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** ReconciliationMode enum. */
+ enum ReconciliationMode {
+ RECONCILIATION_MODE_UNSPECIFIED = 0,
+ INCREMENTAL = 1,
+ FULL = 2
+ }
+ }
+
+ /** Properties of an ImportDocumentsResponse. */
+ interface IImportDocumentsResponse {
+
+ /** ImportDocumentsResponse errorSamples */
+ errorSamples?: (google.rpc.IStatus[]|null);
+
+ /** ImportDocumentsResponse errorConfig */
+ errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null);
+ }
+
+ /** Represents an ImportDocumentsResponse. */
+ class ImportDocumentsResponse implements IImportDocumentsResponse {
+
+ /**
+ * Constructs a new ImportDocumentsResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse);
+
+ /** ImportDocumentsResponse errorSamples. */
+ public errorSamples: google.rpc.IStatus[];
+
+ /** ImportDocumentsResponse errorConfig. */
+ public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null);
+
+ /**
+ * Creates a new ImportDocumentsResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ImportDocumentsResponse instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse): google.cloud.discoveryengine.v1beta.ImportDocumentsResponse;
+
+ /**
+ * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages.
+ * @param message ImportDocumentsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages.
+ * @param message ImportDocumentsResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes an ImportDocumentsResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ImportDocumentsResponse
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.ImportDocumentsResponse;
+
+ /**
+ * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ImportDocumentsResponse
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.ImportDocumentsResponse;
+
+ /**
+ * Verifies an ImportDocumentsResponse message.
+ * @param message Plain 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 ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ImportDocumentsResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsResponse;
+
+ /**
+ * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified.
+ * @param message ImportDocumentsResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ImportDocumentsResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ImportDocumentsResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a UserEvent. */
+ interface IUserEvent {
+
+ /** UserEvent eventType */
+ eventType?: (string|null);
+
+ /** UserEvent userPseudoId */
+ userPseudoId?: (string|null);
+
+ /** UserEvent eventTime */
+ eventTime?: (google.protobuf.ITimestamp|null);
+
+ /** UserEvent userInfo */
+ userInfo?: (google.cloud.discoveryengine.v1beta.IUserInfo|null);
+
+ /** UserEvent directUserRequest */
+ directUserRequest?: (boolean|null);
+
+ /** UserEvent sessionId */
+ sessionId?: (string|null);
+
+ /** UserEvent pageInfo */
+ pageInfo?: (google.cloud.discoveryengine.v1beta.IPageInfo|null);
+
+ /** UserEvent attributionToken */
+ attributionToken?: (string|null);
+
+ /** UserEvent filter */
+ filter?: (string|null);
+
+ /** UserEvent documents */
+ documents?: (google.cloud.discoveryengine.v1beta.IDocumentInfo[]|null);
+
+ /** UserEvent panel */
+ panel?: (google.cloud.discoveryengine.v1beta.IPanelInfo|null);
+
+ /** UserEvent searchInfo */
+ searchInfo?: (google.cloud.discoveryengine.v1beta.ISearchInfo|null);
+
+ /** UserEvent completionInfo */
+ completionInfo?: (google.cloud.discoveryengine.v1beta.ICompletionInfo|null);
+
+ /** UserEvent transactionInfo */
+ transactionInfo?: (google.cloud.discoveryengine.v1beta.ITransactionInfo|null);
+
+ /** UserEvent tagIds */
+ tagIds?: (string[]|null);
+
+ /** UserEvent promotionIds */
+ promotionIds?: (string[]|null);
+
+ /** UserEvent attributes */
+ attributes?: ({ [k: string]: google.cloud.discoveryengine.v1beta.ICustomAttribute }|null);
+
+ /** UserEvent mediaInfo */
+ mediaInfo?: (google.cloud.discoveryengine.v1beta.IMediaInfo|null);
+ }
+
+ /** Represents a UserEvent. */
+ class UserEvent implements IUserEvent {
+
+ /**
+ * Constructs a new UserEvent.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IUserEvent);
+
+ /** UserEvent eventType. */
+ public eventType: string;
+
+ /** UserEvent userPseudoId. */
+ public userPseudoId: string;
+
+ /** UserEvent eventTime. */
+ public eventTime?: (google.protobuf.ITimestamp|null);
+
+ /** UserEvent userInfo. */
+ public userInfo?: (google.cloud.discoveryengine.v1beta.IUserInfo|null);
+
+ /** UserEvent directUserRequest. */
+ public directUserRequest: boolean;
+
+ /** UserEvent sessionId. */
+ public sessionId: string;
+
+ /** UserEvent pageInfo. */
+ public pageInfo?: (google.cloud.discoveryengine.v1beta.IPageInfo|null);
+
+ /** UserEvent attributionToken. */
+ public attributionToken: string;
+
+ /** UserEvent filter. */
+ public filter: string;
+
+ /** UserEvent documents. */
+ public documents: google.cloud.discoveryengine.v1beta.IDocumentInfo[];
+
+ /** UserEvent panel. */
+ public panel?: (google.cloud.discoveryengine.v1beta.IPanelInfo|null);
+
+ /** UserEvent searchInfo. */
+ public searchInfo?: (google.cloud.discoveryengine.v1beta.ISearchInfo|null);
+
+ /** UserEvent completionInfo. */
+ public completionInfo?: (google.cloud.discoveryengine.v1beta.ICompletionInfo|null);
+
+ /** UserEvent transactionInfo. */
+ public transactionInfo?: (google.cloud.discoveryengine.v1beta.ITransactionInfo|null);
+
+ /** UserEvent tagIds. */
+ public tagIds: string[];
+
+ /** UserEvent promotionIds. */
+ public promotionIds: string[];
+
+ /** UserEvent attributes. */
+ public attributes: { [k: string]: google.cloud.discoveryengine.v1beta.ICustomAttribute };
+
+ /** UserEvent mediaInfo. */
+ public mediaInfo?: (google.cloud.discoveryengine.v1beta.IMediaInfo|null);
+
+ /**
+ * Creates a new UserEvent instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns UserEvent instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IUserEvent): google.cloud.discoveryengine.v1beta.UserEvent;
+
+ /**
+ * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages.
+ * @param message UserEvent message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages.
+ * @param message UserEvent message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a UserEvent message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns UserEvent
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.UserEvent;
+
+ /**
+ * Decodes a UserEvent message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns UserEvent
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.UserEvent;
+
+ /**
+ * Verifies a UserEvent message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a UserEvent message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns UserEvent
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.UserEvent;
+
+ /**
+ * Creates a plain object from a UserEvent message. Also converts values to other types if specified.
+ * @param message UserEvent
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.UserEvent, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this UserEvent to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for UserEvent
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a PageInfo. */
+ interface IPageInfo {
+
+ /** PageInfo pageviewId */
+ pageviewId?: (string|null);
+
+ /** PageInfo pageCategory */
+ pageCategory?: (string|null);
+
+ /** PageInfo uri */
+ uri?: (string|null);
+
+ /** PageInfo referrerUri */
+ referrerUri?: (string|null);
+ }
+
+ /** Represents a PageInfo. */
+ class PageInfo implements IPageInfo {
+
+ /**
+ * Constructs a new PageInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IPageInfo);
+
+ /** PageInfo pageviewId. */
+ public pageviewId: string;
+
+ /** PageInfo pageCategory. */
+ public pageCategory: string;
+
+ /** PageInfo uri. */
+ public uri: string;
+
+ /** PageInfo referrerUri. */
+ public referrerUri: string;
+
+ /**
+ * Creates a new PageInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PageInfo instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IPageInfo): google.cloud.discoveryengine.v1beta.PageInfo;
+
+ /**
+ * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages.
+ * @param message PageInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages.
+ * @param message PageInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PageInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PageInfo
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.PageInfo;
+
+ /**
+ * Decodes a PageInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PageInfo
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.PageInfo;
+
+ /**
+ * Verifies a PageInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PageInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PageInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.PageInfo;
+
+ /**
+ * Creates a plain object from a PageInfo message. Also converts values to other types if specified.
+ * @param message PageInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PageInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PageInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a SearchInfo. */
+ interface ISearchInfo {
+
+ /** SearchInfo searchQuery */
+ searchQuery?: (string|null);
+
+ /** SearchInfo orderBy */
+ orderBy?: (string|null);
+
+ /** SearchInfo offset */
+ offset?: (number|null);
+ }
+
+ /** Represents a SearchInfo. */
+ class SearchInfo implements ISearchInfo {
+
+ /**
+ * Constructs a new SearchInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.ISearchInfo);
+
+ /** SearchInfo searchQuery. */
+ public searchQuery: string;
+
+ /** SearchInfo orderBy. */
+ public orderBy: string;
+
+ /** SearchInfo offset. */
+ public offset?: (number|null);
+
+ /** SearchInfo _offset. */
+ public _offset?: "offset";
+
+ /**
+ * Creates a new SearchInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns SearchInfo instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.ISearchInfo): google.cloud.discoveryengine.v1beta.SearchInfo;
+
+ /**
+ * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages.
+ * @param message SearchInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages.
+ * @param message SearchInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a SearchInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns SearchInfo
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.SearchInfo;
+
+ /**
+ * Decodes a SearchInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns SearchInfo
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.SearchInfo;
+
+ /**
+ * Verifies a SearchInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns SearchInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchInfo;
+
+ /**
+ * Creates a plain object from a SearchInfo message. Also converts values to other types if specified.
+ * @param message SearchInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.SearchInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this SearchInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for SearchInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CompletionInfo. */
+ interface ICompletionInfo {
+
+ /** CompletionInfo selectedSuggestion */
+ selectedSuggestion?: (string|null);
+
+ /** CompletionInfo selectedPosition */
+ selectedPosition?: (number|null);
+ }
+
+ /** Represents a CompletionInfo. */
+ class CompletionInfo implements ICompletionInfo {
+
+ /**
+ * Constructs a new CompletionInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.ICompletionInfo);
+
+ /** CompletionInfo selectedSuggestion. */
+ public selectedSuggestion: string;
+
+ /** CompletionInfo selectedPosition. */
+ public selectedPosition: number;
+
+ /**
+ * Creates a new CompletionInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CompletionInfo instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.ICompletionInfo): google.cloud.discoveryengine.v1beta.CompletionInfo;
+
+ /**
+ * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages.
+ * @param message CompletionInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages.
+ * @param message CompletionInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CompletionInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CompletionInfo
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.CompletionInfo;
+
+ /**
+ * Decodes a CompletionInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CompletionInfo
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.CompletionInfo;
+
+ /**
+ * Verifies a CompletionInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CompletionInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CompletionInfo;
+
+ /**
+ * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified.
+ * @param message CompletionInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.CompletionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CompletionInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CompletionInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a TransactionInfo. */
+ interface ITransactionInfo {
+
+ /** TransactionInfo value */
+ value?: (number|null);
+
+ /** TransactionInfo currency */
+ currency?: (string|null);
+
+ /** TransactionInfo transactionId */
+ transactionId?: (string|null);
+
+ /** TransactionInfo tax */
+ tax?: (number|null);
+
+ /** TransactionInfo cost */
+ cost?: (number|null);
+
+ /** TransactionInfo discountValue */
+ discountValue?: (number|null);
+ }
+
+ /** Represents a TransactionInfo. */
+ class TransactionInfo implements ITransactionInfo {
+
+ /**
+ * Constructs a new TransactionInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.ITransactionInfo);
+
+ /** TransactionInfo value. */
+ public value?: (number|null);
+
+ /** TransactionInfo currency. */
+ public currency: string;
+
+ /** TransactionInfo transactionId. */
+ public transactionId: string;
+
+ /** TransactionInfo tax. */
+ public tax?: (number|null);
+
+ /** TransactionInfo cost. */
+ public cost?: (number|null);
+
+ /** TransactionInfo discountValue. */
+ public discountValue?: (number|null);
+
+ /** TransactionInfo _value. */
+ public _value?: "value";
+
+ /** TransactionInfo _tax. */
+ public _tax?: "tax";
+
+ /** TransactionInfo _cost. */
+ public _cost?: "cost";
+
+ /** TransactionInfo _discountValue. */
+ public _discountValue?: "discountValue";
+
+ /**
+ * Creates a new TransactionInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns TransactionInfo instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.ITransactionInfo): google.cloud.discoveryengine.v1beta.TransactionInfo;
+
+ /**
+ * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages.
+ * @param message TransactionInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages.
+ * @param message TransactionInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a TransactionInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns TransactionInfo
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.TransactionInfo;
+
+ /**
+ * Decodes a TransactionInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns TransactionInfo
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.TransactionInfo;
+
+ /**
+ * Verifies a TransactionInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns TransactionInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.TransactionInfo;
+
+ /**
+ * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified.
+ * @param message TransactionInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.TransactionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this TransactionInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for TransactionInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a DocumentInfo. */
+ interface IDocumentInfo {
+
+ /** DocumentInfo id */
+ id?: (string|null);
+
+ /** DocumentInfo name */
+ name?: (string|null);
+
+ /** DocumentInfo quantity */
+ quantity?: (number|null);
+
+ /** DocumentInfo promotionIds */
+ promotionIds?: (string[]|null);
+ }
+
+ /** Represents a DocumentInfo. */
+ class DocumentInfo implements IDocumentInfo {
+
+ /**
+ * Constructs a new DocumentInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IDocumentInfo);
+
+ /** DocumentInfo id. */
+ public id?: (string|null);
+
+ /** DocumentInfo name. */
+ public name?: (string|null);
+
+ /** DocumentInfo quantity. */
+ public quantity?: (number|null);
+
+ /** DocumentInfo promotionIds. */
+ public promotionIds: string[];
+
+ /** DocumentInfo documentDescriptor. */
+ public documentDescriptor?: ("id"|"name");
+
+ /** DocumentInfo _quantity. */
+ public _quantity?: "quantity";
+
+ /**
+ * Creates a new DocumentInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns DocumentInfo instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IDocumentInfo): google.cloud.discoveryengine.v1beta.DocumentInfo;
+
+ /**
+ * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages.
+ * @param message DocumentInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages.
+ * @param message DocumentInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a DocumentInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns DocumentInfo
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.DocumentInfo;
+
+ /**
+ * Decodes a DocumentInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns DocumentInfo
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.DocumentInfo;
+
+ /**
+ * Verifies a DocumentInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns DocumentInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.DocumentInfo;
+
+ /**
+ * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified.
+ * @param message DocumentInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.DocumentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this DocumentInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for DocumentInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a PanelInfo. */
+ interface IPanelInfo {
+
+ /** PanelInfo panelId */
+ panelId?: (string|null);
+
+ /** PanelInfo displayName */
+ displayName?: (string|null);
+
+ /** PanelInfo panelPosition */
+ panelPosition?: (number|null);
+
+ /** PanelInfo totalPanels */
+ totalPanels?: (number|null);
+ }
+
+ /** Represents a PanelInfo. */
+ class PanelInfo implements IPanelInfo {
+
+ /**
+ * Constructs a new PanelInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IPanelInfo);
+
+ /** PanelInfo panelId. */
+ public panelId: string;
+
+ /** PanelInfo displayName. */
+ public displayName: string;
+
+ /** PanelInfo panelPosition. */
+ public panelPosition?: (number|null);
+
+ /** PanelInfo totalPanels. */
+ public totalPanels?: (number|null);
+
+ /** PanelInfo _panelPosition. */
+ public _panelPosition?: "panelPosition";
+
+ /** PanelInfo _totalPanels. */
+ public _totalPanels?: "totalPanels";
+
+ /**
+ * Creates a new PanelInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns PanelInfo instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IPanelInfo): google.cloud.discoveryengine.v1beta.PanelInfo;
+
+ /**
+ * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages.
+ * @param message PanelInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages.
+ * @param message PanelInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a PanelInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns PanelInfo
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.PanelInfo;
+
+ /**
+ * Decodes a PanelInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns PanelInfo
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.PanelInfo;
+
+ /**
+ * Verifies a PanelInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns PanelInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.PanelInfo;
+
+ /**
+ * Creates a plain object from a PanelInfo message. Also converts values to other types if specified.
+ * @param message PanelInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.PanelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this PanelInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for PanelInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a MediaInfo. */
+ interface IMediaInfo {
+
+ /** MediaInfo mediaProgressDuration */
+ mediaProgressDuration?: (google.protobuf.IDuration|null);
+
+ /** MediaInfo mediaProgressPercentage */
+ mediaProgressPercentage?: (number|null);
+ }
+
+ /** Represents a MediaInfo. */
+ class MediaInfo implements IMediaInfo {
+
+ /**
+ * Constructs a new MediaInfo.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IMediaInfo);
+
+ /** MediaInfo mediaProgressDuration. */
+ public mediaProgressDuration?: (google.protobuf.IDuration|null);
+
+ /** MediaInfo mediaProgressPercentage. */
+ public mediaProgressPercentage?: (number|null);
+
+ /** MediaInfo _mediaProgressPercentage. */
+ public _mediaProgressPercentage?: "mediaProgressPercentage";
+
+ /**
+ * Creates a new MediaInfo instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns MediaInfo instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IMediaInfo): google.cloud.discoveryengine.v1beta.MediaInfo;
+
+ /**
+ * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages.
+ * @param message MediaInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages.
+ * @param message MediaInfo message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a MediaInfo message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns MediaInfo
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.MediaInfo;
+
+ /**
+ * Decodes a MediaInfo message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns MediaInfo
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.MediaInfo;
+
+ /**
+ * Verifies a MediaInfo message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns MediaInfo
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.MediaInfo;
+
+ /**
+ * Creates a plain object from a MediaInfo message. Also converts values to other types if specified.
+ * @param message MediaInfo
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.MediaInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this MediaInfo to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for MediaInfo
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Represents a RecommendationService */
+ class RecommendationService extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new RecommendationService 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 RecommendationService 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): RecommendationService;
+
+ /**
+ * Calls Recommend.
+ * @param request RecommendRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and RecommendResponse
+ */
+ public recommend(request: google.cloud.discoveryengine.v1beta.IRecommendRequest, callback: google.cloud.discoveryengine.v1beta.RecommendationService.RecommendCallback): void;
+
+ /**
+ * Calls Recommend.
+ * @param request RecommendRequest message or plain object
+ * @returns Promise
+ */
+ public recommend(request: google.cloud.discoveryengine.v1beta.IRecommendRequest): Promise;
+ }
+
+ namespace RecommendationService {
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.RecommendationService|recommend}.
+ * @param error Error, if any
+ * @param [response] RecommendResponse
+ */
+ type RecommendCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.RecommendResponse) => void;
+ }
+
+ /** Properties of a RecommendRequest. */
+ interface IRecommendRequest {
+
+ /** RecommendRequest servingConfig */
+ servingConfig?: (string|null);
+
+ /** RecommendRequest userEvent */
+ userEvent?: (google.cloud.discoveryengine.v1beta.IUserEvent|null);
+
+ /** RecommendRequest pageSize */
+ pageSize?: (number|null);
+
+ /** RecommendRequest filter */
+ filter?: (string|null);
+
+ /** RecommendRequest validateOnly */
+ validateOnly?: (boolean|null);
+
+ /** RecommendRequest params */
+ params?: ({ [k: string]: google.protobuf.IValue }|null);
+ }
+
+ /** Represents a RecommendRequest. */
+ class RecommendRequest implements IRecommendRequest {
+
+ /**
+ * Constructs a new RecommendRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IRecommendRequest);
+
+ /** RecommendRequest servingConfig. */
+ public servingConfig: string;
+
+ /** RecommendRequest userEvent. */
+ public userEvent?: (google.cloud.discoveryengine.v1beta.IUserEvent|null);
+
+ /** RecommendRequest pageSize. */
+ public pageSize: number;
+
+ /** RecommendRequest filter. */
+ public filter: string;
+
+ /** RecommendRequest validateOnly. */
+ public validateOnly: boolean;
+
+ /** RecommendRequest params. */
+ public params: { [k: string]: google.protobuf.IValue };
+
+ /**
+ * Creates a new RecommendRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RecommendRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IRecommendRequest): google.cloud.discoveryengine.v1beta.RecommendRequest;
+
+ /**
+ * Encodes the specified RecommendRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages.
+ * @param message RecommendRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IRecommendRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RecommendRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages.
+ * @param message RecommendRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IRecommendRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RecommendRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RecommendRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.RecommendRequest;
+
+ /**
+ * Decodes a RecommendRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RecommendRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.RecommendRequest;
+
+ /**
+ * Verifies a RecommendRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RecommendRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RecommendRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.RecommendRequest;
+
+ /**
+ * Creates a plain object from a RecommendRequest message. Also converts values to other types if specified.
+ * @param message RecommendRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.RecommendRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RecommendRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RecommendRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a RecommendResponse. */
+ interface IRecommendResponse {
+
+ /** RecommendResponse results */
+ results?: (google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult[]|null);
+
+ /** RecommendResponse attributionToken */
+ attributionToken?: (string|null);
+
+ /** RecommendResponse missingIds */
+ missingIds?: (string[]|null);
+
+ /** RecommendResponse validateOnly */
+ validateOnly?: (boolean|null);
+ }
+
+ /** Represents a RecommendResponse. */
+ class RecommendResponse implements IRecommendResponse {
+
+ /**
+ * Constructs a new RecommendResponse.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IRecommendResponse);
+
+ /** RecommendResponse results. */
+ public results: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult[];
+
+ /** RecommendResponse attributionToken. */
+ public attributionToken: string;
+
+ /** RecommendResponse missingIds. */
+ public missingIds: string[];
+
+ /** RecommendResponse validateOnly. */
+ public validateOnly: boolean;
+
+ /**
+ * Creates a new RecommendResponse instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RecommendResponse instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IRecommendResponse): google.cloud.discoveryengine.v1beta.RecommendResponse;
+
+ /**
+ * Encodes the specified RecommendResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages.
+ * @param message RecommendResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IRecommendResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RecommendResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages.
+ * @param message RecommendResponse message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IRecommendResponse, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RecommendResponse message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RecommendResponse
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.RecommendResponse;
+
+ /**
+ * Decodes a RecommendResponse message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RecommendResponse
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.RecommendResponse;
+
+ /**
+ * Verifies a RecommendResponse message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RecommendResponse message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RecommendResponse
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.RecommendResponse;
+
+ /**
+ * Creates a plain object from a RecommendResponse message. Also converts values to other types if specified.
+ * @param message RecommendResponse
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.RecommendResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RecommendResponse to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RecommendResponse
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ namespace RecommendResponse {
+
+ /** Properties of a RecommendationResult. */
+ interface IRecommendationResult {
+
+ /** RecommendationResult id */
+ id?: (string|null);
+
+ /** RecommendationResult document */
+ document?: (google.cloud.discoveryengine.v1beta.IDocument|null);
+
+ /** RecommendationResult metadata */
+ metadata?: ({ [k: string]: google.protobuf.IValue }|null);
+ }
+
+ /** Represents a RecommendationResult. */
+ class RecommendationResult implements IRecommendationResult {
+
+ /**
+ * Constructs a new RecommendationResult.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult);
+
+ /** RecommendationResult id. */
+ public id: string;
+
+ /** RecommendationResult document. */
+ public document?: (google.cloud.discoveryengine.v1beta.IDocument|null);
+
+ /** RecommendationResult metadata. */
+ public metadata: { [k: string]: google.protobuf.IValue };
+
+ /**
+ * Creates a new RecommendationResult instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns RecommendationResult instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult): google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult;
+
+ /**
+ * Encodes the specified RecommendationResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages.
+ * @param message RecommendationResult message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified RecommendationResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages.
+ * @param message RecommendationResult message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a RecommendationResult message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns RecommendationResult
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.RecommendResponse.RecommendationResult;
+
+ /**
+ * Decodes a RecommendationResult message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns RecommendationResult
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.RecommendResponse.RecommendationResult;
+
+ /**
+ * Verifies a RecommendationResult message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a RecommendationResult message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns RecommendationResult
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult;
+
+ /**
+ * Creates a plain object from a RecommendationResult message. Also converts values to other types if specified.
+ * @param message RecommendationResult
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this RecommendationResult to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for RecommendationResult
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Represents a UserEventService */
+ class UserEventService extends $protobuf.rpc.Service {
+
+ /**
+ * Constructs a new UserEventService 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 UserEventService 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): UserEventService;
+
+ /**
+ * Calls WriteUserEvent.
+ * @param request WriteUserEventRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and UserEvent
+ */
+ public writeUserEvent(request: google.cloud.discoveryengine.v1beta.IWriteUserEventRequest, callback: google.cloud.discoveryengine.v1beta.UserEventService.WriteUserEventCallback): void;
+
+ /**
+ * Calls WriteUserEvent.
+ * @param request WriteUserEventRequest message or plain object
+ * @returns Promise
+ */
+ public writeUserEvent(request: google.cloud.discoveryengine.v1beta.IWriteUserEventRequest): Promise;
+
+ /**
+ * Calls CollectUserEvent.
+ * @param request CollectUserEventRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and HttpBody
+ */
+ public collectUserEvent(request: google.cloud.discoveryengine.v1beta.ICollectUserEventRequest, callback: google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEventCallback): void;
+
+ /**
+ * Calls CollectUserEvent.
+ * @param request CollectUserEventRequest message or plain object
+ * @returns Promise
+ */
+ public collectUserEvent(request: google.cloud.discoveryengine.v1beta.ICollectUserEventRequest): Promise;
+
+ /**
+ * Calls ImportUserEvents.
+ * @param request ImportUserEventsRequest message or plain object
+ * @param callback Node-style callback called with the error, if any, and Operation
+ */
+ public importUserEvents(request: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest, callback: google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEventsCallback): void;
+
+ /**
+ * Calls ImportUserEvents.
+ * @param request ImportUserEventsRequest message or plain object
+ * @returns Promise
+ */
+ public importUserEvents(request: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest): Promise;
+ }
+
+ namespace UserEventService {
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.UserEventService|writeUserEvent}.
+ * @param error Error, if any
+ * @param [response] UserEvent
+ */
+ type WriteUserEventCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.UserEvent) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.UserEventService|collectUserEvent}.
+ * @param error Error, if any
+ * @param [response] HttpBody
+ */
+ type CollectUserEventCallback = (error: (Error|null), response?: google.api.HttpBody) => void;
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.UserEventService|importUserEvents}.
+ * @param error Error, if any
+ * @param [response] Operation
+ */
+ type ImportUserEventsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void;
+ }
+
+ /** Properties of a WriteUserEventRequest. */
+ interface IWriteUserEventRequest {
+
+ /** WriteUserEventRequest parent */
+ parent?: (string|null);
+
+ /** WriteUserEventRequest userEvent */
+ userEvent?: (google.cloud.discoveryengine.v1beta.IUserEvent|null);
+ }
+
+ /** Represents a WriteUserEventRequest. */
+ class WriteUserEventRequest implements IWriteUserEventRequest {
+
+ /**
+ * Constructs a new WriteUserEventRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.IWriteUserEventRequest);
+
+ /** WriteUserEventRequest parent. */
+ public parent: string;
+
+ /** WriteUserEventRequest userEvent. */
+ public userEvent?: (google.cloud.discoveryengine.v1beta.IUserEvent|null);
+
+ /** WriteUserEventRequest _userEvent. */
+ public _userEvent?: "userEvent";
+
+ /**
+ * Creates a new WriteUserEventRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns WriteUserEventRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.IWriteUserEventRequest): google.cloud.discoveryengine.v1beta.WriteUserEventRequest;
+
+ /**
+ * Encodes the specified WriteUserEventRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.WriteUserEventRequest.verify|verify} messages.
+ * @param message WriteUserEventRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.IWriteUserEventRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified WriteUserEventRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.WriteUserEventRequest.verify|verify} messages.
+ * @param message WriteUserEventRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IWriteUserEventRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a WriteUserEventRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns WriteUserEventRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.WriteUserEventRequest;
+
+ /**
+ * Decodes a WriteUserEventRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns WriteUserEventRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.WriteUserEventRequest;
+
+ /**
+ * Verifies a WriteUserEventRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a WriteUserEventRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns WriteUserEventRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.WriteUserEventRequest;
+
+ /**
+ * Creates a plain object from a WriteUserEventRequest message. Also converts values to other types if specified.
+ * @param message WriteUserEventRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.WriteUserEventRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this WriteUserEventRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for WriteUserEventRequest
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CollectUserEventRequest. */
+ interface ICollectUserEventRequest {
+
+ /** CollectUserEventRequest parent */
+ parent?: (string|null);
+
+ /** CollectUserEventRequest userEvent */
+ userEvent?: (string|null);
+
+ /** CollectUserEventRequest uri */
+ uri?: (string|null);
+
+ /** CollectUserEventRequest ets */
+ ets?: (number|Long|string|null);
+ }
+
+ /** Represents a CollectUserEventRequest. */
+ class CollectUserEventRequest implements ICollectUserEventRequest {
+
+ /**
+ * Constructs a new CollectUserEventRequest.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.cloud.discoveryengine.v1beta.ICollectUserEventRequest);
+
+ /** CollectUserEventRequest parent. */
+ public parent: string;
+
+ /** CollectUserEventRequest userEvent. */
+ public userEvent: string;
+
+ /** CollectUserEventRequest uri. */
+ public uri?: (string|null);
+
+ /** CollectUserEventRequest ets. */
+ public ets?: (number|Long|string|null);
+
+ /** CollectUserEventRequest _uri. */
+ public _uri?: "uri";
+
+ /** CollectUserEventRequest _ets. */
+ public _ets?: "ets";
+
+ /**
+ * Creates a new CollectUserEventRequest instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CollectUserEventRequest instance
+ */
+ public static create(properties?: google.cloud.discoveryengine.v1beta.ICollectUserEventRequest): google.cloud.discoveryengine.v1beta.CollectUserEventRequest;
+
+ /**
+ * Encodes the specified CollectUserEventRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CollectUserEventRequest.verify|verify} messages.
+ * @param message CollectUserEventRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.cloud.discoveryengine.v1beta.ICollectUserEventRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CollectUserEventRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CollectUserEventRequest.verify|verify} messages.
+ * @param message CollectUserEventRequest message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICollectUserEventRequest, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CollectUserEventRequest message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CollectUserEventRequest
+ * @throws {Error} If the payload is not 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.discoveryengine.v1beta.CollectUserEventRequest;
+
+ /**
+ * Decodes a CollectUserEventRequest message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CollectUserEventRequest
+ * @throws {Error} If the payload 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.discoveryengine.v1beta.CollectUserEventRequest;
+
+ /**
+ * Verifies a CollectUserEventRequest message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CollectUserEventRequest message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CollectUserEventRequest
+ */
+ public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CollectUserEventRequest;
+
+ /**
+ * Creates a plain object from a CollectUserEventRequest message. Also converts values to other types if specified.
+ * @param message CollectUserEventRequest
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.cloud.discoveryengine.v1beta.CollectUserEventRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CollectUserEventRequest to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CollectUserEventRequest
+ * @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 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;
+ }
+
+ /** 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 Http. */
+ interface IHttp {
+
+ /** Http rules */
+ rules?: (google.api.IHttpRule[]|null);
+
+ /** Http fullyDecodeReservedExpansion */
+ fullyDecodeReservedExpansion?: (boolean|null);
+ }
+
+ /** Represents a Http. */
+ class Http implements IHttp {
+
+ /**
+ * Constructs a new Http.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IHttp);
+
+ /** Http rules. */
+ public rules: google.api.IHttpRule[];
+
+ /** Http fullyDecodeReservedExpansion. */
+ public fullyDecodeReservedExpansion: boolean;
+
+ /**
+ * Creates a new Http instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Http instance
+ */
+ public static create(properties?: google.api.IHttp): google.api.Http;
+
+ /**
+ * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @param message Http message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
+ * @param message Http message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Http message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http;
+
+ /**
+ * Decodes a Http message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Http
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http;
+
+ /**
+ * Verifies a Http message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Http message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Http
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.Http;
+
+ /**
+ * Creates a plain object from a Http message. Also converts values to other types if specified.
+ * @param message Http
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Http to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Http
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a HttpRule. */
+ interface IHttpRule {
+
+ /** HttpRule selector */
+ selector?: (string|null);
+
+ /** HttpRule get */
+ get?: (string|null);
+
+ /** HttpRule put */
+ put?: (string|null);
+
+ /** HttpRule post */
+ post?: (string|null);
+
+ /** HttpRule delete */
+ "delete"?: (string|null);
+
+ /** HttpRule patch */
+ patch?: (string|null);
+
+ /** HttpRule custom */
+ custom?: (google.api.ICustomHttpPattern|null);
+
+ /** HttpRule body */
+ body?: (string|null);
+
+ /** HttpRule responseBody */
+ responseBody?: (string|null);
+
+ /** HttpRule additionalBindings */
+ additionalBindings?: (google.api.IHttpRule[]|null);
+ }
+
+ /** Represents a HttpRule. */
+ class HttpRule implements IHttpRule {
+
+ /**
+ * Constructs a new HttpRule.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IHttpRule);
+
+ /** HttpRule selector. */
+ public selector: string;
+
+ /** HttpRule get. */
+ public get?: (string|null);
+
+ /** HttpRule put. */
+ public put?: (string|null);
+
+ /** HttpRule post. */
+ public post?: (string|null);
+
+ /** HttpRule delete. */
+ public delete?: (string|null);
+
+ /** HttpRule patch. */
+ public patch?: (string|null);
+
+ /** HttpRule custom. */
+ public custom?: (google.api.ICustomHttpPattern|null);
+
+ /** HttpRule body. */
+ public body: string;
+
+ /** HttpRule responseBody. */
+ public responseBody: string;
+
+ /** HttpRule additionalBindings. */
+ public additionalBindings: google.api.IHttpRule[];
+
+ /** HttpRule pattern. */
+ public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom");
+
+ /**
+ * Creates a new HttpRule instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns HttpRule instance
+ */
+ public static create(properties?: google.api.IHttpRule): google.api.HttpRule;
+
+ /**
+ * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @param message HttpRule message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
+ * @param message HttpRule message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule;
+
+ /**
+ * Decodes a HttpRule message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns HttpRule
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule;
+
+ /**
+ * Verifies a HttpRule message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns HttpRule
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.HttpRule;
+
+ /**
+ * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
+ * @param message HttpRule
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this HttpRule to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for HttpRule
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a CustomHttpPattern. */
+ interface ICustomHttpPattern {
+
+ /** CustomHttpPattern kind */
+ kind?: (string|null);
+
+ /** CustomHttpPattern path */
+ path?: (string|null);
+ }
+
+ /** Represents a CustomHttpPattern. */
+ class CustomHttpPattern implements ICustomHttpPattern {
+
+ /**
+ * Constructs a new CustomHttpPattern.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.ICustomHttpPattern);
+
+ /** CustomHttpPattern kind. */
+ public kind: string;
+
+ /** CustomHttpPattern path. */
+ public path: string;
+
+ /**
+ * Creates a new CustomHttpPattern instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns CustomHttpPattern instance
+ */
+ public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern;
+
+ /**
+ * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @param message CustomHttpPattern message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
+ * @param message CustomHttpPattern message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern;
+
+ /**
+ * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns CustomHttpPattern
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern;
+
+ /**
+ * Verifies a CustomHttpPattern message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns CustomHttpPattern
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern;
+
+ /**
+ * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
+ * @param message CustomHttpPattern
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this CustomHttpPattern to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for CustomHttpPattern
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a HttpBody. */
+ interface IHttpBody {
+
+ /** HttpBody contentType */
+ contentType?: (string|null);
+
+ /** HttpBody data */
+ data?: (Uint8Array|string|null);
+
+ /** HttpBody extensions */
+ extensions?: (google.protobuf.IAny[]|null);
+ }
+
+ /** Represents a HttpBody. */
+ class HttpBody implements IHttpBody {
+
+ /**
+ * Constructs a new HttpBody.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.api.IHttpBody);
+
+ /** HttpBody contentType. */
+ public contentType: string;
+
+ /** HttpBody data. */
+ public data: (Uint8Array|string);
+
+ /** HttpBody extensions. */
+ public extensions: google.protobuf.IAny[];
+
+ /**
+ * Creates a new HttpBody instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns HttpBody instance
+ */
+ public static create(properties?: google.api.IHttpBody): google.api.HttpBody;
+
+ /**
+ * Encodes the specified HttpBody message. Does not implicitly {@link google.api.HttpBody.verify|verify} messages.
+ * @param message HttpBody message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.api.IHttpBody, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified HttpBody message, length delimited. Does not implicitly {@link google.api.HttpBody.verify|verify} messages.
+ * @param message HttpBody message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.api.IHttpBody, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a HttpBody message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns HttpBody
+ * @throws {Error} If the payload is not 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.HttpBody;
+
+ /**
+ * Decodes a HttpBody message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns HttpBody
+ * @throws {Error} If the payload 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.HttpBody;
+
+ /**
+ * Verifies a HttpBody message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a HttpBody message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns HttpBody
+ */
+ public static fromObject(object: { [k: string]: any }): google.api.HttpBody;
+
+ /**
+ * Creates a plain object from a HttpBody message. Also converts values to other types if specified.
+ * @param message HttpBody
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.api.HttpBody, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this HttpBody to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for HttpBody
+ * @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.resourceReference */
+ ".google.api.resourceReference"?: (google.api.IResourceReference|null);
+
+ /** FieldOptions .google.api.fieldBehavior */
+ ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|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 Struct. */
+ interface IStruct {
+
+ /** Struct fields */
+ fields?: ({ [k: string]: google.protobuf.IValue }|null);
+ }
+
+ /** Represents a Struct. */
+ class Struct implements IStruct {
+
+ /**
+ * Constructs a new Struct.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IStruct);
+
+ /** Struct fields. */
+ public fields: { [k: string]: google.protobuf.IValue };
+
+ /**
+ * Creates a new Struct instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Struct instance
+ */
+ public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct;
+
+ /**
+ * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages.
+ * @param message Struct message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages.
+ * @param message Struct message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Struct message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Struct
+ * @throws {Error} If the payload is not 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.Struct;
+
+ /**
+ * Decodes a Struct message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Struct
+ * @throws {Error} If the payload 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.Struct;
+
+ /**
+ * Verifies a Struct message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Struct message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Struct
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.Struct;
+
+ /**
+ * Creates a plain object from a Struct message. Also converts values to other types if specified.
+ * @param message Struct
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Struct to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Struct
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** Properties of a Value. */
+ interface IValue {
+
+ /** Value nullValue */
+ nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null);
+
+ /** Value numberValue */
+ numberValue?: (number|null);
+
+ /** Value stringValue */
+ stringValue?: (string|null);
+
+ /** Value boolValue */
+ boolValue?: (boolean|null);
+
+ /** Value structValue */
+ structValue?: (google.protobuf.IStruct|null);
+
+ /** Value listValue */
+ listValue?: (google.protobuf.IListValue|null);
+ }
+
+ /** Represents a Value. */
+ class Value implements IValue {
+
+ /**
+ * Constructs a new Value.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IValue);
+
+ /** Value nullValue. */
+ public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null);
+
+ /** Value numberValue. */
+ public numberValue?: (number|null);
+
+ /** Value stringValue. */
+ public stringValue?: (string|null);
+
+ /** Value boolValue. */
+ public boolValue?: (boolean|null);
+
+ /** Value structValue. */
+ public structValue?: (google.protobuf.IStruct|null);
+
+ /** Value listValue. */
+ public listValue?: (google.protobuf.IListValue|null);
+
+ /** Value kind. */
+ public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue");
+
+ /**
+ * Creates a new Value instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Value instance
+ */
+ public static create(properties?: google.protobuf.IValue): google.protobuf.Value;
+
+ /**
+ * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages.
+ * @param message Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages.
+ * @param message Value message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Value message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Value
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value;
+
+ /**
+ * Decodes a Value message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Value
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value;
+
+ /**
+ * Verifies a Value message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Value message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Value
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.Value;
+
+ /**
+ * Creates a plain object from a Value message. Also converts values to other types if specified.
+ * @param message Value
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Value to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Value
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** NullValue enum. */
+ enum NullValue {
+ NULL_VALUE = 0
+ }
+
+ /** Properties of a ListValue. */
+ interface IListValue {
+
+ /** ListValue values */
+ values?: (google.protobuf.IValue[]|null);
+ }
+
+ /** Represents a ListValue. */
+ class ListValue implements IListValue {
+
+ /**
+ * Constructs a new ListValue.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.protobuf.IListValue);
+
+ /** ListValue values. */
+ public values: google.protobuf.IValue[];
+
+ /**
+ * Creates a new ListValue instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns ListValue instance
+ */
+ public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue;
+
+ /**
+ * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages.
+ * @param message ListValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages.
+ * @param message ListValue message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a ListValue message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns ListValue
+ * @throws {Error} If the payload is not 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.ListValue;
+
+ /**
+ * Decodes a ListValue message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns ListValue
+ * @throws {Error} If the payload 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.ListValue;
+
+ /**
+ * Verifies a ListValue message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a ListValue message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns ListValue
+ */
+ public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue;
+
+ /**
+ * Creates a plain object from a ListValue message. Also converts values to other types if specified.
+ * @param message ListValue
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this ListValue to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for ListValue
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+
+ /** 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;
+ }
+ }
+
+ /** Namespace rpc. */
+ namespace rpc {
+
+ /** Properties of a Status. */
+ interface IStatus {
+
+ /** Status code */
+ code?: (number|null);
+
+ /** Status message */
+ message?: (string|null);
+
+ /** Status details */
+ details?: (google.protobuf.IAny[]|null);
+ }
+
+ /** Represents a Status. */
+ class Status implements IStatus {
+
+ /**
+ * Constructs a new Status.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.rpc.IStatus);
+
+ /** Status code. */
+ public code: number;
+
+ /** Status message. */
+ public message: string;
+
+ /** Status details. */
+ public details: google.protobuf.IAny[];
+
+ /**
+ * Creates a new Status instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Status instance
+ */
+ public static create(properties?: google.rpc.IStatus): google.rpc.Status;
+
+ /**
+ * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
+ * @param message Status message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
+ * @param message Status message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Status message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Status
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status;
+
+ /**
+ * Decodes a Status message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Status
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status;
+
+ /**
+ * Verifies a Status message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Status message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Status
+ */
+ public static fromObject(object: { [k: string]: any }): google.rpc.Status;
+
+ /**
+ * Creates a plain object from a Status message. Also converts values to other types if specified.
+ * @param message Status
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Status to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Status
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** Namespace type. */
+ namespace type {
+
+ /** Properties of a Date. */
+ interface IDate {
+
+ /** Date year */
+ year?: (number|null);
+
+ /** Date month */
+ month?: (number|null);
+
+ /** Date day */
+ day?: (number|null);
+ }
+
+ /** Represents a Date. */
+ class Date implements IDate {
+
+ /**
+ * Constructs a new Date.
+ * @param [properties] Properties to set
+ */
+ constructor(properties?: google.type.IDate);
+
+ /** Date year. */
+ public year: number;
+
+ /** Date month. */
+ public month: number;
+
+ /** Date day. */
+ public day: number;
+
+ /**
+ * Creates a new Date instance using the specified properties.
+ * @param [properties] Properties to set
+ * @returns Date instance
+ */
+ public static create(properties?: google.type.IDate): google.type.Date;
+
+ /**
+ * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages.
+ * @param message Date message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages.
+ * @param message Date message or plain object to encode
+ * @param [writer] Writer to encode to
+ * @returns Writer
+ */
+ public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer;
+
+ /**
+ * Decodes a Date message from the specified reader or buffer.
+ * @param reader Reader or buffer to decode from
+ * @param [length] Message length if known beforehand
+ * @returns Date
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date;
+
+ /**
+ * Decodes a Date message from the specified reader or buffer, length delimited.
+ * @param reader Reader or buffer to decode from
+ * @returns Date
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date;
+
+ /**
+ * Verifies a Date message.
+ * @param message Plain object to verify
+ * @returns `null` if valid, otherwise the reason why it is not
+ */
+ public static verify(message: { [k: string]: any }): (string|null);
+
+ /**
+ * Creates a Date message from a plain object. Also converts values to their respective internal types.
+ * @param object Plain object
+ * @returns Date
+ */
+ public static fromObject(object: { [k: string]: any }): google.type.Date;
+
+ /**
+ * Creates a plain object from a Date message. Also converts values to other types if specified.
+ * @param message Date
+ * @param [options] Conversion options
+ * @returns Plain object
+ */
+ public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any };
+
+ /**
+ * Converts this Date to JSON.
+ * @returns JSON object
+ */
+ public toJSON(): { [k: string]: any };
+
+ /**
+ * Gets the default type url for Date
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns The default type url
+ */
+ public static getTypeUrl(typeUrlPrefix?: string): string;
+ }
+ }
+
+ /** 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;
+ }
+ }
+}
diff --git a/packages/google-cloud-discoveryengine/protos/protos.js b/packages/google-cloud-discoveryengine/protos/protos.js
new file mode 100644
index 00000000000..e848e399e13
--- /dev/null
+++ b/packages/google-cloud-discoveryengine/protos/protos.js
@@ -0,0 +1,26050 @@
+// 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_discoveryengine_protos || ($protobuf.roots._google_cloud_discoveryengine_protos = {});
+
+ $root.google = (function() {
+
+ /**
+ * Namespace google.
+ * @exports google
+ * @namespace
+ */
+ var google = {};
+
+ google.cloud = (function() {
+
+ /**
+ * Namespace cloud.
+ * @memberof google
+ * @namespace
+ */
+ var cloud = {};
+
+ cloud.discoveryengine = (function() {
+
+ /**
+ * Namespace discoveryengine.
+ * @memberof google.cloud
+ * @namespace
+ */
+ var discoveryengine = {};
+
+ discoveryengine.v1beta = (function() {
+
+ /**
+ * Namespace v1beta.
+ * @memberof google.cloud.discoveryengine
+ * @namespace
+ */
+ var v1beta = {};
+
+ v1beta.CustomAttribute = (function() {
+
+ /**
+ * Properties of a CustomAttribute.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface ICustomAttribute
+ * @property {Array.|null} [text] CustomAttribute text
+ * @property {Array.|null} [numbers] CustomAttribute numbers
+ */
+
+ /**
+ * Constructs a new CustomAttribute.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a CustomAttribute.
+ * @implements ICustomAttribute
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.ICustomAttribute=} [properties] Properties to set
+ */
+ function CustomAttribute(properties) {
+ this.text = [];
+ this.numbers = [];
+ 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]];
+ }
+
+ /**
+ * CustomAttribute text.
+ * @member {Array.} text
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @instance
+ */
+ CustomAttribute.prototype.text = $util.emptyArray;
+
+ /**
+ * CustomAttribute numbers.
+ * @member {Array.} numbers
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @instance
+ */
+ CustomAttribute.prototype.numbers = $util.emptyArray;
+
+ /**
+ * Creates a new CustomAttribute instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICustomAttribute=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.CustomAttribute} CustomAttribute instance
+ */
+ CustomAttribute.create = function create(properties) {
+ return new CustomAttribute(properties);
+ };
+
+ /**
+ * Encodes the specified CustomAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CustomAttribute.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICustomAttribute} message CustomAttribute message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CustomAttribute.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.text != null && message.text.length)
+ for (var i = 0; i < message.text.length; ++i)
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.text[i]);
+ if (message.numbers != null && message.numbers.length) {
+ writer.uint32(/* id 2, wireType 2 =*/18).fork();
+ for (var i = 0; i < message.numbers.length; ++i)
+ writer.double(message.numbers[i]);
+ writer.ldelim();
+ }
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CustomAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CustomAttribute.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICustomAttribute} message CustomAttribute message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CustomAttribute.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CustomAttribute message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.CustomAttribute} CustomAttribute
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CustomAttribute.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.discoveryengine.v1beta.CustomAttribute();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.text && message.text.length))
+ message.text = [];
+ message.text.push(reader.string());
+ break;
+ }
+ case 2: {
+ if (!(message.numbers && message.numbers.length))
+ message.numbers = [];
+ if ((tag & 7) === 2) {
+ var end2 = reader.uint32() + reader.pos;
+ while (reader.pos < end2)
+ message.numbers.push(reader.double());
+ } else
+ message.numbers.push(reader.double());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CustomAttribute message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.CustomAttribute} CustomAttribute
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CustomAttribute.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CustomAttribute message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CustomAttribute.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.text != null && message.hasOwnProperty("text")) {
+ if (!Array.isArray(message.text))
+ return "text: array expected";
+ for (var i = 0; i < message.text.length; ++i)
+ if (!$util.isString(message.text[i]))
+ return "text: string[] expected";
+ }
+ if (message.numbers != null && message.hasOwnProperty("numbers")) {
+ if (!Array.isArray(message.numbers))
+ return "numbers: array expected";
+ for (var i = 0; i < message.numbers.length; ++i)
+ if (typeof message.numbers[i] !== "number")
+ return "numbers: number[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CustomAttribute message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.CustomAttribute} CustomAttribute
+ */
+ CustomAttribute.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.CustomAttribute)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.CustomAttribute();
+ if (object.text) {
+ if (!Array.isArray(object.text))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.CustomAttribute.text: array expected");
+ message.text = [];
+ for (var i = 0; i < object.text.length; ++i)
+ message.text[i] = String(object.text[i]);
+ }
+ if (object.numbers) {
+ if (!Array.isArray(object.numbers))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.CustomAttribute.numbers: array expected");
+ message.numbers = [];
+ for (var i = 0; i < object.numbers.length; ++i)
+ message.numbers[i] = Number(object.numbers[i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CustomAttribute message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.CustomAttribute} message CustomAttribute
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CustomAttribute.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.text = [];
+ object.numbers = [];
+ }
+ if (message.text && message.text.length) {
+ object.text = [];
+ for (var j = 0; j < message.text.length; ++j)
+ object.text[j] = message.text[j];
+ }
+ if (message.numbers && message.numbers.length) {
+ object.numbers = [];
+ for (var j = 0; j < message.numbers.length; ++j)
+ object.numbers[j] = options.json && !isFinite(message.numbers[j]) ? String(message.numbers[j]) : message.numbers[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this CustomAttribute to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CustomAttribute.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CustomAttribute
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.CustomAttribute
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CustomAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CustomAttribute";
+ };
+
+ return CustomAttribute;
+ })();
+
+ v1beta.UserInfo = (function() {
+
+ /**
+ * Properties of a UserInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IUserInfo
+ * @property {string|null} [userId] UserInfo userId
+ * @property {string|null} [userAgent] UserInfo userAgent
+ */
+
+ /**
+ * Constructs a new UserInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a UserInfo.
+ * @implements IUserInfo
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IUserInfo=} [properties] Properties to set
+ */
+ function UserInfo(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]];
+ }
+
+ /**
+ * UserInfo userId.
+ * @member {string} userId
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @instance
+ */
+ UserInfo.prototype.userId = "";
+
+ /**
+ * UserInfo userAgent.
+ * @member {string} userAgent
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @instance
+ */
+ UserInfo.prototype.userAgent = "";
+
+ /**
+ * Creates a new UserInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IUserInfo=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.UserInfo} UserInfo instance
+ */
+ UserInfo.create = function create(properties) {
+ return new UserInfo(properties);
+ };
+
+ /**
+ * Encodes the specified UserInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IUserInfo} message UserInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UserInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
+ if (message.userAgent != null && Object.hasOwnProperty.call(message, "userAgent"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.userAgent);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UserInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IUserInfo} message UserInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UserInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a UserInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.UserInfo} UserInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UserInfo.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.discoveryengine.v1beta.UserInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.userId = reader.string();
+ break;
+ }
+ case 2: {
+ message.userAgent = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a UserInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.UserInfo} UserInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UserInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a UserInfo message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UserInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.userId != null && message.hasOwnProperty("userId"))
+ if (!$util.isString(message.userId))
+ return "userId: string expected";
+ if (message.userAgent != null && message.hasOwnProperty("userAgent"))
+ if (!$util.isString(message.userAgent))
+ return "userAgent: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a UserInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.UserInfo} UserInfo
+ */
+ UserInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.UserInfo)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.UserInfo();
+ if (object.userId != null)
+ message.userId = String(object.userId);
+ if (object.userAgent != null)
+ message.userAgent = String(object.userAgent);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a UserInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.UserInfo} message UserInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UserInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.userId = "";
+ object.userAgent = "";
+ }
+ if (message.userId != null && message.hasOwnProperty("userId"))
+ object.userId = message.userId;
+ if (message.userAgent != null && message.hasOwnProperty("userAgent"))
+ object.userAgent = message.userAgent;
+ return object;
+ };
+
+ /**
+ * Converts this UserInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UserInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UserInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.UserInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UserInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.UserInfo";
+ };
+
+ return UserInfo;
+ })();
+
+ v1beta.Document = (function() {
+
+ /**
+ * Properties of a Document.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IDocument
+ * @property {google.protobuf.IStruct|null} [structData] Document structData
+ * @property {string|null} [jsonData] Document jsonData
+ * @property {string|null} [name] Document name
+ * @property {string|null} [id] Document id
+ * @property {string|null} [schemaId] Document schemaId
+ * @property {string|null} [parentDocumentId] Document parentDocumentId
+ */
+
+ /**
+ * Constructs a new Document.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a Document.
+ * @implements IDocument
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IDocument=} [properties] Properties to set
+ */
+ function Document(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]];
+ }
+
+ /**
+ * Document structData.
+ * @member {google.protobuf.IStruct|null|undefined} structData
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @instance
+ */
+ Document.prototype.structData = null;
+
+ /**
+ * Document jsonData.
+ * @member {string|null|undefined} jsonData
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @instance
+ */
+ Document.prototype.jsonData = null;
+
+ /**
+ * Document name.
+ * @member {string} name
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @instance
+ */
+ Document.prototype.name = "";
+
+ /**
+ * Document id.
+ * @member {string} id
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @instance
+ */
+ Document.prototype.id = "";
+
+ /**
+ * Document schemaId.
+ * @member {string} schemaId
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @instance
+ */
+ Document.prototype.schemaId = "";
+
+ /**
+ * Document parentDocumentId.
+ * @member {string} parentDocumentId
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @instance
+ */
+ Document.prototype.parentDocumentId = "";
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * Document data.
+ * @member {"structData"|"jsonData"|undefined} data
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @instance
+ */
+ Object.defineProperty(Document.prototype, "data", {
+ get: $util.oneOfGetter($oneOfFields = ["structData", "jsonData"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new Document instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IDocument=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.Document} Document instance
+ */
+ Document.create = function create(properties) {
+ return new Document(properties);
+ };
+
+ /**
+ * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IDocument} message Document message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Document.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.id != null && Object.hasOwnProperty.call(message, "id"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.id);
+ if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaId);
+ if (message.structData != null && Object.hasOwnProperty.call(message, "structData"))
+ $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.jsonData != null && Object.hasOwnProperty.call(message, "jsonData"))
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.jsonData);
+ if (message.parentDocumentId != null && Object.hasOwnProperty.call(message, "parentDocumentId"))
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.parentDocumentId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IDocument} message Document message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ Document.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a Document message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.Document} Document
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Document.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.discoveryengine.v1beta.Document();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 4: {
+ message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.jsonData = reader.string();
+ break;
+ }
+ case 1: {
+ message.name = reader.string();
+ break;
+ }
+ case 2: {
+ message.id = reader.string();
+ break;
+ }
+ case 3: {
+ message.schemaId = reader.string();
+ break;
+ }
+ case 7: {
+ message.parentDocumentId = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a Document message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.Document} Document
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ Document.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a Document message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ Document.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.structData != null && message.hasOwnProperty("structData")) {
+ properties.data = 1;
+ {
+ var error = $root.google.protobuf.Struct.verify(message.structData);
+ if (error)
+ return "structData." + error;
+ }
+ }
+ if (message.jsonData != null && message.hasOwnProperty("jsonData")) {
+ if (properties.data === 1)
+ return "data: multiple values";
+ properties.data = 1;
+ if (!$util.isString(message.jsonData))
+ return "jsonData: string expected";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ if (message.id != null && message.hasOwnProperty("id"))
+ if (!$util.isString(message.id))
+ return "id: string expected";
+ if (message.schemaId != null && message.hasOwnProperty("schemaId"))
+ if (!$util.isString(message.schemaId))
+ return "schemaId: string expected";
+ if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId"))
+ if (!$util.isString(message.parentDocumentId))
+ return "parentDocumentId: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a Document message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.Document} Document
+ */
+ Document.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.Document)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.Document();
+ if (object.structData != null) {
+ if (typeof object.structData !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.Document.structData: object expected");
+ message.structData = $root.google.protobuf.Struct.fromObject(object.structData);
+ }
+ if (object.jsonData != null)
+ message.jsonData = String(object.jsonData);
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.id != null)
+ message.id = String(object.id);
+ if (object.schemaId != null)
+ message.schemaId = String(object.schemaId);
+ if (object.parentDocumentId != null)
+ message.parentDocumentId = String(object.parentDocumentId);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a Document message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.Document} message Document
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ Document.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.name = "";
+ object.id = "";
+ object.schemaId = "";
+ object.parentDocumentId = "";
+ }
+ if (message.name != null && message.hasOwnProperty("name"))
+ object.name = message.name;
+ if (message.id != null && message.hasOwnProperty("id"))
+ object.id = message.id;
+ if (message.schemaId != null && message.hasOwnProperty("schemaId"))
+ object.schemaId = message.schemaId;
+ if (message.structData != null && message.hasOwnProperty("structData")) {
+ object.structData = $root.google.protobuf.Struct.toObject(message.structData, options);
+ if (options.oneofs)
+ object.data = "structData";
+ }
+ if (message.jsonData != null && message.hasOwnProperty("jsonData")) {
+ object.jsonData = message.jsonData;
+ if (options.oneofs)
+ object.data = "jsonData";
+ }
+ if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId"))
+ object.parentDocumentId = message.parentDocumentId;
+ return object;
+ };
+
+ /**
+ * Converts this Document to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ Document.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for Document
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.Document
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.Document";
+ };
+
+ return Document;
+ })();
+
+ v1beta.DocumentService = (function() {
+
+ /**
+ * Constructs a new DocumentService service.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a DocumentService
+ * @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 DocumentService(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (DocumentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DocumentService;
+
+ /**
+ * Creates new DocumentService service using the specified rpc implementation.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @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 {DocumentService} RPC service. Useful where requests and/or responses are streamed.
+ */
+ DocumentService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|getDocument}.
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @typedef GetDocumentCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.discoveryengine.v1beta.Document} [response] Document
+ */
+
+ /**
+ * Calls GetDocument.
+ * @function getDocument
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} request GetDocumentRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.DocumentService.GetDocumentCallback} callback Node-style callback called with the error, if any, and Document
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(DocumentService.prototype.getDocument = function getDocument(request, callback) {
+ return this.rpcCall(getDocument, $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest, $root.google.cloud.discoveryengine.v1beta.Document, request, callback);
+ }, "name", { value: "GetDocument" });
+
+ /**
+ * Calls GetDocument.
+ * @function getDocument
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} request GetDocumentRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|listDocuments}.
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @typedef ListDocumentsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} [response] ListDocumentsResponse
+ */
+
+ /**
+ * Calls ListDocuments.
+ * @function listDocuments
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} request ListDocumentsRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.DocumentService.ListDocumentsCallback} callback Node-style callback called with the error, if any, and ListDocumentsResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(DocumentService.prototype.listDocuments = function listDocuments(request, callback) {
+ return this.rpcCall(listDocuments, $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest, $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse, request, callback);
+ }, "name", { value: "ListDocuments" });
+
+ /**
+ * Calls ListDocuments.
+ * @function listDocuments
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} request ListDocumentsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|createDocument}.
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @typedef CreateDocumentCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.discoveryengine.v1beta.Document} [response] Document
+ */
+
+ /**
+ * Calls CreateDocument.
+ * @function createDocument
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} request CreateDocumentRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.DocumentService.CreateDocumentCallback} callback Node-style callback called with the error, if any, and Document
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(DocumentService.prototype.createDocument = function createDocument(request, callback) {
+ return this.rpcCall(createDocument, $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest, $root.google.cloud.discoveryengine.v1beta.Document, request, callback);
+ }, "name", { value: "CreateDocument" });
+
+ /**
+ * Calls CreateDocument.
+ * @function createDocument
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} request CreateDocumentRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|updateDocument}.
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @typedef UpdateDocumentCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.discoveryengine.v1beta.Document} [response] Document
+ */
+
+ /**
+ * Calls UpdateDocument.
+ * @function updateDocument
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocumentCallback} callback Node-style callback called with the error, if any, and Document
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(DocumentService.prototype.updateDocument = function updateDocument(request, callback) {
+ return this.rpcCall(updateDocument, $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest, $root.google.cloud.discoveryengine.v1beta.Document, request, callback);
+ }, "name", { value: "UpdateDocument" });
+
+ /**
+ * Calls UpdateDocument.
+ * @function updateDocument
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|deleteDocument}.
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @typedef DeleteDocumentCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.protobuf.Empty} [response] Empty
+ */
+
+ /**
+ * Calls DeleteDocument.
+ * @function deleteDocument
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocumentCallback} callback Node-style callback called with the error, if any, and Empty
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(DocumentService.prototype.deleteDocument = function deleteDocument(request, callback) {
+ return this.rpcCall(deleteDocument, $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest, $root.google.protobuf.Empty, request, callback);
+ }, "name", { value: "DeleteDocument" });
+
+ /**
+ * Calls DeleteDocument.
+ * @function deleteDocument
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|importDocuments}.
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @typedef ImportDocumentsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.longrunning.Operation} [response] Operation
+ */
+
+ /**
+ * Calls ImportDocuments.
+ * @function importDocuments
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.DocumentService.ImportDocumentsCallback} callback Node-style callback called with the error, if any, and Operation
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(DocumentService.prototype.importDocuments = function importDocuments(request, callback) {
+ return this.rpcCall(importDocuments, $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest, $root.google.longrunning.Operation, request, callback);
+ }, "name", { value: "ImportDocuments" });
+
+ /**
+ * Calls ImportDocuments.
+ * @function importDocuments
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return DocumentService;
+ })();
+
+ v1beta.GetDocumentRequest = (function() {
+
+ /**
+ * Properties of a GetDocumentRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IGetDocumentRequest
+ * @property {string|null} [name] GetDocumentRequest name
+ */
+
+ /**
+ * Constructs a new GetDocumentRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a GetDocumentRequest.
+ * @implements IGetDocumentRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest=} [properties] Properties to set
+ */
+ function GetDocumentRequest(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]];
+ }
+
+ /**
+ * GetDocumentRequest name.
+ * @member {string} name
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @instance
+ */
+ GetDocumentRequest.prototype.name = "";
+
+ /**
+ * Creates a new GetDocumentRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest instance
+ */
+ GetDocumentRequest.create = function create(properties) {
+ return new GetDocumentRequest(properties);
+ };
+
+ /**
+ * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetDocumentRequest.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 GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ GetDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a GetDocumentRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetDocumentRequest.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.discoveryengine.v1beta.GetDocumentRequest();
+ 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 GetDocumentRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ GetDocumentRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a GetDocumentRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ GetDocumentRequest.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 GetDocumentRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest
+ */
+ GetDocumentRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.GetDocumentRequest} message GetDocumentRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ GetDocumentRequest.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 GetDocumentRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ GetDocumentRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for GetDocumentRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ GetDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.GetDocumentRequest";
+ };
+
+ return GetDocumentRequest;
+ })();
+
+ v1beta.ListDocumentsRequest = (function() {
+
+ /**
+ * Properties of a ListDocumentsRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IListDocumentsRequest
+ * @property {string|null} [parent] ListDocumentsRequest parent
+ * @property {number|null} [pageSize] ListDocumentsRequest pageSize
+ * @property {string|null} [pageToken] ListDocumentsRequest pageToken
+ */
+
+ /**
+ * Constructs a new ListDocumentsRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a ListDocumentsRequest.
+ * @implements IListDocumentsRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest=} [properties] Properties to set
+ */
+ function ListDocumentsRequest(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]];
+ }
+
+ /**
+ * ListDocumentsRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @instance
+ */
+ ListDocumentsRequest.prototype.parent = "";
+
+ /**
+ * ListDocumentsRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @instance
+ */
+ ListDocumentsRequest.prototype.pageSize = 0;
+
+ /**
+ * ListDocumentsRequest pageToken.
+ * @member {string} pageToken
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @instance
+ */
+ ListDocumentsRequest.prototype.pageToken = "";
+
+ /**
+ * Creates a new ListDocumentsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest instance
+ */
+ ListDocumentsRequest.create = function create(properties) {
+ return new ListDocumentsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListDocumentsRequest.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 ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListDocumentsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListDocumentsRequest.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.discoveryengine.v1beta.ListDocumentsRequest();
+ 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 ListDocumentsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListDocumentsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListDocumentsRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListDocumentsRequest.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 ListDocumentsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest
+ */
+ ListDocumentsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest();
+ 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 ListDocumentsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} message ListDocumentsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListDocumentsRequest.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 ListDocumentsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListDocumentsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListDocumentsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ListDocumentsRequest";
+ };
+
+ return ListDocumentsRequest;
+ })();
+
+ v1beta.ListDocumentsResponse = (function() {
+
+ /**
+ * Properties of a ListDocumentsResponse.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IListDocumentsResponse
+ * @property {Array.|null} [documents] ListDocumentsResponse documents
+ * @property {string|null} [nextPageToken] ListDocumentsResponse nextPageToken
+ */
+
+ /**
+ * Constructs a new ListDocumentsResponse.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a ListDocumentsResponse.
+ * @implements IListDocumentsResponse
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse=} [properties] Properties to set
+ */
+ function ListDocumentsResponse(properties) {
+ this.documents = [];
+ 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]];
+ }
+
+ /**
+ * ListDocumentsResponse documents.
+ * @member {Array.} documents
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @instance
+ */
+ ListDocumentsResponse.prototype.documents = $util.emptyArray;
+
+ /**
+ * ListDocumentsResponse nextPageToken.
+ * @member {string} nextPageToken
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @instance
+ */
+ ListDocumentsResponse.prototype.nextPageToken = "";
+
+ /**
+ * Creates a new ListDocumentsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse instance
+ */
+ ListDocumentsResponse.create = function create(properties) {
+ return new ListDocumentsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListDocumentsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.documents != null && message.documents.length)
+ for (var i = 0; i < message.documents.length; ++i)
+ $root.google.cloud.discoveryengine.v1beta.Document.encode(message.documents[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 ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ListDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a ListDocumentsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListDocumentsResponse.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.discoveryengine.v1beta.ListDocumentsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.documents && message.documents.length))
+ message.documents = [];
+ message.documents.push($root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.nextPageToken = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a ListDocumentsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ListDocumentsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a ListDocumentsResponse message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ListDocumentsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.documents != null && message.hasOwnProperty("documents")) {
+ if (!Array.isArray(message.documents))
+ return "documents: array expected";
+ for (var i = 0; i < message.documents.length; ++i) {
+ var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.documents[i]);
+ if (error)
+ return "documents." + error;
+ }
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ if (!$util.isString(message.nextPageToken))
+ return "nextPageToken: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse
+ */
+ ListDocumentsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse();
+ if (object.documents) {
+ if (!Array.isArray(object.documents))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: array expected");
+ message.documents = [];
+ for (var i = 0; i < object.documents.length; ++i) {
+ if (typeof object.documents[i] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: object expected");
+ message.documents[i] = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.documents[i]);
+ }
+ }
+ if (object.nextPageToken != null)
+ message.nextPageToken = String(object.nextPageToken);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} message ListDocumentsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ListDocumentsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.documents = [];
+ if (options.defaults)
+ object.nextPageToken = "";
+ if (message.documents && message.documents.length) {
+ object.documents = [];
+ for (var j = 0; j < message.documents.length; ++j)
+ object.documents[j] = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.documents[j], options);
+ }
+ if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
+ object.nextPageToken = message.nextPageToken;
+ return object;
+ };
+
+ /**
+ * Converts this ListDocumentsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ListDocumentsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ListDocumentsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ListDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ListDocumentsResponse";
+ };
+
+ return ListDocumentsResponse;
+ })();
+
+ v1beta.CreateDocumentRequest = (function() {
+
+ /**
+ * Properties of a CreateDocumentRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface ICreateDocumentRequest
+ * @property {string|null} [parent] CreateDocumentRequest parent
+ * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] CreateDocumentRequest document
+ * @property {string|null} [documentId] CreateDocumentRequest documentId
+ */
+
+ /**
+ * Constructs a new CreateDocumentRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a CreateDocumentRequest.
+ * @implements ICreateDocumentRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest=} [properties] Properties to set
+ */
+ function CreateDocumentRequest(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]];
+ }
+
+ /**
+ * CreateDocumentRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @instance
+ */
+ CreateDocumentRequest.prototype.parent = "";
+
+ /**
+ * CreateDocumentRequest document.
+ * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @instance
+ */
+ CreateDocumentRequest.prototype.document = null;
+
+ /**
+ * CreateDocumentRequest documentId.
+ * @member {string} documentId
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @instance
+ */
+ CreateDocumentRequest.prototype.documentId = "";
+
+ /**
+ * Creates a new CreateDocumentRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest instance
+ */
+ CreateDocumentRequest.create = function create(properties) {
+ return new CreateDocumentRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateDocumentRequest.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.document != null && Object.hasOwnProperty.call(message, "document"))
+ $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.documentId != null && Object.hasOwnProperty.call(message, "documentId"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.documentId);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CreateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CreateDocumentRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateDocumentRequest.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.discoveryengine.v1beta.CreateDocumentRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.documentId = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CreateDocumentRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CreateDocumentRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CreateDocumentRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CreateDocumentRequest.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.document != null && message.hasOwnProperty("document")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document);
+ if (error)
+ return "document." + error;
+ }
+ if (message.documentId != null && message.hasOwnProperty("documentId"))
+ if (!$util.isString(message.documentId))
+ return "documentId: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a CreateDocumentRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest
+ */
+ CreateDocumentRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.document != null) {
+ if (typeof object.document !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.CreateDocumentRequest.document: object expected");
+ message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document);
+ }
+ if (object.documentId != null)
+ message.documentId = String(object.documentId);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} message CreateDocumentRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CreateDocumentRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.document = null;
+ object.documentId = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.document != null && message.hasOwnProperty("document"))
+ object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options);
+ if (message.documentId != null && message.hasOwnProperty("documentId"))
+ object.documentId = message.documentId;
+ return object;
+ };
+
+ /**
+ * Converts this CreateDocumentRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CreateDocumentRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CreateDocumentRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CreateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CreateDocumentRequest";
+ };
+
+ return CreateDocumentRequest;
+ })();
+
+ v1beta.UpdateDocumentRequest = (function() {
+
+ /**
+ * Properties of an UpdateDocumentRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IUpdateDocumentRequest
+ * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] UpdateDocumentRequest document
+ * @property {boolean|null} [allowMissing] UpdateDocumentRequest allowMissing
+ */
+
+ /**
+ * Constructs a new UpdateDocumentRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents an UpdateDocumentRequest.
+ * @implements IUpdateDocumentRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest=} [properties] Properties to set
+ */
+ function UpdateDocumentRequest(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]];
+ }
+
+ /**
+ * UpdateDocumentRequest document.
+ * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @instance
+ */
+ UpdateDocumentRequest.prototype.document = null;
+
+ /**
+ * UpdateDocumentRequest allowMissing.
+ * @member {boolean} allowMissing
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @instance
+ */
+ UpdateDocumentRequest.prototype.allowMissing = false;
+
+ /**
+ * Creates a new UpdateDocumentRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest instance
+ */
+ UpdateDocumentRequest.create = function create(properties) {
+ return new UpdateDocumentRequest(properties);
+ };
+
+ /**
+ * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateDocumentRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.document != null && Object.hasOwnProperty.call(message, "document"))
+ $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing"))
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowMissing);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UpdateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an UpdateDocumentRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateDocumentRequest.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.discoveryengine.v1beta.UpdateDocumentRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.allowMissing = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UpdateDocumentRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an UpdateDocumentRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UpdateDocumentRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.document != null && message.hasOwnProperty("document")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document);
+ if (error)
+ return "document." + error;
+ }
+ if (message.allowMissing != null && message.hasOwnProperty("allowMissing"))
+ if (typeof message.allowMissing !== "boolean")
+ return "allowMissing: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest
+ */
+ UpdateDocumentRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest();
+ if (object.document != null) {
+ if (typeof object.document !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.document: object expected");
+ message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document);
+ }
+ if (object.allowMissing != null)
+ message.allowMissing = Boolean(object.allowMissing);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} message UpdateDocumentRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UpdateDocumentRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.document = null;
+ object.allowMissing = false;
+ }
+ if (message.document != null && message.hasOwnProperty("document"))
+ object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options);
+ if (message.allowMissing != null && message.hasOwnProperty("allowMissing"))
+ object.allowMissing = message.allowMissing;
+ return object;
+ };
+
+ /**
+ * Converts this UpdateDocumentRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UpdateDocumentRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UpdateDocumentRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UpdateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.UpdateDocumentRequest";
+ };
+
+ return UpdateDocumentRequest;
+ })();
+
+ v1beta.DeleteDocumentRequest = (function() {
+
+ /**
+ * Properties of a DeleteDocumentRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IDeleteDocumentRequest
+ * @property {string|null} [name] DeleteDocumentRequest name
+ */
+
+ /**
+ * Constructs a new DeleteDocumentRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a DeleteDocumentRequest.
+ * @implements IDeleteDocumentRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest=} [properties] Properties to set
+ */
+ function DeleteDocumentRequest(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]];
+ }
+
+ /**
+ * DeleteDocumentRequest name.
+ * @member {string} name
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @instance
+ */
+ DeleteDocumentRequest.prototype.name = "";
+
+ /**
+ * Creates a new DeleteDocumentRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest instance
+ */
+ DeleteDocumentRequest.create = function create(properties) {
+ return new DeleteDocumentRequest(properties);
+ };
+
+ /**
+ * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DeleteDocumentRequest.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 DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DeleteDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a DeleteDocumentRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DeleteDocumentRequest.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.discoveryengine.v1beta.DeleteDocumentRequest();
+ 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 DeleteDocumentRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DeleteDocumentRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a DeleteDocumentRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DeleteDocumentRequest.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 DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest
+ */
+ DeleteDocumentRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest();
+ if (object.name != null)
+ message.name = String(object.name);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} message DeleteDocumentRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ DeleteDocumentRequest.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 DeleteDocumentRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ DeleteDocumentRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for DeleteDocumentRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ DeleteDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.DeleteDocumentRequest";
+ };
+
+ return DeleteDocumentRequest;
+ })();
+
+ v1beta.GcsSource = (function() {
+
+ /**
+ * Properties of a GcsSource.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IGcsSource
+ * @property {Array.|null} [inputUris] GcsSource inputUris
+ * @property {string|null} [dataSchema] GcsSource dataSchema
+ */
+
+ /**
+ * Constructs a new GcsSource.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a GcsSource.
+ * @implements IGcsSource
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IGcsSource=} [properties] Properties to set
+ */
+ function GcsSource(properties) {
+ this.inputUris = [];
+ 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 inputUris.
+ * @member {Array.} inputUris
+ * @memberof google.cloud.discoveryengine.v1beta.GcsSource
+ * @instance
+ */
+ GcsSource.prototype.inputUris = $util.emptyArray;
+
+ /**
+ * GcsSource dataSchema.
+ * @member {string} dataSchema
+ * @memberof google.cloud.discoveryengine.v1beta.GcsSource
+ * @instance
+ */
+ GcsSource.prototype.dataSchema = "";
+
+ /**
+ * Creates a new GcsSource instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.GcsSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IGcsSource=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource instance
+ */
+ GcsSource.create = function create(properties) {
+ return new GcsSource(properties);
+ };
+
+ /**
+ * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.GcsSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.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.inputUris != null && message.inputUris.length)
+ for (var i = 0; i < message.inputUris.length; ++i)
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]);
+ if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSchema);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.GcsSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.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.discoveryengine.v1beta.GcsSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.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.discoveryengine.v1beta.GcsSource();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.inputUris && message.inputUris.length))
+ message.inputUris = [];
+ message.inputUris.push(reader.string());
+ break;
+ }
+ case 2: {
+ message.dataSchema = 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.discoveryengine.v1beta.GcsSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.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.discoveryengine.v1beta.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.inputUris != null && message.hasOwnProperty("inputUris")) {
+ if (!Array.isArray(message.inputUris))
+ return "inputUris: array expected";
+ for (var i = 0; i < message.inputUris.length; ++i)
+ if (!$util.isString(message.inputUris[i]))
+ return "inputUris: string[] expected";
+ }
+ if (message.dataSchema != null && message.hasOwnProperty("dataSchema"))
+ if (!$util.isString(message.dataSchema))
+ return "dataSchema: 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.discoveryengine.v1beta.GcsSource
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource
+ */
+ GcsSource.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.GcsSource)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.GcsSource();
+ if (object.inputUris) {
+ if (!Array.isArray(object.inputUris))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.GcsSource.inputUris: array expected");
+ message.inputUris = [];
+ for (var i = 0; i < object.inputUris.length; ++i)
+ message.inputUris[i] = String(object.inputUris[i]);
+ }
+ if (object.dataSchema != null)
+ message.dataSchema = String(object.dataSchema);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a GcsSource message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.GcsSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.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.arrays || options.defaults)
+ object.inputUris = [];
+ if (options.defaults)
+ object.dataSchema = "";
+ if (message.inputUris && message.inputUris.length) {
+ object.inputUris = [];
+ for (var j = 0; j < message.inputUris.length; ++j)
+ object.inputUris[j] = message.inputUris[j];
+ }
+ if (message.dataSchema != null && message.hasOwnProperty("dataSchema"))
+ object.dataSchema = message.dataSchema;
+ return object;
+ };
+
+ /**
+ * Converts this GcsSource to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.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.discoveryengine.v1beta.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.discoveryengine.v1beta.GcsSource";
+ };
+
+ return GcsSource;
+ })();
+
+ v1beta.BigQuerySource = (function() {
+
+ /**
+ * Properties of a BigQuerySource.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IBigQuerySource
+ * @property {google.type.IDate|null} [partitionDate] BigQuerySource partitionDate
+ * @property {string|null} [projectId] BigQuerySource projectId
+ * @property {string|null} [datasetId] BigQuerySource datasetId
+ * @property {string|null} [tableId] BigQuerySource tableId
+ * @property {string|null} [gcsStagingDir] BigQuerySource gcsStagingDir
+ * @property {string|null} [dataSchema] BigQuerySource dataSchema
+ */
+
+ /**
+ * Constructs a new BigQuerySource.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a BigQuerySource.
+ * @implements IBigQuerySource
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource=} [properties] Properties to set
+ */
+ function BigQuerySource(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]];
+ }
+
+ /**
+ * BigQuerySource partitionDate.
+ * @member {google.type.IDate|null|undefined} partitionDate
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @instance
+ */
+ BigQuerySource.prototype.partitionDate = null;
+
+ /**
+ * BigQuerySource projectId.
+ * @member {string} projectId
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @instance
+ */
+ BigQuerySource.prototype.projectId = "";
+
+ /**
+ * BigQuerySource datasetId.
+ * @member {string} datasetId
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @instance
+ */
+ BigQuerySource.prototype.datasetId = "";
+
+ /**
+ * BigQuerySource tableId.
+ * @member {string} tableId
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @instance
+ */
+ BigQuerySource.prototype.tableId = "";
+
+ /**
+ * BigQuerySource gcsStagingDir.
+ * @member {string} gcsStagingDir
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @instance
+ */
+ BigQuerySource.prototype.gcsStagingDir = "";
+
+ /**
+ * BigQuerySource dataSchema.
+ * @member {string} dataSchema
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @instance
+ */
+ BigQuerySource.prototype.dataSchema = "";
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * BigQuerySource partition.
+ * @member {"partitionDate"|undefined} partition
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @instance
+ */
+ Object.defineProperty(BigQuerySource.prototype, "partition", {
+ get: $util.oneOfGetter($oneOfFields = ["partitionDate"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new BigQuerySource instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource instance
+ */
+ BigQuerySource.create = function create(properties) {
+ return new BigQuerySource(properties);
+ };
+
+ /**
+ * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource} message BigQuerySource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ BigQuerySource.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId);
+ if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetId);
+ if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId);
+ if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir);
+ if (message.partitionDate != null && Object.hasOwnProperty.call(message, "partitionDate"))
+ $root.google.type.Date.encode(message.partitionDate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataSchema);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource} message BigQuerySource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ BigQuerySource.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a BigQuerySource message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ BigQuerySource.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.discoveryengine.v1beta.BigQuerySource();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 5: {
+ message.partitionDate = $root.google.type.Date.decode(reader, reader.uint32());
+ break;
+ }
+ case 1: {
+ message.projectId = reader.string();
+ break;
+ }
+ case 2: {
+ message.datasetId = reader.string();
+ break;
+ }
+ case 3: {
+ message.tableId = reader.string();
+ break;
+ }
+ case 4: {
+ message.gcsStagingDir = reader.string();
+ break;
+ }
+ case 6: {
+ message.dataSchema = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a BigQuerySource message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ BigQuerySource.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a BigQuerySource message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ BigQuerySource.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) {
+ properties.partition = 1;
+ {
+ var error = $root.google.type.Date.verify(message.partitionDate);
+ if (error)
+ return "partitionDate." + error;
+ }
+ }
+ if (message.projectId != null && message.hasOwnProperty("projectId"))
+ if (!$util.isString(message.projectId))
+ return "projectId: string expected";
+ if (message.datasetId != null && message.hasOwnProperty("datasetId"))
+ if (!$util.isString(message.datasetId))
+ return "datasetId: string expected";
+ if (message.tableId != null && message.hasOwnProperty("tableId"))
+ if (!$util.isString(message.tableId))
+ return "tableId: string expected";
+ if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir"))
+ if (!$util.isString(message.gcsStagingDir))
+ return "gcsStagingDir: string expected";
+ if (message.dataSchema != null && message.hasOwnProperty("dataSchema"))
+ if (!$util.isString(message.dataSchema))
+ return "dataSchema: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource
+ */
+ BigQuerySource.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.BigQuerySource)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.BigQuerySource();
+ if (object.partitionDate != null) {
+ if (typeof object.partitionDate !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.BigQuerySource.partitionDate: object expected");
+ message.partitionDate = $root.google.type.Date.fromObject(object.partitionDate);
+ }
+ if (object.projectId != null)
+ message.projectId = String(object.projectId);
+ if (object.datasetId != null)
+ message.datasetId = String(object.datasetId);
+ if (object.tableId != null)
+ message.tableId = String(object.tableId);
+ if (object.gcsStagingDir != null)
+ message.gcsStagingDir = String(object.gcsStagingDir);
+ if (object.dataSchema != null)
+ message.dataSchema = String(object.dataSchema);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.BigQuerySource} message BigQuerySource
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ BigQuerySource.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.projectId = "";
+ object.datasetId = "";
+ object.tableId = "";
+ object.gcsStagingDir = "";
+ object.dataSchema = "";
+ }
+ if (message.projectId != null && message.hasOwnProperty("projectId"))
+ object.projectId = message.projectId;
+ if (message.datasetId != null && message.hasOwnProperty("datasetId"))
+ object.datasetId = message.datasetId;
+ if (message.tableId != null && message.hasOwnProperty("tableId"))
+ object.tableId = message.tableId;
+ if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir"))
+ object.gcsStagingDir = message.gcsStagingDir;
+ if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) {
+ object.partitionDate = $root.google.type.Date.toObject(message.partitionDate, options);
+ if (options.oneofs)
+ object.partition = "partitionDate";
+ }
+ if (message.dataSchema != null && message.hasOwnProperty("dataSchema"))
+ object.dataSchema = message.dataSchema;
+ return object;
+ };
+
+ /**
+ * Converts this BigQuerySource to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ BigQuerySource.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for BigQuerySource
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ BigQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.BigQuerySource";
+ };
+
+ return BigQuerySource;
+ })();
+
+ v1beta.ImportErrorConfig = (function() {
+
+ /**
+ * Properties of an ImportErrorConfig.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IImportErrorConfig
+ * @property {string|null} [gcsPrefix] ImportErrorConfig gcsPrefix
+ */
+
+ /**
+ * Constructs a new ImportErrorConfig.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents an ImportErrorConfig.
+ * @implements IImportErrorConfig
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig=} [properties] Properties to set
+ */
+ function ImportErrorConfig(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]];
+ }
+
+ /**
+ * ImportErrorConfig gcsPrefix.
+ * @member {string|null|undefined} gcsPrefix
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @instance
+ */
+ ImportErrorConfig.prototype.gcsPrefix = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * ImportErrorConfig destination.
+ * @member {"gcsPrefix"|undefined} destination
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @instance
+ */
+ Object.defineProperty(ImportErrorConfig.prototype, "destination", {
+ get: $util.oneOfGetter($oneOfFields = ["gcsPrefix"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new ImportErrorConfig instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig instance
+ */
+ ImportErrorConfig.create = function create(properties) {
+ return new ImportErrorConfig(properties);
+ };
+
+ /**
+ * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig} message ImportErrorConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportErrorConfig.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.gcsPrefix != null && Object.hasOwnProperty.call(message, "gcsPrefix"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsPrefix);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig} message ImportErrorConfig message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportErrorConfig.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ImportErrorConfig message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportErrorConfig.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.discoveryengine.v1beta.ImportErrorConfig();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.gcsPrefix = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportErrorConfig.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ImportErrorConfig message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ImportErrorConfig.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) {
+ properties.destination = 1;
+ if (!$util.isString(message.gcsPrefix))
+ return "gcsPrefix: string expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates an ImportErrorConfig message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig
+ */
+ ImportErrorConfig.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig();
+ if (object.gcsPrefix != null)
+ message.gcsPrefix = String(object.gcsPrefix);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportErrorConfig} message ImportErrorConfig
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ImportErrorConfig.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) {
+ object.gcsPrefix = message.gcsPrefix;
+ if (options.oneofs)
+ object.destination = "gcsPrefix";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this ImportErrorConfig to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ImportErrorConfig.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ImportErrorConfig
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ImportErrorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportErrorConfig";
+ };
+
+ return ImportErrorConfig;
+ })();
+
+ v1beta.ImportUserEventsRequest = (function() {
+
+ /**
+ * Properties of an ImportUserEventsRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IImportUserEventsRequest
+ * @property {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null} [inlineSource] ImportUserEventsRequest inlineSource
+ * @property {google.cloud.discoveryengine.v1beta.IGcsSource|null} [gcsSource] ImportUserEventsRequest gcsSource
+ * @property {google.cloud.discoveryengine.v1beta.IBigQuerySource|null} [bigquerySource] ImportUserEventsRequest bigquerySource
+ * @property {string|null} [parent] ImportUserEventsRequest parent
+ * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportUserEventsRequest errorConfig
+ */
+
+ /**
+ * Constructs a new ImportUserEventsRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents an ImportUserEventsRequest.
+ * @implements IImportUserEventsRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest=} [properties] Properties to set
+ */
+ function ImportUserEventsRequest(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]];
+ }
+
+ /**
+ * ImportUserEventsRequest inlineSource.
+ * @member {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null|undefined} inlineSource
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @instance
+ */
+ ImportUserEventsRequest.prototype.inlineSource = null;
+
+ /**
+ * ImportUserEventsRequest gcsSource.
+ * @member {google.cloud.discoveryengine.v1beta.IGcsSource|null|undefined} gcsSource
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @instance
+ */
+ ImportUserEventsRequest.prototype.gcsSource = null;
+
+ /**
+ * ImportUserEventsRequest bigquerySource.
+ * @member {google.cloud.discoveryengine.v1beta.IBigQuerySource|null|undefined} bigquerySource
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @instance
+ */
+ ImportUserEventsRequest.prototype.bigquerySource = null;
+
+ /**
+ * ImportUserEventsRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @instance
+ */
+ ImportUserEventsRequest.prototype.parent = "";
+
+ /**
+ * ImportUserEventsRequest errorConfig.
+ * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @instance
+ */
+ ImportUserEventsRequest.prototype.errorConfig = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * ImportUserEventsRequest source.
+ * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @instance
+ */
+ Object.defineProperty(ImportUserEventsRequest.prototype, "source", {
+ get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new ImportUserEventsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest instance
+ */
+ ImportUserEventsRequest.create = function create(properties) {
+ return new ImportUserEventsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportUserEventsRequest.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.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource"))
+ $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
+ $root.google.cloud.discoveryengine.v1beta.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource"))
+ $root.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig"))
+ $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportUserEventsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ImportUserEventsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportUserEventsRequest.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.discoveryengine.v1beta.ImportUserEventsRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(reader, reader.uint32());
+ break;
+ }
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 5: {
+ message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportUserEventsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ImportUserEventsRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ImportUserEventsRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) {
+ properties.source = 1;
+ {
+ var error = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify(message.inlineSource);
+ if (error)
+ return "inlineSource." + error;
+ }
+ }
+ if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
+ if (properties.source === 1)
+ return "source: multiple values";
+ properties.source = 1;
+ {
+ var error = $root.google.cloud.discoveryengine.v1beta.GcsSource.verify(message.gcsSource);
+ if (error)
+ return "gcsSource." + error;
+ }
+ }
+ if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) {
+ if (properties.source === 1)
+ return "source: multiple values";
+ properties.source = 1;
+ {
+ var error = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(message.bigquerySource);
+ if (error)
+ return "bigquerySource." + error;
+ }
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig);
+ if (error)
+ return "errorConfig." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest
+ */
+ ImportUserEventsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest();
+ if (object.inlineSource != null) {
+ if (typeof object.inlineSource !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.inlineSource: object expected");
+ message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.fromObject(object.inlineSource);
+ }
+ if (object.gcsSource != null) {
+ if (typeof object.gcsSource !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.gcsSource: object expected");
+ message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(object.gcsSource);
+ }
+ if (object.bigquerySource != null) {
+ if (typeof object.bigquerySource !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.bigquerySource: object expected");
+ message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(object.bigquerySource);
+ }
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.errorConfig != null) {
+ if (typeof object.errorConfig !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.errorConfig: object expected");
+ message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} message ImportUserEventsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ImportUserEventsRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.errorConfig = null;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) {
+ object.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.toObject(message.inlineSource, options);
+ if (options.oneofs)
+ object.source = "inlineSource";
+ }
+ if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
+ object.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.toObject(message.gcsSource, options);
+ if (options.oneofs)
+ object.source = "gcsSource";
+ }
+ if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) {
+ object.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(message.bigquerySource, options);
+ if (options.oneofs)
+ object.source = "bigquerySource";
+ }
+ if (message.errorConfig != null && message.hasOwnProperty("errorConfig"))
+ object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options);
+ return object;
+ };
+
+ /**
+ * Converts this ImportUserEventsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ImportUserEventsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ImportUserEventsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ImportUserEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsRequest";
+ };
+
+ ImportUserEventsRequest.InlineSource = (function() {
+
+ /**
+ * Properties of an InlineSource.
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @interface IInlineSource
+ * @property {Array.|null} [userEvents] InlineSource userEvents
+ */
+
+ /**
+ * Constructs a new InlineSource.
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest
+ * @classdesc Represents an InlineSource.
+ * @implements IInlineSource
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set
+ */
+ function InlineSource(properties) {
+ this.userEvents = [];
+ 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]];
+ }
+
+ /**
+ * InlineSource userEvents.
+ * @member {Array.} userEvents
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @instance
+ */
+ InlineSource.prototype.userEvents = $util.emptyArray;
+
+ /**
+ * Creates a new InlineSource instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource instance
+ */
+ InlineSource.create = function create(properties) {
+ return new InlineSource(properties);
+ };
+
+ /**
+ * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ InlineSource.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.userEvents != null && message.userEvents.length)
+ for (var i = 0; i < message.userEvents.length; ++i)
+ $root.google.cloud.discoveryengine.v1beta.UserEvent.encode(message.userEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ InlineSource.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an InlineSource message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ InlineSource.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.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.userEvents && message.userEvents.length))
+ message.userEvents = [];
+ message.userEvents.push($root.google.cloud.discoveryengine.v1beta.UserEvent.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an InlineSource message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ InlineSource.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an InlineSource message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ InlineSource.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.userEvents != null && message.hasOwnProperty("userEvents")) {
+ if (!Array.isArray(message.userEvents))
+ return "userEvents: array expected";
+ for (var i = 0; i < message.userEvents.length; ++i) {
+ var error = $root.google.cloud.discoveryengine.v1beta.UserEvent.verify(message.userEvents[i]);
+ if (error)
+ return "userEvents." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates an InlineSource message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource
+ */
+ InlineSource.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource();
+ if (object.userEvents) {
+ if (!Array.isArray(object.userEvents))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: array expected");
+ message.userEvents = [];
+ for (var i = 0; i < object.userEvents.length; ++i) {
+ if (typeof object.userEvents[i] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: object expected");
+ message.userEvents[i] = $root.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(object.userEvents[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an InlineSource message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} message InlineSource
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ InlineSource.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.userEvents = [];
+ if (message.userEvents && message.userEvents.length) {
+ object.userEvents = [];
+ for (var j = 0; j < message.userEvents.length; ++j)
+ object.userEvents[j] = $root.google.cloud.discoveryengine.v1beta.UserEvent.toObject(message.userEvents[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this InlineSource to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ InlineSource.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for InlineSource
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource";
+ };
+
+ return InlineSource;
+ })();
+
+ return ImportUserEventsRequest;
+ })();
+
+ v1beta.ImportUserEventsResponse = (function() {
+
+ /**
+ * Properties of an ImportUserEventsResponse.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IImportUserEventsResponse
+ * @property {Array.|null} [errorSamples] ImportUserEventsResponse errorSamples
+ * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportUserEventsResponse errorConfig
+ * @property {number|Long|null} [joinedEventsCount] ImportUserEventsResponse joinedEventsCount
+ * @property {number|Long|null} [unjoinedEventsCount] ImportUserEventsResponse unjoinedEventsCount
+ */
+
+ /**
+ * Constructs a new ImportUserEventsResponse.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents an ImportUserEventsResponse.
+ * @implements IImportUserEventsResponse
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse=} [properties] Properties to set
+ */
+ function ImportUserEventsResponse(properties) {
+ this.errorSamples = [];
+ 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]];
+ }
+
+ /**
+ * ImportUserEventsResponse errorSamples.
+ * @member {Array.} errorSamples
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @instance
+ */
+ ImportUserEventsResponse.prototype.errorSamples = $util.emptyArray;
+
+ /**
+ * ImportUserEventsResponse errorConfig.
+ * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @instance
+ */
+ ImportUserEventsResponse.prototype.errorConfig = null;
+
+ /**
+ * ImportUserEventsResponse joinedEventsCount.
+ * @member {number|Long} joinedEventsCount
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @instance
+ */
+ ImportUserEventsResponse.prototype.joinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * ImportUserEventsResponse unjoinedEventsCount.
+ * @member {number|Long} unjoinedEventsCount
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @instance
+ */
+ ImportUserEventsResponse.prototype.unjoinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * Creates a new ImportUserEventsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse instance
+ */
+ ImportUserEventsResponse.create = function create(properties) {
+ return new ImportUserEventsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportUserEventsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.errorSamples != null && message.errorSamples.length)
+ for (var i = 0; i < message.errorSamples.length; ++i)
+ $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig"))
+ $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.joinedEventsCount != null && Object.hasOwnProperty.call(message, "joinedEventsCount"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.joinedEventsCount);
+ if (message.unjoinedEventsCount != null && Object.hasOwnProperty.call(message, "unjoinedEventsCount"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unjoinedEventsCount);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportUserEventsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ImportUserEventsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportUserEventsResponse.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.discoveryengine.v1beta.ImportUserEventsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.errorSamples && message.errorSamples.length))
+ message.errorSamples = [];
+ message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.joinedEventsCount = reader.int64();
+ break;
+ }
+ case 4: {
+ message.unjoinedEventsCount = reader.int64();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportUserEventsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ImportUserEventsResponse message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ImportUserEventsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) {
+ if (!Array.isArray(message.errorSamples))
+ return "errorSamples: array expected";
+ for (var i = 0; i < message.errorSamples.length; ++i) {
+ var error = $root.google.rpc.Status.verify(message.errorSamples[i]);
+ if (error)
+ return "errorSamples." + error;
+ }
+ }
+ if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig);
+ if (error)
+ return "errorConfig." + error;
+ }
+ if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount"))
+ if (!$util.isInteger(message.joinedEventsCount) && !(message.joinedEventsCount && $util.isInteger(message.joinedEventsCount.low) && $util.isInteger(message.joinedEventsCount.high)))
+ return "joinedEventsCount: integer|Long expected";
+ if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount"))
+ if (!$util.isInteger(message.unjoinedEventsCount) && !(message.unjoinedEventsCount && $util.isInteger(message.unjoinedEventsCount.low) && $util.isInteger(message.unjoinedEventsCount.high)))
+ return "unjoinedEventsCount: integer|Long expected";
+ return null;
+ };
+
+ /**
+ * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse
+ */
+ ImportUserEventsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse();
+ if (object.errorSamples) {
+ if (!Array.isArray(object.errorSamples))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: array expected");
+ message.errorSamples = [];
+ for (var i = 0; i < object.errorSamples.length; ++i) {
+ if (typeof object.errorSamples[i] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: object expected");
+ message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]);
+ }
+ }
+ if (object.errorConfig != null) {
+ if (typeof object.errorConfig !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorConfig: object expected");
+ message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig);
+ }
+ if (object.joinedEventsCount != null)
+ if ($util.Long)
+ (message.joinedEventsCount = $util.Long.fromValue(object.joinedEventsCount)).unsigned = false;
+ else if (typeof object.joinedEventsCount === "string")
+ message.joinedEventsCount = parseInt(object.joinedEventsCount, 10);
+ else if (typeof object.joinedEventsCount === "number")
+ message.joinedEventsCount = object.joinedEventsCount;
+ else if (typeof object.joinedEventsCount === "object")
+ message.joinedEventsCount = new $util.LongBits(object.joinedEventsCount.low >>> 0, object.joinedEventsCount.high >>> 0).toNumber();
+ if (object.unjoinedEventsCount != null)
+ if ($util.Long)
+ (message.unjoinedEventsCount = $util.Long.fromValue(object.unjoinedEventsCount)).unsigned = false;
+ else if (typeof object.unjoinedEventsCount === "string")
+ message.unjoinedEventsCount = parseInt(object.unjoinedEventsCount, 10);
+ else if (typeof object.unjoinedEventsCount === "number")
+ message.unjoinedEventsCount = object.unjoinedEventsCount;
+ else if (typeof object.unjoinedEventsCount === "object")
+ message.unjoinedEventsCount = new $util.LongBits(object.unjoinedEventsCount.low >>> 0, object.unjoinedEventsCount.high >>> 0).toNumber();
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} message ImportUserEventsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ImportUserEventsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.errorSamples = [];
+ if (options.defaults) {
+ object.errorConfig = null;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.joinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.joinedEventsCount = options.longs === String ? "0" : 0;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.unjoinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.unjoinedEventsCount = options.longs === String ? "0" : 0;
+ }
+ if (message.errorSamples && message.errorSamples.length) {
+ object.errorSamples = [];
+ for (var j = 0; j < message.errorSamples.length; ++j)
+ object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options);
+ }
+ if (message.errorConfig != null && message.hasOwnProperty("errorConfig"))
+ object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options);
+ if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount"))
+ if (typeof message.joinedEventsCount === "number")
+ object.joinedEventsCount = options.longs === String ? String(message.joinedEventsCount) : message.joinedEventsCount;
+ else
+ object.joinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.joinedEventsCount) : options.longs === Number ? new $util.LongBits(message.joinedEventsCount.low >>> 0, message.joinedEventsCount.high >>> 0).toNumber() : message.joinedEventsCount;
+ if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount"))
+ if (typeof message.unjoinedEventsCount === "number")
+ object.unjoinedEventsCount = options.longs === String ? String(message.unjoinedEventsCount) : message.unjoinedEventsCount;
+ else
+ object.unjoinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unjoinedEventsCount) : options.longs === Number ? new $util.LongBits(message.unjoinedEventsCount.low >>> 0, message.unjoinedEventsCount.high >>> 0).toNumber() : message.unjoinedEventsCount;
+ return object;
+ };
+
+ /**
+ * Converts this ImportUserEventsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ImportUserEventsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ImportUserEventsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ImportUserEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsResponse";
+ };
+
+ return ImportUserEventsResponse;
+ })();
+
+ v1beta.ImportUserEventsMetadata = (function() {
+
+ /**
+ * Properties of an ImportUserEventsMetadata.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IImportUserEventsMetadata
+ * @property {google.protobuf.ITimestamp|null} [createTime] ImportUserEventsMetadata createTime
+ * @property {google.protobuf.ITimestamp|null} [updateTime] ImportUserEventsMetadata updateTime
+ * @property {number|Long|null} [successCount] ImportUserEventsMetadata successCount
+ * @property {number|Long|null} [failureCount] ImportUserEventsMetadata failureCount
+ */
+
+ /**
+ * Constructs a new ImportUserEventsMetadata.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents an ImportUserEventsMetadata.
+ * @implements IImportUserEventsMetadata
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata=} [properties] Properties to set
+ */
+ function ImportUserEventsMetadata(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]];
+ }
+
+ /**
+ * ImportUserEventsMetadata createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @instance
+ */
+ ImportUserEventsMetadata.prototype.createTime = null;
+
+ /**
+ * ImportUserEventsMetadata updateTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} updateTime
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @instance
+ */
+ ImportUserEventsMetadata.prototype.updateTime = null;
+
+ /**
+ * ImportUserEventsMetadata successCount.
+ * @member {number|Long} successCount
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @instance
+ */
+ ImportUserEventsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * ImportUserEventsMetadata failureCount.
+ * @member {number|Long} failureCount
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @instance
+ */
+ ImportUserEventsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * Creates a new ImportUserEventsMetadata instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata instance
+ */
+ ImportUserEventsMetadata.create = function create(properties) {
+ return new ImportUserEventsMetadata(properties);
+ };
+
+ /**
+ * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportUserEventsMetadata.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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
+ $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount);
+ if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportUserEventsMetadata.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ImportUserEventsMetadata message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportUserEventsMetadata.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.discoveryengine.v1beta.ImportUserEventsMetadata();
+ 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.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.successCount = reader.int64();
+ break;
+ }
+ case 4: {
+ message.failureCount = reader.int64();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportUserEventsMetadata.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ImportUserEventsMetadata message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ImportUserEventsMetadata.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.updateTime != null && message.hasOwnProperty("updateTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
+ if (error)
+ return "updateTime." + error;
+ }
+ if (message.successCount != null && message.hasOwnProperty("successCount"))
+ if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high)))
+ return "successCount: integer|Long expected";
+ if (message.failureCount != null && message.hasOwnProperty("failureCount"))
+ if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high)))
+ return "failureCount: integer|Long expected";
+ return null;
+ };
+
+ /**
+ * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata
+ */
+ ImportUserEventsMetadata.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata();
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.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.discoveryengine.v1beta.ImportUserEventsMetadata.updateTime: object expected");
+ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
+ }
+ if (object.successCount != null)
+ if ($util.Long)
+ (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false;
+ else if (typeof object.successCount === "string")
+ message.successCount = parseInt(object.successCount, 10);
+ else if (typeof object.successCount === "number")
+ message.successCount = object.successCount;
+ else if (typeof object.successCount === "object")
+ message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber();
+ if (object.failureCount != null)
+ if ($util.Long)
+ (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false;
+ else if (typeof object.failureCount === "string")
+ message.failureCount = parseInt(object.failureCount, 10);
+ else if (typeof object.failureCount === "number")
+ message.failureCount = object.failureCount;
+ else if (typeof object.failureCount === "object")
+ message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber();
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} message ImportUserEventsMetadata
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ImportUserEventsMetadata.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.createTime = null;
+ object.updateTime = null;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.successCount = options.longs === String ? "0" : 0;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.failureCount = options.longs === String ? "0" : 0;
+ }
+ 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.successCount != null && message.hasOwnProperty("successCount"))
+ if (typeof message.successCount === "number")
+ object.successCount = options.longs === String ? String(message.successCount) : message.successCount;
+ else
+ object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount;
+ if (message.failureCount != null && message.hasOwnProperty("failureCount"))
+ if (typeof message.failureCount === "number")
+ object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount;
+ else
+ object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount;
+ return object;
+ };
+
+ /**
+ * Converts this ImportUserEventsMetadata to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ImportUserEventsMetadata.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ImportUserEventsMetadata
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ImportUserEventsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata";
+ };
+
+ return ImportUserEventsMetadata;
+ })();
+
+ v1beta.ImportDocumentsMetadata = (function() {
+
+ /**
+ * Properties of an ImportDocumentsMetadata.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IImportDocumentsMetadata
+ * @property {google.protobuf.ITimestamp|null} [createTime] ImportDocumentsMetadata createTime
+ * @property {google.protobuf.ITimestamp|null} [updateTime] ImportDocumentsMetadata updateTime
+ * @property {number|Long|null} [successCount] ImportDocumentsMetadata successCount
+ * @property {number|Long|null} [failureCount] ImportDocumentsMetadata failureCount
+ */
+
+ /**
+ * Constructs a new ImportDocumentsMetadata.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents an ImportDocumentsMetadata.
+ * @implements IImportDocumentsMetadata
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata=} [properties] Properties to set
+ */
+ function ImportDocumentsMetadata(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]];
+ }
+
+ /**
+ * ImportDocumentsMetadata createTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} createTime
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @instance
+ */
+ ImportDocumentsMetadata.prototype.createTime = null;
+
+ /**
+ * ImportDocumentsMetadata updateTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} updateTime
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @instance
+ */
+ ImportDocumentsMetadata.prototype.updateTime = null;
+
+ /**
+ * ImportDocumentsMetadata successCount.
+ * @member {number|Long} successCount
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @instance
+ */
+ ImportDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * ImportDocumentsMetadata failureCount.
+ * @member {number|Long} failureCount
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @instance
+ */
+ ImportDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
+
+ /**
+ * Creates a new ImportDocumentsMetadata instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata instance
+ */
+ ImportDocumentsMetadata.create = function create(properties) {
+ return new ImportDocumentsMetadata(properties);
+ };
+
+ /**
+ * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportDocumentsMetadata.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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
+ $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount);
+ if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ImportDocumentsMetadata message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportDocumentsMetadata.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.discoveryengine.v1beta.ImportDocumentsMetadata();
+ 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.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.successCount = reader.int64();
+ break;
+ }
+ case 4: {
+ message.failureCount = reader.int64();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ImportDocumentsMetadata message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ImportDocumentsMetadata.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.updateTime != null && message.hasOwnProperty("updateTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
+ if (error)
+ return "updateTime." + error;
+ }
+ if (message.successCount != null && message.hasOwnProperty("successCount"))
+ if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high)))
+ return "successCount: integer|Long expected";
+ if (message.failureCount != null && message.hasOwnProperty("failureCount"))
+ if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high)))
+ return "failureCount: integer|Long expected";
+ return null;
+ };
+
+ /**
+ * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata
+ */
+ ImportDocumentsMetadata.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata();
+ if (object.createTime != null) {
+ if (typeof object.createTime !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.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.discoveryengine.v1beta.ImportDocumentsMetadata.updateTime: object expected");
+ message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
+ }
+ if (object.successCount != null)
+ if ($util.Long)
+ (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false;
+ else if (typeof object.successCount === "string")
+ message.successCount = parseInt(object.successCount, 10);
+ else if (typeof object.successCount === "number")
+ message.successCount = object.successCount;
+ else if (typeof object.successCount === "object")
+ message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber();
+ if (object.failureCount != null)
+ if ($util.Long)
+ (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false;
+ else if (typeof object.failureCount === "string")
+ message.failureCount = parseInt(object.failureCount, 10);
+ else if (typeof object.failureCount === "number")
+ message.failureCount = object.failureCount;
+ else if (typeof object.failureCount === "object")
+ message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber();
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} message ImportDocumentsMetadata
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ImportDocumentsMetadata.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.createTime = null;
+ object.updateTime = null;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.successCount = options.longs === String ? "0" : 0;
+ if ($util.Long) {
+ var long = new $util.Long(0, 0, false);
+ object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
+ } else
+ object.failureCount = options.longs === String ? "0" : 0;
+ }
+ 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.successCount != null && message.hasOwnProperty("successCount"))
+ if (typeof message.successCount === "number")
+ object.successCount = options.longs === String ? String(message.successCount) : message.successCount;
+ else
+ object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount;
+ if (message.failureCount != null && message.hasOwnProperty("failureCount"))
+ if (typeof message.failureCount === "number")
+ object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount;
+ else
+ object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount;
+ return object;
+ };
+
+ /**
+ * Converts this ImportDocumentsMetadata to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ImportDocumentsMetadata.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ImportDocumentsMetadata
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ImportDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata";
+ };
+
+ return ImportDocumentsMetadata;
+ })();
+
+ v1beta.ImportDocumentsRequest = (function() {
+
+ /**
+ * Properties of an ImportDocumentsRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IImportDocumentsRequest
+ * @property {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null} [inlineSource] ImportDocumentsRequest inlineSource
+ * @property {google.cloud.discoveryengine.v1beta.IGcsSource|null} [gcsSource] ImportDocumentsRequest gcsSource
+ * @property {google.cloud.discoveryengine.v1beta.IBigQuerySource|null} [bigquerySource] ImportDocumentsRequest bigquerySource
+ * @property {string|null} [parent] ImportDocumentsRequest parent
+ * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportDocumentsRequest errorConfig
+ * @property {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|null} [reconciliationMode] ImportDocumentsRequest reconciliationMode
+ */
+
+ /**
+ * Constructs a new ImportDocumentsRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents an ImportDocumentsRequest.
+ * @implements IImportDocumentsRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest=} [properties] Properties to set
+ */
+ function ImportDocumentsRequest(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]];
+ }
+
+ /**
+ * ImportDocumentsRequest inlineSource.
+ * @member {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null|undefined} inlineSource
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @instance
+ */
+ ImportDocumentsRequest.prototype.inlineSource = null;
+
+ /**
+ * ImportDocumentsRequest gcsSource.
+ * @member {google.cloud.discoveryengine.v1beta.IGcsSource|null|undefined} gcsSource
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @instance
+ */
+ ImportDocumentsRequest.prototype.gcsSource = null;
+
+ /**
+ * ImportDocumentsRequest bigquerySource.
+ * @member {google.cloud.discoveryengine.v1beta.IBigQuerySource|null|undefined} bigquerySource
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @instance
+ */
+ ImportDocumentsRequest.prototype.bigquerySource = null;
+
+ /**
+ * ImportDocumentsRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @instance
+ */
+ ImportDocumentsRequest.prototype.parent = "";
+
+ /**
+ * ImportDocumentsRequest errorConfig.
+ * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @instance
+ */
+ ImportDocumentsRequest.prototype.errorConfig = null;
+
+ /**
+ * ImportDocumentsRequest reconciliationMode.
+ * @member {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode} reconciliationMode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @instance
+ */
+ ImportDocumentsRequest.prototype.reconciliationMode = 0;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * ImportDocumentsRequest source.
+ * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @instance
+ */
+ Object.defineProperty(ImportDocumentsRequest.prototype, "source", {
+ get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new ImportDocumentsRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest instance
+ */
+ ImportDocumentsRequest.create = function create(properties) {
+ return new ImportDocumentsRequest(properties);
+ };
+
+ /**
+ * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportDocumentsRequest.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.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource"))
+ $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
+ $root.google.cloud.discoveryengine.v1beta.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource"))
+ $root.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig"))
+ $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
+ if (message.reconciliationMode != null && Object.hasOwnProperty.call(message, "reconciliationMode"))
+ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.reconciliationMode);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ImportDocumentsRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportDocumentsRequest.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.discoveryengine.v1beta.ImportDocumentsRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(reader, reader.uint32());
+ break;
+ }
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 5: {
+ message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32());
+ break;
+ }
+ case 6: {
+ message.reconciliationMode = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportDocumentsRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ImportDocumentsRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ImportDocumentsRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) {
+ properties.source = 1;
+ {
+ var error = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify(message.inlineSource);
+ if (error)
+ return "inlineSource." + error;
+ }
+ }
+ if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
+ if (properties.source === 1)
+ return "source: multiple values";
+ properties.source = 1;
+ {
+ var error = $root.google.cloud.discoveryengine.v1beta.GcsSource.verify(message.gcsSource);
+ if (error)
+ return "gcsSource." + error;
+ }
+ }
+ if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) {
+ if (properties.source === 1)
+ return "source: multiple values";
+ properties.source = 1;
+ {
+ var error = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(message.bigquerySource);
+ if (error)
+ return "bigquerySource." + error;
+ }
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig);
+ if (error)
+ return "errorConfig." + error;
+ }
+ if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode"))
+ switch (message.reconciliationMode) {
+ default:
+ return "reconciliationMode: enum value expected";
+ case 0:
+ case 1:
+ case 2:
+ break;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest
+ */
+ ImportDocumentsRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest();
+ if (object.inlineSource != null) {
+ if (typeof object.inlineSource !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.inlineSource: object expected");
+ message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.fromObject(object.inlineSource);
+ }
+ if (object.gcsSource != null) {
+ if (typeof object.gcsSource !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.gcsSource: object expected");
+ message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(object.gcsSource);
+ }
+ if (object.bigquerySource != null) {
+ if (typeof object.bigquerySource !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.bigquerySource: object expected");
+ message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(object.bigquerySource);
+ }
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.errorConfig != null) {
+ if (typeof object.errorConfig !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.errorConfig: object expected");
+ message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig);
+ }
+ switch (object.reconciliationMode) {
+ case "RECONCILIATION_MODE_UNSPECIFIED":
+ case 0:
+ message.reconciliationMode = 0;
+ break;
+ case "INCREMENTAL":
+ case 1:
+ message.reconciliationMode = 1;
+ break;
+ case "FULL":
+ case 2:
+ message.reconciliationMode = 2;
+ break;
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} message ImportDocumentsRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ImportDocumentsRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.errorConfig = null;
+ object.reconciliationMode = options.enums === String ? "RECONCILIATION_MODE_UNSPECIFIED" : 0;
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) {
+ object.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.toObject(message.inlineSource, options);
+ if (options.oneofs)
+ object.source = "inlineSource";
+ }
+ if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
+ object.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.toObject(message.gcsSource, options);
+ if (options.oneofs)
+ object.source = "gcsSource";
+ }
+ if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) {
+ object.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(message.bigquerySource, options);
+ if (options.oneofs)
+ object.source = "bigquerySource";
+ }
+ if (message.errorConfig != null && message.hasOwnProperty("errorConfig"))
+ object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options);
+ if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode"))
+ object.reconciliationMode = options.enums === String ? $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] : message.reconciliationMode;
+ return object;
+ };
+
+ /**
+ * Converts this ImportDocumentsRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ImportDocumentsRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ImportDocumentsRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ImportDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsRequest";
+ };
+
+ ImportDocumentsRequest.InlineSource = (function() {
+
+ /**
+ * Properties of an InlineSource.
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @interface IInlineSource
+ * @property {Array.|null} [documents] InlineSource documents
+ */
+
+ /**
+ * Constructs a new InlineSource.
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest
+ * @classdesc Represents an InlineSource.
+ * @implements IInlineSource
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set
+ */
+ function InlineSource(properties) {
+ this.documents = [];
+ 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]];
+ }
+
+ /**
+ * InlineSource documents.
+ * @member {Array.} documents
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @instance
+ */
+ InlineSource.prototype.documents = $util.emptyArray;
+
+ /**
+ * Creates a new InlineSource instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource instance
+ */
+ InlineSource.create = function create(properties) {
+ return new InlineSource(properties);
+ };
+
+ /**
+ * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ InlineSource.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.documents != null && message.documents.length)
+ for (var i = 0; i < message.documents.length; ++i)
+ $root.google.cloud.discoveryengine.v1beta.Document.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ InlineSource.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an InlineSource message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ InlineSource.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.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.documents && message.documents.length))
+ message.documents = [];
+ message.documents.push($root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an InlineSource message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ InlineSource.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an InlineSource message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ InlineSource.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.documents != null && message.hasOwnProperty("documents")) {
+ if (!Array.isArray(message.documents))
+ return "documents: array expected";
+ for (var i = 0; i < message.documents.length; ++i) {
+ var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.documents[i]);
+ if (error)
+ return "documents." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates an InlineSource message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource
+ */
+ InlineSource.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource();
+ if (object.documents) {
+ if (!Array.isArray(object.documents))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: array expected");
+ message.documents = [];
+ for (var i = 0; i < object.documents.length; ++i) {
+ if (typeof object.documents[i] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: object expected");
+ message.documents[i] = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.documents[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an InlineSource message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} message InlineSource
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ InlineSource.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.documents = [];
+ if (message.documents && message.documents.length) {
+ object.documents = [];
+ for (var j = 0; j < message.documents.length; ++j)
+ object.documents[j] = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.documents[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this InlineSource to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ InlineSource.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for InlineSource
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource";
+ };
+
+ return InlineSource;
+ })();
+
+ /**
+ * ReconciliationMode enum.
+ * @name google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode
+ * @enum {number}
+ * @property {number} RECONCILIATION_MODE_UNSPECIFIED=0 RECONCILIATION_MODE_UNSPECIFIED value
+ * @property {number} INCREMENTAL=1 INCREMENTAL value
+ * @property {number} FULL=2 FULL value
+ */
+ ImportDocumentsRequest.ReconciliationMode = (function() {
+ var valuesById = {}, values = Object.create(valuesById);
+ values[valuesById[0] = "RECONCILIATION_MODE_UNSPECIFIED"] = 0;
+ values[valuesById[1] = "INCREMENTAL"] = 1;
+ values[valuesById[2] = "FULL"] = 2;
+ return values;
+ })();
+
+ return ImportDocumentsRequest;
+ })();
+
+ v1beta.ImportDocumentsResponse = (function() {
+
+ /**
+ * Properties of an ImportDocumentsResponse.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IImportDocumentsResponse
+ * @property {Array.|null} [errorSamples] ImportDocumentsResponse errorSamples
+ * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportDocumentsResponse errorConfig
+ */
+
+ /**
+ * Constructs a new ImportDocumentsResponse.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents an ImportDocumentsResponse.
+ * @implements IImportDocumentsResponse
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse=} [properties] Properties to set
+ */
+ function ImportDocumentsResponse(properties) {
+ this.errorSamples = [];
+ 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]];
+ }
+
+ /**
+ * ImportDocumentsResponse errorSamples.
+ * @member {Array.} errorSamples
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @instance
+ */
+ ImportDocumentsResponse.prototype.errorSamples = $util.emptyArray;
+
+ /**
+ * ImportDocumentsResponse errorConfig.
+ * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @instance
+ */
+ ImportDocumentsResponse.prototype.errorConfig = null;
+
+ /**
+ * Creates a new ImportDocumentsResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse instance
+ */
+ ImportDocumentsResponse.create = function create(properties) {
+ return new ImportDocumentsResponse(properties);
+ };
+
+ /**
+ * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportDocumentsResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.errorSamples != null && message.errorSamples.length)
+ for (var i = 0; i < message.errorSamples.length; ++i)
+ $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig"))
+ $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ ImportDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes an ImportDocumentsResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportDocumentsResponse.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.discoveryengine.v1beta.ImportDocumentsResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.errorSamples && message.errorSamples.length))
+ message.errorSamples = [];
+ message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ ImportDocumentsResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies an ImportDocumentsResponse message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ ImportDocumentsResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) {
+ if (!Array.isArray(message.errorSamples))
+ return "errorSamples: array expected";
+ for (var i = 0; i < message.errorSamples.length; ++i) {
+ var error = $root.google.rpc.Status.verify(message.errorSamples[i]);
+ if (error)
+ return "errorSamples." + error;
+ }
+ }
+ if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig);
+ if (error)
+ return "errorConfig." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse
+ */
+ ImportDocumentsResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse();
+ if (object.errorSamples) {
+ if (!Array.isArray(object.errorSamples))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: array expected");
+ message.errorSamples = [];
+ for (var i = 0; i < object.errorSamples.length; ++i) {
+ if (typeof object.errorSamples[i] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: object expected");
+ message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]);
+ }
+ }
+ if (object.errorConfig != null) {
+ if (typeof object.errorConfig !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorConfig: object expected");
+ message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} message ImportDocumentsResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ ImportDocumentsResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.errorSamples = [];
+ if (options.defaults)
+ object.errorConfig = null;
+ if (message.errorSamples && message.errorSamples.length) {
+ object.errorSamples = [];
+ for (var j = 0; j < message.errorSamples.length; ++j)
+ object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options);
+ }
+ if (message.errorConfig != null && message.hasOwnProperty("errorConfig"))
+ object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options);
+ return object;
+ };
+
+ /**
+ * Converts this ImportDocumentsResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ ImportDocumentsResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for ImportDocumentsResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ ImportDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsResponse";
+ };
+
+ return ImportDocumentsResponse;
+ })();
+
+ v1beta.UserEvent = (function() {
+
+ /**
+ * Properties of a UserEvent.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IUserEvent
+ * @property {string|null} [eventType] UserEvent eventType
+ * @property {string|null} [userPseudoId] UserEvent userPseudoId
+ * @property {google.protobuf.ITimestamp|null} [eventTime] UserEvent eventTime
+ * @property {google.cloud.discoveryengine.v1beta.IUserInfo|null} [userInfo] UserEvent userInfo
+ * @property {boolean|null} [directUserRequest] UserEvent directUserRequest
+ * @property {string|null} [sessionId] UserEvent sessionId
+ * @property {google.cloud.discoveryengine.v1beta.IPageInfo|null} [pageInfo] UserEvent pageInfo
+ * @property {string|null} [attributionToken] UserEvent attributionToken
+ * @property {string|null} [filter] UserEvent filter
+ * @property {Array.|null} [documents] UserEvent documents
+ * @property {google.cloud.discoveryengine.v1beta.IPanelInfo|null} [panel] UserEvent panel
+ * @property {google.cloud.discoveryengine.v1beta.ISearchInfo|null} [searchInfo] UserEvent searchInfo
+ * @property {google.cloud.discoveryengine.v1beta.ICompletionInfo|null} [completionInfo] UserEvent completionInfo
+ * @property {google.cloud.discoveryengine.v1beta.ITransactionInfo|null} [transactionInfo] UserEvent transactionInfo
+ * @property {Array.|null} [tagIds] UserEvent tagIds
+ * @property {Array.|null} [promotionIds] UserEvent promotionIds
+ * @property {Object.|null} [attributes] UserEvent attributes
+ * @property {google.cloud.discoveryengine.v1beta.IMediaInfo|null} [mediaInfo] UserEvent mediaInfo
+ */
+
+ /**
+ * Constructs a new UserEvent.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a UserEvent.
+ * @implements IUserEvent
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IUserEvent=} [properties] Properties to set
+ */
+ function UserEvent(properties) {
+ this.documents = [];
+ this.tagIds = [];
+ this.promotionIds = [];
+ this.attributes = {};
+ 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]];
+ }
+
+ /**
+ * UserEvent eventType.
+ * @member {string} eventType
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.eventType = "";
+
+ /**
+ * UserEvent userPseudoId.
+ * @member {string} userPseudoId
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.userPseudoId = "";
+
+ /**
+ * UserEvent eventTime.
+ * @member {google.protobuf.ITimestamp|null|undefined} eventTime
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.eventTime = null;
+
+ /**
+ * UserEvent userInfo.
+ * @member {google.cloud.discoveryengine.v1beta.IUserInfo|null|undefined} userInfo
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.userInfo = null;
+
+ /**
+ * UserEvent directUserRequest.
+ * @member {boolean} directUserRequest
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.directUserRequest = false;
+
+ /**
+ * UserEvent sessionId.
+ * @member {string} sessionId
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.sessionId = "";
+
+ /**
+ * UserEvent pageInfo.
+ * @member {google.cloud.discoveryengine.v1beta.IPageInfo|null|undefined} pageInfo
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.pageInfo = null;
+
+ /**
+ * UserEvent attributionToken.
+ * @member {string} attributionToken
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.attributionToken = "";
+
+ /**
+ * UserEvent filter.
+ * @member {string} filter
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.filter = "";
+
+ /**
+ * UserEvent documents.
+ * @member {Array.} documents
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.documents = $util.emptyArray;
+
+ /**
+ * UserEvent panel.
+ * @member {google.cloud.discoveryengine.v1beta.IPanelInfo|null|undefined} panel
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.panel = null;
+
+ /**
+ * UserEvent searchInfo.
+ * @member {google.cloud.discoveryengine.v1beta.ISearchInfo|null|undefined} searchInfo
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.searchInfo = null;
+
+ /**
+ * UserEvent completionInfo.
+ * @member {google.cloud.discoveryengine.v1beta.ICompletionInfo|null|undefined} completionInfo
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.completionInfo = null;
+
+ /**
+ * UserEvent transactionInfo.
+ * @member {google.cloud.discoveryengine.v1beta.ITransactionInfo|null|undefined} transactionInfo
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.transactionInfo = null;
+
+ /**
+ * UserEvent tagIds.
+ * @member {Array.} tagIds
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.tagIds = $util.emptyArray;
+
+ /**
+ * UserEvent promotionIds.
+ * @member {Array.} promotionIds
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.promotionIds = $util.emptyArray;
+
+ /**
+ * UserEvent attributes.
+ * @member {Object.} attributes
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.attributes = $util.emptyObject;
+
+ /**
+ * UserEvent mediaInfo.
+ * @member {google.cloud.discoveryengine.v1beta.IMediaInfo|null|undefined} mediaInfo
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ */
+ UserEvent.prototype.mediaInfo = null;
+
+ /**
+ * Creates a new UserEvent instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IUserEvent=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent instance
+ */
+ UserEvent.create = function create(properties) {
+ return new UserEvent(properties);
+ };
+
+ /**
+ * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IUserEvent} message UserEvent message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UserEvent.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventType);
+ if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.userPseudoId);
+ if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime"))
+ $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ if (message.userInfo != null && Object.hasOwnProperty.call(message, "userInfo"))
+ $root.google.cloud.discoveryengine.v1beta.UserInfo.encode(message.userInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
+ if (message.directUserRequest != null && Object.hasOwnProperty.call(message, "directUserRequest"))
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.directUserRequest);
+ if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId"))
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.sessionId);
+ if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo"))
+ $root.google.cloud.discoveryengine.v1beta.PageInfo.encode(message.pageInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
+ if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken"))
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.attributionToken);
+ if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.filter);
+ if (message.documents != null && message.documents.length)
+ for (var i = 0; i < message.documents.length; ++i)
+ $root.google.cloud.discoveryengine.v1beta.DocumentInfo.encode(message.documents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
+ if (message.panel != null && Object.hasOwnProperty.call(message, "panel"))
+ $root.google.cloud.discoveryengine.v1beta.PanelInfo.encode(message.panel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
+ if (message.searchInfo != null && Object.hasOwnProperty.call(message, "searchInfo"))
+ $root.google.cloud.discoveryengine.v1beta.SearchInfo.encode(message.searchInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
+ if (message.completionInfo != null && Object.hasOwnProperty.call(message, "completionInfo"))
+ $root.google.cloud.discoveryengine.v1beta.CompletionInfo.encode(message.completionInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
+ if (message.transactionInfo != null && Object.hasOwnProperty.call(message, "transactionInfo"))
+ $root.google.cloud.discoveryengine.v1beta.TransactionInfo.encode(message.transactionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
+ if (message.tagIds != null && message.tagIds.length)
+ for (var i = 0; i < message.tagIds.length; ++i)
+ writer.uint32(/* id 15, wireType 2 =*/122).string(message.tagIds[i]);
+ if (message.promotionIds != null && message.promotionIds.length)
+ for (var i = 0; i < message.promotionIds.length; ++i)
+ writer.uint32(/* id 16, wireType 2 =*/130).string(message.promotionIds[i]);
+ if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes"))
+ for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) {
+ writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
+ $root.google.cloud.discoveryengine.v1beta.CustomAttribute.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
+ }
+ if (message.mediaInfo != null && Object.hasOwnProperty.call(message, "mediaInfo"))
+ $root.google.cloud.discoveryengine.v1beta.MediaInfo.encode(message.mediaInfo, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IUserEvent} message UserEvent message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ UserEvent.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a UserEvent message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UserEvent.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.discoveryengine.v1beta.UserEvent(), key, value;
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.eventType = reader.string();
+ break;
+ }
+ case 2: {
+ message.userPseudoId = reader.string();
+ break;
+ }
+ case 3: {
+ message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
+ break;
+ }
+ case 4: {
+ message.userInfo = $root.google.cloud.discoveryengine.v1beta.UserInfo.decode(reader, reader.uint32());
+ break;
+ }
+ case 5: {
+ message.directUserRequest = reader.bool();
+ break;
+ }
+ case 6: {
+ message.sessionId = reader.string();
+ break;
+ }
+ case 7: {
+ message.pageInfo = $root.google.cloud.discoveryengine.v1beta.PageInfo.decode(reader, reader.uint32());
+ break;
+ }
+ case 8: {
+ message.attributionToken = reader.string();
+ break;
+ }
+ case 9: {
+ message.filter = reader.string();
+ break;
+ }
+ case 10: {
+ if (!(message.documents && message.documents.length))
+ message.documents = [];
+ message.documents.push($root.google.cloud.discoveryengine.v1beta.DocumentInfo.decode(reader, reader.uint32()));
+ break;
+ }
+ case 11: {
+ message.panel = $root.google.cloud.discoveryengine.v1beta.PanelInfo.decode(reader, reader.uint32());
+ break;
+ }
+ case 12: {
+ message.searchInfo = $root.google.cloud.discoveryengine.v1beta.SearchInfo.decode(reader, reader.uint32());
+ break;
+ }
+ case 13: {
+ message.completionInfo = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.decode(reader, reader.uint32());
+ break;
+ }
+ case 14: {
+ message.transactionInfo = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.decode(reader, reader.uint32());
+ break;
+ }
+ case 15: {
+ if (!(message.tagIds && message.tagIds.length))
+ message.tagIds = [];
+ message.tagIds.push(reader.string());
+ break;
+ }
+ case 16: {
+ if (!(message.promotionIds && message.promotionIds.length))
+ message.promotionIds = [];
+ message.promotionIds.push(reader.string());
+ break;
+ }
+ case 17: {
+ if (message.attributes === $util.emptyObject)
+ message.attributes = {};
+ 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.discoveryengine.v1beta.CustomAttribute.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.attributes[key] = value;
+ break;
+ }
+ case 18: {
+ message.mediaInfo = $root.google.cloud.discoveryengine.v1beta.MediaInfo.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a UserEvent message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ UserEvent.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a UserEvent message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ UserEvent.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.eventType != null && message.hasOwnProperty("eventType"))
+ if (!$util.isString(message.eventType))
+ return "eventType: string expected";
+ if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId"))
+ if (!$util.isString(message.userPseudoId))
+ return "userPseudoId: string expected";
+ if (message.eventTime != null && message.hasOwnProperty("eventTime")) {
+ var error = $root.google.protobuf.Timestamp.verify(message.eventTime);
+ if (error)
+ return "eventTime." + error;
+ }
+ if (message.userInfo != null && message.hasOwnProperty("userInfo")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.UserInfo.verify(message.userInfo);
+ if (error)
+ return "userInfo." + error;
+ }
+ if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest"))
+ if (typeof message.directUserRequest !== "boolean")
+ return "directUserRequest: boolean expected";
+ if (message.sessionId != null && message.hasOwnProperty("sessionId"))
+ if (!$util.isString(message.sessionId))
+ return "sessionId: string expected";
+ if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.PageInfo.verify(message.pageInfo);
+ if (error)
+ return "pageInfo." + error;
+ }
+ if (message.attributionToken != null && message.hasOwnProperty("attributionToken"))
+ if (!$util.isString(message.attributionToken))
+ return "attributionToken: string expected";
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ if (!$util.isString(message.filter))
+ return "filter: string expected";
+ if (message.documents != null && message.hasOwnProperty("documents")) {
+ if (!Array.isArray(message.documents))
+ return "documents: array expected";
+ for (var i = 0; i < message.documents.length; ++i) {
+ var error = $root.google.cloud.discoveryengine.v1beta.DocumentInfo.verify(message.documents[i]);
+ if (error)
+ return "documents." + error;
+ }
+ }
+ if (message.panel != null && message.hasOwnProperty("panel")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.PanelInfo.verify(message.panel);
+ if (error)
+ return "panel." + error;
+ }
+ if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.SearchInfo.verify(message.searchInfo);
+ if (error)
+ return "searchInfo." + error;
+ }
+ if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.verify(message.completionInfo);
+ if (error)
+ return "completionInfo." + error;
+ }
+ if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.verify(message.transactionInfo);
+ if (error)
+ return "transactionInfo." + error;
+ }
+ if (message.tagIds != null && message.hasOwnProperty("tagIds")) {
+ if (!Array.isArray(message.tagIds))
+ return "tagIds: array expected";
+ for (var i = 0; i < message.tagIds.length; ++i)
+ if (!$util.isString(message.tagIds[i]))
+ return "tagIds: string[] expected";
+ }
+ if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) {
+ if (!Array.isArray(message.promotionIds))
+ return "promotionIds: array expected";
+ for (var i = 0; i < message.promotionIds.length; ++i)
+ if (!$util.isString(message.promotionIds[i]))
+ return "promotionIds: string[] expected";
+ }
+ if (message.attributes != null && message.hasOwnProperty("attributes")) {
+ if (!$util.isObject(message.attributes))
+ return "attributes: object expected";
+ var key = Object.keys(message.attributes);
+ for (var i = 0; i < key.length; ++i) {
+ var error = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.verify(message.attributes[key[i]]);
+ if (error)
+ return "attributes." + error;
+ }
+ }
+ if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.MediaInfo.verify(message.mediaInfo);
+ if (error)
+ return "mediaInfo." + error;
+ }
+ return null;
+ };
+
+ /**
+ * Creates a UserEvent message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent
+ */
+ UserEvent.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.UserEvent)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.UserEvent();
+ if (object.eventType != null)
+ message.eventType = String(object.eventType);
+ if (object.userPseudoId != null)
+ message.userPseudoId = String(object.userPseudoId);
+ if (object.eventTime != null) {
+ if (typeof object.eventTime !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.eventTime: object expected");
+ message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime);
+ }
+ if (object.userInfo != null) {
+ if (typeof object.userInfo !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.userInfo: object expected");
+ message.userInfo = $root.google.cloud.discoveryengine.v1beta.UserInfo.fromObject(object.userInfo);
+ }
+ if (object.directUserRequest != null)
+ message.directUserRequest = Boolean(object.directUserRequest);
+ if (object.sessionId != null)
+ message.sessionId = String(object.sessionId);
+ if (object.pageInfo != null) {
+ if (typeof object.pageInfo !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.pageInfo: object expected");
+ message.pageInfo = $root.google.cloud.discoveryengine.v1beta.PageInfo.fromObject(object.pageInfo);
+ }
+ if (object.attributionToken != null)
+ message.attributionToken = String(object.attributionToken);
+ if (object.filter != null)
+ message.filter = String(object.filter);
+ if (object.documents) {
+ if (!Array.isArray(object.documents))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: array expected");
+ message.documents = [];
+ for (var i = 0; i < object.documents.length; ++i) {
+ if (typeof object.documents[i] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: object expected");
+ message.documents[i] = $root.google.cloud.discoveryengine.v1beta.DocumentInfo.fromObject(object.documents[i]);
+ }
+ }
+ if (object.panel != null) {
+ if (typeof object.panel !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.panel: object expected");
+ message.panel = $root.google.cloud.discoveryengine.v1beta.PanelInfo.fromObject(object.panel);
+ }
+ if (object.searchInfo != null) {
+ if (typeof object.searchInfo !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.searchInfo: object expected");
+ message.searchInfo = $root.google.cloud.discoveryengine.v1beta.SearchInfo.fromObject(object.searchInfo);
+ }
+ if (object.completionInfo != null) {
+ if (typeof object.completionInfo !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.completionInfo: object expected");
+ message.completionInfo = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.fromObject(object.completionInfo);
+ }
+ if (object.transactionInfo != null) {
+ if (typeof object.transactionInfo !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.transactionInfo: object expected");
+ message.transactionInfo = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.fromObject(object.transactionInfo);
+ }
+ if (object.tagIds) {
+ if (!Array.isArray(object.tagIds))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.tagIds: array expected");
+ message.tagIds = [];
+ for (var i = 0; i < object.tagIds.length; ++i)
+ message.tagIds[i] = String(object.tagIds[i]);
+ }
+ if (object.promotionIds) {
+ if (!Array.isArray(object.promotionIds))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.promotionIds: array expected");
+ message.promotionIds = [];
+ for (var i = 0; i < object.promotionIds.length; ++i)
+ message.promotionIds[i] = String(object.promotionIds[i]);
+ }
+ if (object.attributes) {
+ if (typeof object.attributes !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected");
+ message.attributes = {};
+ for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) {
+ if (typeof object.attributes[keys[i]] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected");
+ message.attributes[keys[i]] = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.fromObject(object.attributes[keys[i]]);
+ }
+ }
+ if (object.mediaInfo != null) {
+ if (typeof object.mediaInfo !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.mediaInfo: object expected");
+ message.mediaInfo = $root.google.cloud.discoveryengine.v1beta.MediaInfo.fromObject(object.mediaInfo);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a UserEvent message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.UserEvent} message UserEvent
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ UserEvent.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.documents = [];
+ object.tagIds = [];
+ object.promotionIds = [];
+ }
+ if (options.objects || options.defaults)
+ object.attributes = {};
+ if (options.defaults) {
+ object.eventType = "";
+ object.userPseudoId = "";
+ object.eventTime = null;
+ object.userInfo = null;
+ object.directUserRequest = false;
+ object.sessionId = "";
+ object.pageInfo = null;
+ object.attributionToken = "";
+ object.filter = "";
+ object.panel = null;
+ object.searchInfo = null;
+ object.completionInfo = null;
+ object.transactionInfo = null;
+ object.mediaInfo = null;
+ }
+ if (message.eventType != null && message.hasOwnProperty("eventType"))
+ object.eventType = message.eventType;
+ if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId"))
+ object.userPseudoId = message.userPseudoId;
+ if (message.eventTime != null && message.hasOwnProperty("eventTime"))
+ object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options);
+ if (message.userInfo != null && message.hasOwnProperty("userInfo"))
+ object.userInfo = $root.google.cloud.discoveryengine.v1beta.UserInfo.toObject(message.userInfo, options);
+ if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest"))
+ object.directUserRequest = message.directUserRequest;
+ if (message.sessionId != null && message.hasOwnProperty("sessionId"))
+ object.sessionId = message.sessionId;
+ if (message.pageInfo != null && message.hasOwnProperty("pageInfo"))
+ object.pageInfo = $root.google.cloud.discoveryengine.v1beta.PageInfo.toObject(message.pageInfo, options);
+ if (message.attributionToken != null && message.hasOwnProperty("attributionToken"))
+ object.attributionToken = message.attributionToken;
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ object.filter = message.filter;
+ if (message.documents && message.documents.length) {
+ object.documents = [];
+ for (var j = 0; j < message.documents.length; ++j)
+ object.documents[j] = $root.google.cloud.discoveryengine.v1beta.DocumentInfo.toObject(message.documents[j], options);
+ }
+ if (message.panel != null && message.hasOwnProperty("panel"))
+ object.panel = $root.google.cloud.discoveryengine.v1beta.PanelInfo.toObject(message.panel, options);
+ if (message.searchInfo != null && message.hasOwnProperty("searchInfo"))
+ object.searchInfo = $root.google.cloud.discoveryengine.v1beta.SearchInfo.toObject(message.searchInfo, options);
+ if (message.completionInfo != null && message.hasOwnProperty("completionInfo"))
+ object.completionInfo = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.toObject(message.completionInfo, options);
+ if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo"))
+ object.transactionInfo = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.toObject(message.transactionInfo, options);
+ if (message.tagIds && message.tagIds.length) {
+ object.tagIds = [];
+ for (var j = 0; j < message.tagIds.length; ++j)
+ object.tagIds[j] = message.tagIds[j];
+ }
+ if (message.promotionIds && message.promotionIds.length) {
+ object.promotionIds = [];
+ for (var j = 0; j < message.promotionIds.length; ++j)
+ object.promotionIds[j] = message.promotionIds[j];
+ }
+ var keys2;
+ if (message.attributes && (keys2 = Object.keys(message.attributes)).length) {
+ object.attributes = {};
+ for (var j = 0; j < keys2.length; ++j)
+ object.attributes[keys2[j]] = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.toObject(message.attributes[keys2[j]], options);
+ }
+ if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo"))
+ object.mediaInfo = $root.google.cloud.discoveryengine.v1beta.MediaInfo.toObject(message.mediaInfo, options);
+ return object;
+ };
+
+ /**
+ * Converts this UserEvent to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ UserEvent.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for UserEvent
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.UserEvent
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ UserEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.UserEvent";
+ };
+
+ return UserEvent;
+ })();
+
+ v1beta.PageInfo = (function() {
+
+ /**
+ * Properties of a PageInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IPageInfo
+ * @property {string|null} [pageviewId] PageInfo pageviewId
+ * @property {string|null} [pageCategory] PageInfo pageCategory
+ * @property {string|null} [uri] PageInfo uri
+ * @property {string|null} [referrerUri] PageInfo referrerUri
+ */
+
+ /**
+ * Constructs a new PageInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a PageInfo.
+ * @implements IPageInfo
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IPageInfo=} [properties] Properties to set
+ */
+ function PageInfo(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]];
+ }
+
+ /**
+ * PageInfo pageviewId.
+ * @member {string} pageviewId
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @instance
+ */
+ PageInfo.prototype.pageviewId = "";
+
+ /**
+ * PageInfo pageCategory.
+ * @member {string} pageCategory
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @instance
+ */
+ PageInfo.prototype.pageCategory = "";
+
+ /**
+ * PageInfo uri.
+ * @member {string} uri
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @instance
+ */
+ PageInfo.prototype.uri = "";
+
+ /**
+ * PageInfo referrerUri.
+ * @member {string} referrerUri
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @instance
+ */
+ PageInfo.prototype.referrerUri = "";
+
+ /**
+ * Creates a new PageInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IPageInfo=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo instance
+ */
+ PageInfo.create = function create(properties) {
+ return new PageInfo(properties);
+ };
+
+ /**
+ * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IPageInfo} message PageInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PageInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.pageviewId != null && Object.hasOwnProperty.call(message, "pageviewId"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.pageviewId);
+ if (message.pageCategory != null && Object.hasOwnProperty.call(message, "pageCategory"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageCategory);
+ if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri);
+ if (message.referrerUri != null && Object.hasOwnProperty.call(message, "referrerUri"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.referrerUri);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IPageInfo} message PageInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PageInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a PageInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PageInfo.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.discoveryengine.v1beta.PageInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.pageviewId = reader.string();
+ break;
+ }
+ case 2: {
+ message.pageCategory = reader.string();
+ break;
+ }
+ case 3: {
+ message.uri = reader.string();
+ break;
+ }
+ case 4: {
+ message.referrerUri = reader.string();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a PageInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PageInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a PageInfo message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PageInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.pageviewId != null && message.hasOwnProperty("pageviewId"))
+ if (!$util.isString(message.pageviewId))
+ return "pageviewId: string expected";
+ if (message.pageCategory != null && message.hasOwnProperty("pageCategory"))
+ if (!$util.isString(message.pageCategory))
+ return "pageCategory: string expected";
+ if (message.uri != null && message.hasOwnProperty("uri"))
+ if (!$util.isString(message.uri))
+ return "uri: string expected";
+ if (message.referrerUri != null && message.hasOwnProperty("referrerUri"))
+ if (!$util.isString(message.referrerUri))
+ return "referrerUri: string expected";
+ return null;
+ };
+
+ /**
+ * Creates a PageInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo
+ */
+ PageInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.PageInfo)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.PageInfo();
+ if (object.pageviewId != null)
+ message.pageviewId = String(object.pageviewId);
+ if (object.pageCategory != null)
+ message.pageCategory = String(object.pageCategory);
+ if (object.uri != null)
+ message.uri = String(object.uri);
+ if (object.referrerUri != null)
+ message.referrerUri = String(object.referrerUri);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a PageInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.PageInfo} message PageInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PageInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.pageviewId = "";
+ object.pageCategory = "";
+ object.uri = "";
+ object.referrerUri = "";
+ }
+ if (message.pageviewId != null && message.hasOwnProperty("pageviewId"))
+ object.pageviewId = message.pageviewId;
+ if (message.pageCategory != null && message.hasOwnProperty("pageCategory"))
+ object.pageCategory = message.pageCategory;
+ if (message.uri != null && message.hasOwnProperty("uri"))
+ object.uri = message.uri;
+ if (message.referrerUri != null && message.hasOwnProperty("referrerUri"))
+ object.referrerUri = message.referrerUri;
+ return object;
+ };
+
+ /**
+ * Converts this PageInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PageInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PageInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.PageInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.PageInfo";
+ };
+
+ return PageInfo;
+ })();
+
+ v1beta.SearchInfo = (function() {
+
+ /**
+ * Properties of a SearchInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface ISearchInfo
+ * @property {string|null} [searchQuery] SearchInfo searchQuery
+ * @property {string|null} [orderBy] SearchInfo orderBy
+ * @property {number|null} [offset] SearchInfo offset
+ */
+
+ /**
+ * Constructs a new SearchInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a SearchInfo.
+ * @implements ISearchInfo
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.ISearchInfo=} [properties] Properties to set
+ */
+ function SearchInfo(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]];
+ }
+
+ /**
+ * SearchInfo searchQuery.
+ * @member {string} searchQuery
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @instance
+ */
+ SearchInfo.prototype.searchQuery = "";
+
+ /**
+ * SearchInfo orderBy.
+ * @member {string} orderBy
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @instance
+ */
+ SearchInfo.prototype.orderBy = "";
+
+ /**
+ * SearchInfo offset.
+ * @member {number|null|undefined} offset
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @instance
+ */
+ SearchInfo.prototype.offset = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * SearchInfo _offset.
+ * @member {"offset"|undefined} _offset
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @instance
+ */
+ Object.defineProperty(SearchInfo.prototype, "_offset", {
+ get: $util.oneOfGetter($oneOfFields = ["offset"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new SearchInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ISearchInfo=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo instance
+ */
+ SearchInfo.create = function create(properties) {
+ return new SearchInfo(properties);
+ };
+
+ /**
+ * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ISearchInfo} message SearchInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SearchInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.searchQuery);
+ if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.orderBy);
+ if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.offset);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ISearchInfo} message SearchInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ SearchInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a SearchInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SearchInfo.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.discoveryengine.v1beta.SearchInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.searchQuery = reader.string();
+ break;
+ }
+ case 2: {
+ message.orderBy = reader.string();
+ break;
+ }
+ case 3: {
+ message.offset = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a SearchInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ SearchInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a SearchInfo message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ SearchInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.searchQuery != null && message.hasOwnProperty("searchQuery"))
+ if (!$util.isString(message.searchQuery))
+ return "searchQuery: string expected";
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ if (!$util.isString(message.orderBy))
+ return "orderBy: string expected";
+ if (message.offset != null && message.hasOwnProperty("offset")) {
+ properties._offset = 1;
+ if (!$util.isInteger(message.offset))
+ return "offset: integer expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo
+ */
+ SearchInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchInfo)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.SearchInfo();
+ if (object.searchQuery != null)
+ message.searchQuery = String(object.searchQuery);
+ if (object.orderBy != null)
+ message.orderBy = String(object.orderBy);
+ if (object.offset != null)
+ message.offset = object.offset | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a SearchInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.SearchInfo} message SearchInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ SearchInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.searchQuery = "";
+ object.orderBy = "";
+ }
+ if (message.searchQuery != null && message.hasOwnProperty("searchQuery"))
+ object.searchQuery = message.searchQuery;
+ if (message.orderBy != null && message.hasOwnProperty("orderBy"))
+ object.orderBy = message.orderBy;
+ if (message.offset != null && message.hasOwnProperty("offset")) {
+ object.offset = message.offset;
+ if (options.oneofs)
+ object._offset = "offset";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this SearchInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ SearchInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for SearchInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.SearchInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ SearchInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchInfo";
+ };
+
+ return SearchInfo;
+ })();
+
+ v1beta.CompletionInfo = (function() {
+
+ /**
+ * Properties of a CompletionInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface ICompletionInfo
+ * @property {string|null} [selectedSuggestion] CompletionInfo selectedSuggestion
+ * @property {number|null} [selectedPosition] CompletionInfo selectedPosition
+ */
+
+ /**
+ * Constructs a new CompletionInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a CompletionInfo.
+ * @implements ICompletionInfo
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo=} [properties] Properties to set
+ */
+ function CompletionInfo(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]];
+ }
+
+ /**
+ * CompletionInfo selectedSuggestion.
+ * @member {string} selectedSuggestion
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @instance
+ */
+ CompletionInfo.prototype.selectedSuggestion = "";
+
+ /**
+ * CompletionInfo selectedPosition.
+ * @member {number} selectedPosition
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @instance
+ */
+ CompletionInfo.prototype.selectedPosition = 0;
+
+ /**
+ * Creates a new CompletionInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo instance
+ */
+ CompletionInfo.create = function create(properties) {
+ return new CompletionInfo(properties);
+ };
+
+ /**
+ * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo} message CompletionInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CompletionInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.selectedSuggestion != null && Object.hasOwnProperty.call(message, "selectedSuggestion"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedSuggestion);
+ if (message.selectedPosition != null && Object.hasOwnProperty.call(message, "selectedPosition"))
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.selectedPosition);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo} message CompletionInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CompletionInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CompletionInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CompletionInfo.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.discoveryengine.v1beta.CompletionInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.selectedSuggestion = reader.string();
+ break;
+ }
+ case 2: {
+ message.selectedPosition = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CompletionInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CompletionInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CompletionInfo message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CompletionInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion"))
+ if (!$util.isString(message.selectedSuggestion))
+ return "selectedSuggestion: string expected";
+ if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition"))
+ if (!$util.isInteger(message.selectedPosition))
+ return "selectedPosition: integer expected";
+ return null;
+ };
+
+ /**
+ * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo
+ */
+ CompletionInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.CompletionInfo)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.CompletionInfo();
+ if (object.selectedSuggestion != null)
+ message.selectedSuggestion = String(object.selectedSuggestion);
+ if (object.selectedPosition != null)
+ message.selectedPosition = object.selectedPosition | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.CompletionInfo} message CompletionInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CompletionInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.selectedSuggestion = "";
+ object.selectedPosition = 0;
+ }
+ if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion"))
+ object.selectedSuggestion = message.selectedSuggestion;
+ if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition"))
+ object.selectedPosition = message.selectedPosition;
+ return object;
+ };
+
+ /**
+ * Converts this CompletionInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CompletionInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CompletionInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CompletionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CompletionInfo";
+ };
+
+ return CompletionInfo;
+ })();
+
+ v1beta.TransactionInfo = (function() {
+
+ /**
+ * Properties of a TransactionInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface ITransactionInfo
+ * @property {number|null} [value] TransactionInfo value
+ * @property {string|null} [currency] TransactionInfo currency
+ * @property {string|null} [transactionId] TransactionInfo transactionId
+ * @property {number|null} [tax] TransactionInfo tax
+ * @property {number|null} [cost] TransactionInfo cost
+ * @property {number|null} [discountValue] TransactionInfo discountValue
+ */
+
+ /**
+ * Constructs a new TransactionInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a TransactionInfo.
+ * @implements ITransactionInfo
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo=} [properties] Properties to set
+ */
+ function TransactionInfo(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]];
+ }
+
+ /**
+ * TransactionInfo value.
+ * @member {number|null|undefined} value
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ TransactionInfo.prototype.value = null;
+
+ /**
+ * TransactionInfo currency.
+ * @member {string} currency
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ TransactionInfo.prototype.currency = "";
+
+ /**
+ * TransactionInfo transactionId.
+ * @member {string} transactionId
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ TransactionInfo.prototype.transactionId = "";
+
+ /**
+ * TransactionInfo tax.
+ * @member {number|null|undefined} tax
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ TransactionInfo.prototype.tax = null;
+
+ /**
+ * TransactionInfo cost.
+ * @member {number|null|undefined} cost
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ TransactionInfo.prototype.cost = null;
+
+ /**
+ * TransactionInfo discountValue.
+ * @member {number|null|undefined} discountValue
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ TransactionInfo.prototype.discountValue = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * TransactionInfo _value.
+ * @member {"value"|undefined} _value
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ Object.defineProperty(TransactionInfo.prototype, "_value", {
+ get: $util.oneOfGetter($oneOfFields = ["value"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * TransactionInfo _tax.
+ * @member {"tax"|undefined} _tax
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ Object.defineProperty(TransactionInfo.prototype, "_tax", {
+ get: $util.oneOfGetter($oneOfFields = ["tax"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * TransactionInfo _cost.
+ * @member {"cost"|undefined} _cost
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ Object.defineProperty(TransactionInfo.prototype, "_cost", {
+ get: $util.oneOfGetter($oneOfFields = ["cost"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * TransactionInfo _discountValue.
+ * @member {"discountValue"|undefined} _discountValue
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ */
+ Object.defineProperty(TransactionInfo.prototype, "_discountValue", {
+ get: $util.oneOfGetter($oneOfFields = ["discountValue"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new TransactionInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo instance
+ */
+ TransactionInfo.create = function create(properties) {
+ return new TransactionInfo(properties);
+ };
+
+ /**
+ * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo} message TransactionInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransactionInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
+ writer.uint32(/* id 1, wireType 5 =*/13).float(message.value);
+ if (message.currency != null && Object.hasOwnProperty.call(message, "currency"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.currency);
+ if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.transactionId);
+ if (message.tax != null && Object.hasOwnProperty.call(message, "tax"))
+ writer.uint32(/* id 4, wireType 5 =*/37).float(message.tax);
+ if (message.cost != null && Object.hasOwnProperty.call(message, "cost"))
+ writer.uint32(/* id 5, wireType 5 =*/45).float(message.cost);
+ if (message.discountValue != null && Object.hasOwnProperty.call(message, "discountValue"))
+ writer.uint32(/* id 6, wireType 5 =*/53).float(message.discountValue);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo} message TransactionInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ TransactionInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a TransactionInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransactionInfo.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.discoveryengine.v1beta.TransactionInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.value = reader.float();
+ break;
+ }
+ case 2: {
+ message.currency = reader.string();
+ break;
+ }
+ case 3: {
+ message.transactionId = reader.string();
+ break;
+ }
+ case 4: {
+ message.tax = reader.float();
+ break;
+ }
+ case 5: {
+ message.cost = reader.float();
+ break;
+ }
+ case 6: {
+ message.discountValue = reader.float();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a TransactionInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ TransactionInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a TransactionInfo message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ TransactionInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.value != null && message.hasOwnProperty("value")) {
+ properties._value = 1;
+ if (typeof message.value !== "number")
+ return "value: number expected";
+ }
+ if (message.currency != null && message.hasOwnProperty("currency"))
+ if (!$util.isString(message.currency))
+ return "currency: string expected";
+ if (message.transactionId != null && message.hasOwnProperty("transactionId"))
+ if (!$util.isString(message.transactionId))
+ return "transactionId: string expected";
+ if (message.tax != null && message.hasOwnProperty("tax")) {
+ properties._tax = 1;
+ if (typeof message.tax !== "number")
+ return "tax: number expected";
+ }
+ if (message.cost != null && message.hasOwnProperty("cost")) {
+ properties._cost = 1;
+ if (typeof message.cost !== "number")
+ return "cost: number expected";
+ }
+ if (message.discountValue != null && message.hasOwnProperty("discountValue")) {
+ properties._discountValue = 1;
+ if (typeof message.discountValue !== "number")
+ return "discountValue: number expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo
+ */
+ TransactionInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.TransactionInfo)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.TransactionInfo();
+ if (object.value != null)
+ message.value = Number(object.value);
+ if (object.currency != null)
+ message.currency = String(object.currency);
+ if (object.transactionId != null)
+ message.transactionId = String(object.transactionId);
+ if (object.tax != null)
+ message.tax = Number(object.tax);
+ if (object.cost != null)
+ message.cost = Number(object.cost);
+ if (object.discountValue != null)
+ message.discountValue = Number(object.discountValue);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.TransactionInfo} message TransactionInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ TransactionInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.currency = "";
+ object.transactionId = "";
+ }
+ if (message.value != null && message.hasOwnProperty("value")) {
+ object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;
+ if (options.oneofs)
+ object._value = "value";
+ }
+ if (message.currency != null && message.hasOwnProperty("currency"))
+ object.currency = message.currency;
+ if (message.transactionId != null && message.hasOwnProperty("transactionId"))
+ object.transactionId = message.transactionId;
+ if (message.tax != null && message.hasOwnProperty("tax")) {
+ object.tax = options.json && !isFinite(message.tax) ? String(message.tax) : message.tax;
+ if (options.oneofs)
+ object._tax = "tax";
+ }
+ if (message.cost != null && message.hasOwnProperty("cost")) {
+ object.cost = options.json && !isFinite(message.cost) ? String(message.cost) : message.cost;
+ if (options.oneofs)
+ object._cost = "cost";
+ }
+ if (message.discountValue != null && message.hasOwnProperty("discountValue")) {
+ object.discountValue = options.json && !isFinite(message.discountValue) ? String(message.discountValue) : message.discountValue;
+ if (options.oneofs)
+ object._discountValue = "discountValue";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this TransactionInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ TransactionInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for TransactionInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ TransactionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.TransactionInfo";
+ };
+
+ return TransactionInfo;
+ })();
+
+ v1beta.DocumentInfo = (function() {
+
+ /**
+ * Properties of a DocumentInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IDocumentInfo
+ * @property {string|null} [id] DocumentInfo id
+ * @property {string|null} [name] DocumentInfo name
+ * @property {number|null} [quantity] DocumentInfo quantity
+ * @property {Array.|null} [promotionIds] DocumentInfo promotionIds
+ */
+
+ /**
+ * Constructs a new DocumentInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a DocumentInfo.
+ * @implements IDocumentInfo
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo=} [properties] Properties to set
+ */
+ function DocumentInfo(properties) {
+ this.promotionIds = [];
+ 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]];
+ }
+
+ /**
+ * DocumentInfo id.
+ * @member {string|null|undefined} id
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @instance
+ */
+ DocumentInfo.prototype.id = null;
+
+ /**
+ * DocumentInfo name.
+ * @member {string|null|undefined} name
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @instance
+ */
+ DocumentInfo.prototype.name = null;
+
+ /**
+ * DocumentInfo quantity.
+ * @member {number|null|undefined} quantity
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @instance
+ */
+ DocumentInfo.prototype.quantity = null;
+
+ /**
+ * DocumentInfo promotionIds.
+ * @member {Array.} promotionIds
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @instance
+ */
+ DocumentInfo.prototype.promotionIds = $util.emptyArray;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * DocumentInfo documentDescriptor.
+ * @member {"id"|"name"|undefined} documentDescriptor
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @instance
+ */
+ Object.defineProperty(DocumentInfo.prototype, "documentDescriptor", {
+ get: $util.oneOfGetter($oneOfFields = ["id", "name"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * DocumentInfo _quantity.
+ * @member {"quantity"|undefined} _quantity
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @instance
+ */
+ Object.defineProperty(DocumentInfo.prototype, "_quantity", {
+ get: $util.oneOfGetter($oneOfFields = ["quantity"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new DocumentInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo instance
+ */
+ DocumentInfo.create = function create(properties) {
+ return new DocumentInfo(properties);
+ };
+
+ /**
+ * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo} message DocumentInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DocumentInfo.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.name != null && Object.hasOwnProperty.call(message, "name"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
+ if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.quantity);
+ if (message.promotionIds != null && message.promotionIds.length)
+ for (var i = 0; i < message.promotionIds.length; ++i)
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.promotionIds[i]);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo} message DocumentInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ DocumentInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a DocumentInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DocumentInfo.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.discoveryengine.v1beta.DocumentInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.id = reader.string();
+ break;
+ }
+ case 2: {
+ message.name = reader.string();
+ break;
+ }
+ case 3: {
+ message.quantity = reader.int32();
+ break;
+ }
+ case 4: {
+ if (!(message.promotionIds && message.promotionIds.length))
+ message.promotionIds = [];
+ message.promotionIds.push(reader.string());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a DocumentInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ DocumentInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a DocumentInfo message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ DocumentInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.id != null && message.hasOwnProperty("id")) {
+ properties.documentDescriptor = 1;
+ if (!$util.isString(message.id))
+ return "id: string expected";
+ }
+ if (message.name != null && message.hasOwnProperty("name")) {
+ if (properties.documentDescriptor === 1)
+ return "documentDescriptor: multiple values";
+ properties.documentDescriptor = 1;
+ if (!$util.isString(message.name))
+ return "name: string expected";
+ }
+ if (message.quantity != null && message.hasOwnProperty("quantity")) {
+ properties._quantity = 1;
+ if (!$util.isInteger(message.quantity))
+ return "quantity: integer expected";
+ }
+ if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) {
+ if (!Array.isArray(message.promotionIds))
+ return "promotionIds: array expected";
+ for (var i = 0; i < message.promotionIds.length; ++i)
+ if (!$util.isString(message.promotionIds[i]))
+ return "promotionIds: string[] expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo
+ */
+ DocumentInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.DocumentInfo)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.DocumentInfo();
+ if (object.id != null)
+ message.id = String(object.id);
+ if (object.name != null)
+ message.name = String(object.name);
+ if (object.quantity != null)
+ message.quantity = object.quantity | 0;
+ if (object.promotionIds) {
+ if (!Array.isArray(object.promotionIds))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.DocumentInfo.promotionIds: array expected");
+ message.promotionIds = [];
+ for (var i = 0; i < object.promotionIds.length; ++i)
+ message.promotionIds[i] = String(object.promotionIds[i]);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.DocumentInfo} message DocumentInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ DocumentInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.promotionIds = [];
+ if (message.id != null && message.hasOwnProperty("id")) {
+ object.id = message.id;
+ if (options.oneofs)
+ object.documentDescriptor = "id";
+ }
+ if (message.name != null && message.hasOwnProperty("name")) {
+ object.name = message.name;
+ if (options.oneofs)
+ object.documentDescriptor = "name";
+ }
+ if (message.quantity != null && message.hasOwnProperty("quantity")) {
+ object.quantity = message.quantity;
+ if (options.oneofs)
+ object._quantity = "quantity";
+ }
+ if (message.promotionIds && message.promotionIds.length) {
+ object.promotionIds = [];
+ for (var j = 0; j < message.promotionIds.length; ++j)
+ object.promotionIds[j] = message.promotionIds[j];
+ }
+ return object;
+ };
+
+ /**
+ * Converts this DocumentInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ DocumentInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for DocumentInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ DocumentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.DocumentInfo";
+ };
+
+ return DocumentInfo;
+ })();
+
+ v1beta.PanelInfo = (function() {
+
+ /**
+ * Properties of a PanelInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IPanelInfo
+ * @property {string|null} [panelId] PanelInfo panelId
+ * @property {string|null} [displayName] PanelInfo displayName
+ * @property {number|null} [panelPosition] PanelInfo panelPosition
+ * @property {number|null} [totalPanels] PanelInfo totalPanels
+ */
+
+ /**
+ * Constructs a new PanelInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a PanelInfo.
+ * @implements IPanelInfo
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IPanelInfo=} [properties] Properties to set
+ */
+ function PanelInfo(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]];
+ }
+
+ /**
+ * PanelInfo panelId.
+ * @member {string} panelId
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @instance
+ */
+ PanelInfo.prototype.panelId = "";
+
+ /**
+ * PanelInfo displayName.
+ * @member {string} displayName
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @instance
+ */
+ PanelInfo.prototype.displayName = "";
+
+ /**
+ * PanelInfo panelPosition.
+ * @member {number|null|undefined} panelPosition
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @instance
+ */
+ PanelInfo.prototype.panelPosition = null;
+
+ /**
+ * PanelInfo totalPanels.
+ * @member {number|null|undefined} totalPanels
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @instance
+ */
+ PanelInfo.prototype.totalPanels = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * PanelInfo _panelPosition.
+ * @member {"panelPosition"|undefined} _panelPosition
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @instance
+ */
+ Object.defineProperty(PanelInfo.prototype, "_panelPosition", {
+ get: $util.oneOfGetter($oneOfFields = ["panelPosition"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * PanelInfo _totalPanels.
+ * @member {"totalPanels"|undefined} _totalPanels
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @instance
+ */
+ Object.defineProperty(PanelInfo.prototype, "_totalPanels", {
+ get: $util.oneOfGetter($oneOfFields = ["totalPanels"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new PanelInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IPanelInfo=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo instance
+ */
+ PanelInfo.create = function create(properties) {
+ return new PanelInfo(properties);
+ };
+
+ /**
+ * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IPanelInfo} message PanelInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PanelInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.panelId != null && Object.hasOwnProperty.call(message, "panelId"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.panelId);
+ if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName);
+ if (message.panelPosition != null && Object.hasOwnProperty.call(message, "panelPosition"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.panelPosition);
+ if (message.totalPanels != null && Object.hasOwnProperty.call(message, "totalPanels"))
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalPanels);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IPanelInfo} message PanelInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ PanelInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a PanelInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PanelInfo.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.discoveryengine.v1beta.PanelInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 2: {
+ message.panelId = reader.string();
+ break;
+ }
+ case 3: {
+ message.displayName = reader.string();
+ break;
+ }
+ case 4: {
+ message.panelPosition = reader.int32();
+ break;
+ }
+ case 5: {
+ message.totalPanels = reader.int32();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a PanelInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ PanelInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a PanelInfo message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ PanelInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.panelId != null && message.hasOwnProperty("panelId"))
+ if (!$util.isString(message.panelId))
+ return "panelId: string expected";
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ if (!$util.isString(message.displayName))
+ return "displayName: string expected";
+ if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) {
+ properties._panelPosition = 1;
+ if (!$util.isInteger(message.panelPosition))
+ return "panelPosition: integer expected";
+ }
+ if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) {
+ properties._totalPanels = 1;
+ if (!$util.isInteger(message.totalPanels))
+ return "totalPanels: integer expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo
+ */
+ PanelInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.PanelInfo)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.PanelInfo();
+ if (object.panelId != null)
+ message.panelId = String(object.panelId);
+ if (object.displayName != null)
+ message.displayName = String(object.displayName);
+ if (object.panelPosition != null)
+ message.panelPosition = object.panelPosition | 0;
+ if (object.totalPanels != null)
+ message.totalPanels = object.totalPanels | 0;
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a PanelInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.PanelInfo} message PanelInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ PanelInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.panelId = "";
+ object.displayName = "";
+ }
+ if (message.panelId != null && message.hasOwnProperty("panelId"))
+ object.panelId = message.panelId;
+ if (message.displayName != null && message.hasOwnProperty("displayName"))
+ object.displayName = message.displayName;
+ if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) {
+ object.panelPosition = message.panelPosition;
+ if (options.oneofs)
+ object._panelPosition = "panelPosition";
+ }
+ if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) {
+ object.totalPanels = message.totalPanels;
+ if (options.oneofs)
+ object._totalPanels = "totalPanels";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this PanelInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ PanelInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for PanelInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.PanelInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ PanelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.PanelInfo";
+ };
+
+ return PanelInfo;
+ })();
+
+ v1beta.MediaInfo = (function() {
+
+ /**
+ * Properties of a MediaInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IMediaInfo
+ * @property {google.protobuf.IDuration|null} [mediaProgressDuration] MediaInfo mediaProgressDuration
+ * @property {number|null} [mediaProgressPercentage] MediaInfo mediaProgressPercentage
+ */
+
+ /**
+ * Constructs a new MediaInfo.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a MediaInfo.
+ * @implements IMediaInfo
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IMediaInfo=} [properties] Properties to set
+ */
+ function MediaInfo(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]];
+ }
+
+ /**
+ * MediaInfo mediaProgressDuration.
+ * @member {google.protobuf.IDuration|null|undefined} mediaProgressDuration
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @instance
+ */
+ MediaInfo.prototype.mediaProgressDuration = null;
+
+ /**
+ * MediaInfo mediaProgressPercentage.
+ * @member {number|null|undefined} mediaProgressPercentage
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @instance
+ */
+ MediaInfo.prototype.mediaProgressPercentage = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * MediaInfo _mediaProgressPercentage.
+ * @member {"mediaProgressPercentage"|undefined} _mediaProgressPercentage
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @instance
+ */
+ Object.defineProperty(MediaInfo.prototype, "_mediaProgressPercentage", {
+ get: $util.oneOfGetter($oneOfFields = ["mediaProgressPercentage"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new MediaInfo instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IMediaInfo=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo instance
+ */
+ MediaInfo.create = function create(properties) {
+ return new MediaInfo(properties);
+ };
+
+ /**
+ * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IMediaInfo} message MediaInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MediaInfo.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.mediaProgressDuration != null && Object.hasOwnProperty.call(message, "mediaProgressDuration"))
+ $root.google.protobuf.Duration.encode(message.mediaProgressDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.mediaProgressPercentage != null && Object.hasOwnProperty.call(message, "mediaProgressPercentage"))
+ writer.uint32(/* id 2, wireType 5 =*/21).float(message.mediaProgressPercentage);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IMediaInfo} message MediaInfo message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ MediaInfo.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a MediaInfo message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MediaInfo.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.discoveryengine.v1beta.MediaInfo();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.mediaProgressDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
+ break;
+ }
+ case 2: {
+ message.mediaProgressPercentage = reader.float();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a MediaInfo message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ MediaInfo.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a MediaInfo message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ MediaInfo.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) {
+ var error = $root.google.protobuf.Duration.verify(message.mediaProgressDuration);
+ if (error)
+ return "mediaProgressDuration." + error;
+ }
+ if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) {
+ properties._mediaProgressPercentage = 1;
+ if (typeof message.mediaProgressPercentage !== "number")
+ return "mediaProgressPercentage: number expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo
+ */
+ MediaInfo.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.MediaInfo)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.MediaInfo();
+ if (object.mediaProgressDuration != null) {
+ if (typeof object.mediaProgressDuration !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.MediaInfo.mediaProgressDuration: object expected");
+ message.mediaProgressDuration = $root.google.protobuf.Duration.fromObject(object.mediaProgressDuration);
+ }
+ if (object.mediaProgressPercentage != null)
+ message.mediaProgressPercentage = Number(object.mediaProgressPercentage);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a MediaInfo message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.MediaInfo} message MediaInfo
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ MediaInfo.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults)
+ object.mediaProgressDuration = null;
+ if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration"))
+ object.mediaProgressDuration = $root.google.protobuf.Duration.toObject(message.mediaProgressDuration, options);
+ if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) {
+ object.mediaProgressPercentage = options.json && !isFinite(message.mediaProgressPercentage) ? String(message.mediaProgressPercentage) : message.mediaProgressPercentage;
+ if (options.oneofs)
+ object._mediaProgressPercentage = "mediaProgressPercentage";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this MediaInfo to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ MediaInfo.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for MediaInfo
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.MediaInfo
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ MediaInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.MediaInfo";
+ };
+
+ return MediaInfo;
+ })();
+
+ v1beta.RecommendationService = (function() {
+
+ /**
+ * Constructs a new RecommendationService service.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a RecommendationService
+ * @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 RecommendationService(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (RecommendationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = RecommendationService;
+
+ /**
+ * Creates new RecommendationService service using the specified rpc implementation.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendationService
+ * @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 {RecommendationService} RPC service. Useful where requests and/or responses are streamed.
+ */
+ RecommendationService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.RecommendationService|recommend}.
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendationService
+ * @typedef RecommendCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.discoveryengine.v1beta.RecommendResponse} [response] RecommendResponse
+ */
+
+ /**
+ * Calls Recommend.
+ * @function recommend
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendationService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} request RecommendRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.RecommendationService.RecommendCallback} callback Node-style callback called with the error, if any, and RecommendResponse
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(RecommendationService.prototype.recommend = function recommend(request, callback) {
+ return this.rpcCall(recommend, $root.google.cloud.discoveryengine.v1beta.RecommendRequest, $root.google.cloud.discoveryengine.v1beta.RecommendResponse, request, callback);
+ }, "name", { value: "Recommend" });
+
+ /**
+ * Calls Recommend.
+ * @function recommend
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendationService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} request RecommendRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return RecommendationService;
+ })();
+
+ v1beta.RecommendRequest = (function() {
+
+ /**
+ * Properties of a RecommendRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IRecommendRequest
+ * @property {string|null} [servingConfig] RecommendRequest servingConfig
+ * @property {google.cloud.discoveryengine.v1beta.IUserEvent|null} [userEvent] RecommendRequest userEvent
+ * @property {number|null} [pageSize] RecommendRequest pageSize
+ * @property {string|null} [filter] RecommendRequest filter
+ * @property {boolean|null} [validateOnly] RecommendRequest validateOnly
+ * @property {Object.|null} [params] RecommendRequest params
+ */
+
+ /**
+ * Constructs a new RecommendRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a RecommendRequest.
+ * @implements IRecommendRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest=} [properties] Properties to set
+ */
+ function RecommendRequest(properties) {
+ this.params = {};
+ 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]];
+ }
+
+ /**
+ * RecommendRequest servingConfig.
+ * @member {string} servingConfig
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @instance
+ */
+ RecommendRequest.prototype.servingConfig = "";
+
+ /**
+ * RecommendRequest userEvent.
+ * @member {google.cloud.discoveryengine.v1beta.IUserEvent|null|undefined} userEvent
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @instance
+ */
+ RecommendRequest.prototype.userEvent = null;
+
+ /**
+ * RecommendRequest pageSize.
+ * @member {number} pageSize
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @instance
+ */
+ RecommendRequest.prototype.pageSize = 0;
+
+ /**
+ * RecommendRequest filter.
+ * @member {string} filter
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @instance
+ */
+ RecommendRequest.prototype.filter = "";
+
+ /**
+ * RecommendRequest validateOnly.
+ * @member {boolean} validateOnly
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @instance
+ */
+ RecommendRequest.prototype.validateOnly = false;
+
+ /**
+ * RecommendRequest params.
+ * @member {Object.} params
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @instance
+ */
+ RecommendRequest.prototype.params = $util.emptyObject;
+
+ /**
+ * Creates a new RecommendRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest instance
+ */
+ RecommendRequest.create = function create(properties) {
+ return new RecommendRequest(properties);
+ };
+
+ /**
+ * Encodes the specified RecommendRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} message RecommendRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RecommendRequest.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.servingConfig != null && Object.hasOwnProperty.call(message, "servingConfig"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.servingConfig);
+ if (message.userEvent != null && Object.hasOwnProperty.call(message, "userEvent"))
+ $root.google.cloud.discoveryengine.v1beta.UserEvent.encode(message.userEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize);
+ if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter);
+ if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly"))
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly);
+ if (message.params != null && Object.hasOwnProperty.call(message, "params"))
+ for (var keys = Object.keys(message.params), 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.protobuf.Value.encode(message.params[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
+ }
+ return writer;
+ };
+
+ /**
+ * Encodes the specified RecommendRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} message RecommendRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RecommendRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RecommendRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RecommendRequest.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.discoveryengine.v1beta.RecommendRequest(), key, value;
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.servingConfig = reader.string();
+ break;
+ }
+ case 2: {
+ message.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ message.pageSize = reader.int32();
+ break;
+ }
+ case 4: {
+ message.filter = reader.string();
+ break;
+ }
+ case 5: {
+ message.validateOnly = reader.bool();
+ break;
+ }
+ case 6: {
+ if (message.params === $util.emptyObject)
+ message.params = {};
+ 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.protobuf.Value.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.params[key] = value;
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a RecommendRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RecommendRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RecommendRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RecommendRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.servingConfig != null && message.hasOwnProperty("servingConfig"))
+ if (!$util.isString(message.servingConfig))
+ return "servingConfig: string expected";
+ if (message.userEvent != null && message.hasOwnProperty("userEvent")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.UserEvent.verify(message.userEvent);
+ if (error)
+ return "userEvent." + error;
+ }
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ if (!$util.isInteger(message.pageSize))
+ return "pageSize: integer expected";
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ if (!$util.isString(message.filter))
+ return "filter: string expected";
+ if (message.validateOnly != null && message.hasOwnProperty("validateOnly"))
+ if (typeof message.validateOnly !== "boolean")
+ return "validateOnly: boolean expected";
+ if (message.params != null && message.hasOwnProperty("params")) {
+ if (!$util.isObject(message.params))
+ return "params: object expected";
+ var key = Object.keys(message.params);
+ for (var i = 0; i < key.length; ++i) {
+ var error = $root.google.protobuf.Value.verify(message.params[key[i]]);
+ if (error)
+ return "params." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a RecommendRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest
+ */
+ RecommendRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.RecommendRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.RecommendRequest();
+ if (object.servingConfig != null)
+ message.servingConfig = String(object.servingConfig);
+ if (object.userEvent != null) {
+ if (typeof object.userEvent !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.userEvent: object expected");
+ message.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(object.userEvent);
+ }
+ if (object.pageSize != null)
+ message.pageSize = object.pageSize | 0;
+ if (object.filter != null)
+ message.filter = String(object.filter);
+ if (object.validateOnly != null)
+ message.validateOnly = Boolean(object.validateOnly);
+ if (object.params) {
+ if (typeof object.params !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected");
+ message.params = {};
+ for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) {
+ if (typeof object.params[keys[i]] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected");
+ message.params[keys[i]] = $root.google.protobuf.Value.fromObject(object.params[keys[i]]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RecommendRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.RecommendRequest} message RecommendRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RecommendRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.objects || options.defaults)
+ object.params = {};
+ if (options.defaults) {
+ object.servingConfig = "";
+ object.userEvent = null;
+ object.pageSize = 0;
+ object.filter = "";
+ object.validateOnly = false;
+ }
+ if (message.servingConfig != null && message.hasOwnProperty("servingConfig"))
+ object.servingConfig = message.servingConfig;
+ if (message.userEvent != null && message.hasOwnProperty("userEvent"))
+ object.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.toObject(message.userEvent, options);
+ if (message.pageSize != null && message.hasOwnProperty("pageSize"))
+ object.pageSize = message.pageSize;
+ if (message.filter != null && message.hasOwnProperty("filter"))
+ object.filter = message.filter;
+ if (message.validateOnly != null && message.hasOwnProperty("validateOnly"))
+ object.validateOnly = message.validateOnly;
+ var keys2;
+ if (message.params && (keys2 = Object.keys(message.params)).length) {
+ object.params = {};
+ for (var j = 0; j < keys2.length; ++j)
+ object.params[keys2[j]] = $root.google.protobuf.Value.toObject(message.params[keys2[j]], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this RecommendRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RecommendRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for RecommendRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RecommendRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.RecommendRequest";
+ };
+
+ return RecommendRequest;
+ })();
+
+ v1beta.RecommendResponse = (function() {
+
+ /**
+ * Properties of a RecommendResponse.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IRecommendResponse
+ * @property {Array.|null} [results] RecommendResponse results
+ * @property {string|null} [attributionToken] RecommendResponse attributionToken
+ * @property {Array.|null} [missingIds] RecommendResponse missingIds
+ * @property {boolean|null} [validateOnly] RecommendResponse validateOnly
+ */
+
+ /**
+ * Constructs a new RecommendResponse.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a RecommendResponse.
+ * @implements IRecommendResponse
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse=} [properties] Properties to set
+ */
+ function RecommendResponse(properties) {
+ this.results = [];
+ this.missingIds = [];
+ 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]];
+ }
+
+ /**
+ * RecommendResponse results.
+ * @member {Array.} results
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @instance
+ */
+ RecommendResponse.prototype.results = $util.emptyArray;
+
+ /**
+ * RecommendResponse attributionToken.
+ * @member {string} attributionToken
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @instance
+ */
+ RecommendResponse.prototype.attributionToken = "";
+
+ /**
+ * RecommendResponse missingIds.
+ * @member {Array.} missingIds
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @instance
+ */
+ RecommendResponse.prototype.missingIds = $util.emptyArray;
+
+ /**
+ * RecommendResponse validateOnly.
+ * @member {boolean} validateOnly
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @instance
+ */
+ RecommendResponse.prototype.validateOnly = false;
+
+ /**
+ * Creates a new RecommendResponse instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse instance
+ */
+ RecommendResponse.create = function create(properties) {
+ return new RecommendResponse(properties);
+ };
+
+ /**
+ * Encodes the specified RecommendResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse} message RecommendResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RecommendResponse.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.results != null && message.results.length)
+ for (var i = 0; i < message.results.length; ++i)
+ $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
+ if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.attributionToken);
+ if (message.missingIds != null && message.missingIds.length)
+ for (var i = 0; i < message.missingIds.length; ++i)
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.missingIds[i]);
+ if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly"))
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified RecommendResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse} message RecommendResponse message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RecommendResponse.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RecommendResponse message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RecommendResponse.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.discoveryengine.v1beta.RecommendResponse();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (!(message.results && message.results.length))
+ message.results = [];
+ message.results.push($root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.decode(reader, reader.uint32()));
+ break;
+ }
+ case 2: {
+ message.attributionToken = reader.string();
+ break;
+ }
+ case 3: {
+ if (!(message.missingIds && message.missingIds.length))
+ message.missingIds = [];
+ message.missingIds.push(reader.string());
+ break;
+ }
+ case 4: {
+ message.validateOnly = reader.bool();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a RecommendResponse message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RecommendResponse.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RecommendResponse message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RecommendResponse.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.results != null && message.hasOwnProperty("results")) {
+ if (!Array.isArray(message.results))
+ return "results: array expected";
+ for (var i = 0; i < message.results.length; ++i) {
+ var error = $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify(message.results[i]);
+ if (error)
+ return "results." + error;
+ }
+ }
+ if (message.attributionToken != null && message.hasOwnProperty("attributionToken"))
+ if (!$util.isString(message.attributionToken))
+ return "attributionToken: string expected";
+ if (message.missingIds != null && message.hasOwnProperty("missingIds")) {
+ if (!Array.isArray(message.missingIds))
+ return "missingIds: array expected";
+ for (var i = 0; i < message.missingIds.length; ++i)
+ if (!$util.isString(message.missingIds[i]))
+ return "missingIds: string[] expected";
+ }
+ if (message.validateOnly != null && message.hasOwnProperty("validateOnly"))
+ if (typeof message.validateOnly !== "boolean")
+ return "validateOnly: boolean expected";
+ return null;
+ };
+
+ /**
+ * Creates a RecommendResponse message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse
+ */
+ RecommendResponse.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.RecommendResponse)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse();
+ if (object.results) {
+ if (!Array.isArray(object.results))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: array expected");
+ message.results = [];
+ for (var i = 0; i < object.results.length; ++i) {
+ if (typeof object.results[i] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: object expected");
+ message.results[i] = $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.fromObject(object.results[i]);
+ }
+ }
+ if (object.attributionToken != null)
+ message.attributionToken = String(object.attributionToken);
+ if (object.missingIds) {
+ if (!Array.isArray(object.missingIds))
+ throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.missingIds: array expected");
+ message.missingIds = [];
+ for (var i = 0; i < object.missingIds.length; ++i)
+ message.missingIds[i] = String(object.missingIds[i]);
+ }
+ if (object.validateOnly != null)
+ message.validateOnly = Boolean(object.validateOnly);
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RecommendResponse message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.RecommendResponse} message RecommendResponse
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RecommendResponse.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults) {
+ object.results = [];
+ object.missingIds = [];
+ }
+ if (options.defaults) {
+ object.attributionToken = "";
+ object.validateOnly = false;
+ }
+ if (message.results && message.results.length) {
+ object.results = [];
+ for (var j = 0; j < message.results.length; ++j)
+ object.results[j] = $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.toObject(message.results[j], options);
+ }
+ if (message.attributionToken != null && message.hasOwnProperty("attributionToken"))
+ object.attributionToken = message.attributionToken;
+ if (message.missingIds && message.missingIds.length) {
+ object.missingIds = [];
+ for (var j = 0; j < message.missingIds.length; ++j)
+ object.missingIds[j] = message.missingIds[j];
+ }
+ if (message.validateOnly != null && message.hasOwnProperty("validateOnly"))
+ object.validateOnly = message.validateOnly;
+ return object;
+ };
+
+ /**
+ * Converts this RecommendResponse to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RecommendResponse.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for RecommendResponse
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RecommendResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.RecommendResponse";
+ };
+
+ RecommendResponse.RecommendationResult = (function() {
+
+ /**
+ * Properties of a RecommendationResult.
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @interface IRecommendationResult
+ * @property {string|null} [id] RecommendationResult id
+ * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] RecommendationResult document
+ * @property {Object.|null} [metadata] RecommendationResult metadata
+ */
+
+ /**
+ * Constructs a new RecommendationResult.
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse
+ * @classdesc Represents a RecommendationResult.
+ * @implements IRecommendationResult
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult=} [properties] Properties to set
+ */
+ function RecommendationResult(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]];
+ }
+
+ /**
+ * RecommendationResult id.
+ * @member {string} id
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @instance
+ */
+ RecommendationResult.prototype.id = "";
+
+ /**
+ * RecommendationResult document.
+ * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @instance
+ */
+ RecommendationResult.prototype.document = null;
+
+ /**
+ * RecommendationResult metadata.
+ * @member {Object.} metadata
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @instance
+ */
+ RecommendationResult.prototype.metadata = $util.emptyObject;
+
+ /**
+ * Creates a new RecommendationResult instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult instance
+ */
+ RecommendationResult.create = function create(properties) {
+ return new RecommendationResult(properties);
+ };
+
+ /**
+ * Encodes the specified RecommendationResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult} message RecommendationResult message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RecommendationResult.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.document != null && Object.hasOwnProperty.call(message, "document"))
+ $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ 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]);
+ $root.google.protobuf.Value.encode(message.metadata[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
+ }
+ return writer;
+ };
+
+ /**
+ * Encodes the specified RecommendationResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult} message RecommendationResult message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ RecommendationResult.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a RecommendationResult message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RecommendationResult.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.discoveryengine.v1beta.RecommendResponse.RecommendationResult(), key, value;
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.id = reader.string();
+ break;
+ }
+ case 2: {
+ message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32());
+ break;
+ }
+ case 3: {
+ if (message.metadata === $util.emptyObject)
+ message.metadata = {};
+ 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.protobuf.Value.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag2 & 7);
+ break;
+ }
+ }
+ message.metadata[key] = value;
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a RecommendationResult message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ RecommendationResult.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a RecommendationResult message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ RecommendationResult.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.document != null && message.hasOwnProperty("document")) {
+ var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document);
+ if (error)
+ return "document." + error;
+ }
+ 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) {
+ var error = $root.google.protobuf.Value.verify(message.metadata[key[i]]);
+ if (error)
+ return "metadata." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a RecommendationResult message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult
+ */
+ RecommendationResult.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult();
+ if (object.id != null)
+ message.id = String(object.id);
+ if (object.document != null) {
+ if (typeof object.document !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document: object expected");
+ message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document);
+ }
+ if (object.metadata) {
+ if (typeof object.metadata !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected");
+ message.metadata = {};
+ for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) {
+ if (typeof object.metadata[keys[i]] !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected");
+ message.metadata[keys[i]] = $root.google.protobuf.Value.fromObject(object.metadata[keys[i]]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a RecommendationResult message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} message RecommendationResult
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ RecommendationResult.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.objects || options.defaults)
+ object.metadata = {};
+ if (options.defaults) {
+ object.id = "";
+ object.document = null;
+ }
+ if (message.id != null && message.hasOwnProperty("id"))
+ object.id = message.id;
+ if (message.document != null && message.hasOwnProperty("document"))
+ object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options);
+ 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]] = $root.google.protobuf.Value.toObject(message.metadata[keys2[j]], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this RecommendationResult to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ RecommendationResult.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for RecommendationResult
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ RecommendationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult";
+ };
+
+ return RecommendationResult;
+ })();
+
+ return RecommendResponse;
+ })();
+
+ v1beta.UserEventService = (function() {
+
+ /**
+ * Constructs a new UserEventService service.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a UserEventService
+ * @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 UserEventService(rpcImpl, requestDelimited, responseDelimited) {
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
+ }
+
+ (UserEventService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserEventService;
+
+ /**
+ * Creates new UserEventService service using the specified rpc implementation.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @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 {UserEventService} RPC service. Useful where requests and/or responses are streamed.
+ */
+ UserEventService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
+ return new this(rpcImpl, requestDelimited, responseDelimited);
+ };
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.UserEventService|writeUserEvent}.
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @typedef WriteUserEventCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.cloud.discoveryengine.v1beta.UserEvent} [response] UserEvent
+ */
+
+ /**
+ * Calls WriteUserEvent.
+ * @function writeUserEvent
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IWriteUserEventRequest} request WriteUserEventRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.UserEventService.WriteUserEventCallback} callback Node-style callback called with the error, if any, and UserEvent
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(UserEventService.prototype.writeUserEvent = function writeUserEvent(request, callback) {
+ return this.rpcCall(writeUserEvent, $root.google.cloud.discoveryengine.v1beta.WriteUserEventRequest, $root.google.cloud.discoveryengine.v1beta.UserEvent, request, callback);
+ }, "name", { value: "WriteUserEvent" });
+
+ /**
+ * Calls WriteUserEvent.
+ * @function writeUserEvent
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IWriteUserEventRequest} request WriteUserEventRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.UserEventService|collectUserEvent}.
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @typedef CollectUserEventCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.api.HttpBody} [response] HttpBody
+ */
+
+ /**
+ * Calls CollectUserEvent.
+ * @function collectUserEvent
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.ICollectUserEventRequest} request CollectUserEventRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEventCallback} callback Node-style callback called with the error, if any, and HttpBody
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(UserEventService.prototype.collectUserEvent = function collectUserEvent(request, callback) {
+ return this.rpcCall(collectUserEvent, $root.google.cloud.discoveryengine.v1beta.CollectUserEventRequest, $root.google.api.HttpBody, request, callback);
+ }, "name", { value: "CollectUserEvent" });
+
+ /**
+ * Calls CollectUserEvent.
+ * @function collectUserEvent
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.ICollectUserEventRequest} request CollectUserEventRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ /**
+ * Callback as used by {@link google.cloud.discoveryengine.v1beta.UserEventService|importUserEvents}.
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @typedef ImportUserEventsCallback
+ * @type {function}
+ * @param {Error|null} error Error, if any
+ * @param {google.longrunning.Operation} [response] Operation
+ */
+
+ /**
+ * Calls ImportUserEvents.
+ * @function importUserEvents
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest} request ImportUserEventsRequest message or plain object
+ * @param {google.cloud.discoveryengine.v1beta.UserEventService.ImportUserEventsCallback} callback Node-style callback called with the error, if any, and Operation
+ * @returns {undefined}
+ * @variation 1
+ */
+ Object.defineProperty(UserEventService.prototype.importUserEvents = function importUserEvents(request, callback) {
+ return this.rpcCall(importUserEvents, $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest, $root.google.longrunning.Operation, request, callback);
+ }, "name", { value: "ImportUserEvents" });
+
+ /**
+ * Calls ImportUserEvents.
+ * @function importUserEvents
+ * @memberof google.cloud.discoveryengine.v1beta.UserEventService
+ * @instance
+ * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest} request ImportUserEventsRequest message or plain object
+ * @returns {Promise} Promise
+ * @variation 2
+ */
+
+ return UserEventService;
+ })();
+
+ v1beta.WriteUserEventRequest = (function() {
+
+ /**
+ * Properties of a WriteUserEventRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface IWriteUserEventRequest
+ * @property {string|null} [parent] WriteUserEventRequest parent
+ * @property {google.cloud.discoveryengine.v1beta.IUserEvent|null} [userEvent] WriteUserEventRequest userEvent
+ */
+
+ /**
+ * Constructs a new WriteUserEventRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a WriteUserEventRequest.
+ * @implements IWriteUserEventRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.IWriteUserEventRequest=} [properties] Properties to set
+ */
+ function WriteUserEventRequest(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]];
+ }
+
+ /**
+ * WriteUserEventRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @instance
+ */
+ WriteUserEventRequest.prototype.parent = "";
+
+ /**
+ * WriteUserEventRequest userEvent.
+ * @member {google.cloud.discoveryengine.v1beta.IUserEvent|null|undefined} userEvent
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @instance
+ */
+ WriteUserEventRequest.prototype.userEvent = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * WriteUserEventRequest _userEvent.
+ * @member {"userEvent"|undefined} _userEvent
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @instance
+ */
+ Object.defineProperty(WriteUserEventRequest.prototype, "_userEvent", {
+ get: $util.oneOfGetter($oneOfFields = ["userEvent"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new WriteUserEventRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IWriteUserEventRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.WriteUserEventRequest} WriteUserEventRequest instance
+ */
+ WriteUserEventRequest.create = function create(properties) {
+ return new WriteUserEventRequest(properties);
+ };
+
+ /**
+ * Encodes the specified WriteUserEventRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.WriteUserEventRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IWriteUserEventRequest} message WriteUserEventRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ WriteUserEventRequest.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.userEvent != null && Object.hasOwnProperty.call(message, "userEvent"))
+ $root.google.cloud.discoveryengine.v1beta.UserEvent.encode(message.userEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified WriteUserEventRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.WriteUserEventRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.IWriteUserEventRequest} message WriteUserEventRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ WriteUserEventRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a WriteUserEventRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.WriteUserEventRequest} WriteUserEventRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ WriteUserEventRequest.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.discoveryengine.v1beta.WriteUserEventRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.decode(reader, reader.uint32());
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a WriteUserEventRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.WriteUserEventRequest} WriteUserEventRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ WriteUserEventRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a WriteUserEventRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ WriteUserEventRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.userEvent != null && message.hasOwnProperty("userEvent")) {
+ properties._userEvent = 1;
+ {
+ var error = $root.google.cloud.discoveryengine.v1beta.UserEvent.verify(message.userEvent);
+ if (error)
+ return "userEvent." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a WriteUserEventRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.WriteUserEventRequest} WriteUserEventRequest
+ */
+ WriteUserEventRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.WriteUserEventRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.WriteUserEventRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.userEvent != null) {
+ if (typeof object.userEvent !== "object")
+ throw TypeError(".google.cloud.discoveryengine.v1beta.WriteUserEventRequest.userEvent: object expected");
+ message.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(object.userEvent);
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a WriteUserEventRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.WriteUserEventRequest} message WriteUserEventRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ WriteUserEventRequest.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;
+ if (message.userEvent != null && message.hasOwnProperty("userEvent")) {
+ object.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.toObject(message.userEvent, options);
+ if (options.oneofs)
+ object._userEvent = "userEvent";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this WriteUserEventRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ WriteUserEventRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for WriteUserEventRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.WriteUserEventRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ WriteUserEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.WriteUserEventRequest";
+ };
+
+ return WriteUserEventRequest;
+ })();
+
+ v1beta.CollectUserEventRequest = (function() {
+
+ /**
+ * Properties of a CollectUserEventRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @interface ICollectUserEventRequest
+ * @property {string|null} [parent] CollectUserEventRequest parent
+ * @property {string|null} [userEvent] CollectUserEventRequest userEvent
+ * @property {string|null} [uri] CollectUserEventRequest uri
+ * @property {number|Long|null} [ets] CollectUserEventRequest ets
+ */
+
+ /**
+ * Constructs a new CollectUserEventRequest.
+ * @memberof google.cloud.discoveryengine.v1beta
+ * @classdesc Represents a CollectUserEventRequest.
+ * @implements ICollectUserEventRequest
+ * @constructor
+ * @param {google.cloud.discoveryengine.v1beta.ICollectUserEventRequest=} [properties] Properties to set
+ */
+ function CollectUserEventRequest(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]];
+ }
+
+ /**
+ * CollectUserEventRequest parent.
+ * @member {string} parent
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @instance
+ */
+ CollectUserEventRequest.prototype.parent = "";
+
+ /**
+ * CollectUserEventRequest userEvent.
+ * @member {string} userEvent
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @instance
+ */
+ CollectUserEventRequest.prototype.userEvent = "";
+
+ /**
+ * CollectUserEventRequest uri.
+ * @member {string|null|undefined} uri
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @instance
+ */
+ CollectUserEventRequest.prototype.uri = null;
+
+ /**
+ * CollectUserEventRequest ets.
+ * @member {number|Long|null|undefined} ets
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @instance
+ */
+ CollectUserEventRequest.prototype.ets = null;
+
+ // OneOf field names bound to virtual getters and setters
+ var $oneOfFields;
+
+ /**
+ * CollectUserEventRequest _uri.
+ * @member {"uri"|undefined} _uri
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @instance
+ */
+ Object.defineProperty(CollectUserEventRequest.prototype, "_uri", {
+ get: $util.oneOfGetter($oneOfFields = ["uri"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * CollectUserEventRequest _ets.
+ * @member {"ets"|undefined} _ets
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @instance
+ */
+ Object.defineProperty(CollectUserEventRequest.prototype, "_ets", {
+ get: $util.oneOfGetter($oneOfFields = ["ets"]),
+ set: $util.oneOfSetter($oneOfFields)
+ });
+
+ /**
+ * Creates a new CollectUserEventRequest instance using the specified properties.
+ * @function create
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICollectUserEventRequest=} [properties] Properties to set
+ * @returns {google.cloud.discoveryengine.v1beta.CollectUserEventRequest} CollectUserEventRequest instance
+ */
+ CollectUserEventRequest.create = function create(properties) {
+ return new CollectUserEventRequest(properties);
+ };
+
+ /**
+ * Encodes the specified CollectUserEventRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CollectUserEventRequest.verify|verify} messages.
+ * @function encode
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICollectUserEventRequest} message CollectUserEventRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CollectUserEventRequest.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.userEvent != null && Object.hasOwnProperty.call(message, "userEvent"))
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.userEvent);
+ if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri);
+ if (message.ets != null && Object.hasOwnProperty.call(message, "ets"))
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.ets);
+ return writer;
+ };
+
+ /**
+ * Encodes the specified CollectUserEventRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CollectUserEventRequest.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.ICollectUserEventRequest} message CollectUserEventRequest message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ CollectUserEventRequest.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a CollectUserEventRequest message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.cloud.discoveryengine.v1beta.CollectUserEventRequest} CollectUserEventRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CollectUserEventRequest.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.discoveryengine.v1beta.CollectUserEventRequest();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.parent = reader.string();
+ break;
+ }
+ case 2: {
+ message.userEvent = reader.string();
+ break;
+ }
+ case 3: {
+ message.uri = reader.string();
+ break;
+ }
+ case 4: {
+ message.ets = reader.int64();
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a CollectUserEventRequest message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.cloud.discoveryengine.v1beta.CollectUserEventRequest} CollectUserEventRequest
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ CollectUserEventRequest.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a CollectUserEventRequest message.
+ * @function verify
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ CollectUserEventRequest.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ var properties = {};
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ if (!$util.isString(message.parent))
+ return "parent: string expected";
+ if (message.userEvent != null && message.hasOwnProperty("userEvent"))
+ if (!$util.isString(message.userEvent))
+ return "userEvent: string expected";
+ if (message.uri != null && message.hasOwnProperty("uri")) {
+ properties._uri = 1;
+ if (!$util.isString(message.uri))
+ return "uri: string expected";
+ }
+ if (message.ets != null && message.hasOwnProperty("ets")) {
+ properties._ets = 1;
+ if (!$util.isInteger(message.ets) && !(message.ets && $util.isInteger(message.ets.low) && $util.isInteger(message.ets.high)))
+ return "ets: integer|Long expected";
+ }
+ return null;
+ };
+
+ /**
+ * Creates a CollectUserEventRequest message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.cloud.discoveryengine.v1beta.CollectUserEventRequest} CollectUserEventRequest
+ */
+ CollectUserEventRequest.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.cloud.discoveryengine.v1beta.CollectUserEventRequest)
+ return object;
+ var message = new $root.google.cloud.discoveryengine.v1beta.CollectUserEventRequest();
+ if (object.parent != null)
+ message.parent = String(object.parent);
+ if (object.userEvent != null)
+ message.userEvent = String(object.userEvent);
+ if (object.uri != null)
+ message.uri = String(object.uri);
+ if (object.ets != null)
+ if ($util.Long)
+ (message.ets = $util.Long.fromValue(object.ets)).unsigned = false;
+ else if (typeof object.ets === "string")
+ message.ets = parseInt(object.ets, 10);
+ else if (typeof object.ets === "number")
+ message.ets = object.ets;
+ else if (typeof object.ets === "object")
+ message.ets = new $util.LongBits(object.ets.low >>> 0, object.ets.high >>> 0).toNumber();
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a CollectUserEventRequest message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @static
+ * @param {google.cloud.discoveryengine.v1beta.CollectUserEventRequest} message CollectUserEventRequest
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ CollectUserEventRequest.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.defaults) {
+ object.parent = "";
+ object.userEvent = "";
+ }
+ if (message.parent != null && message.hasOwnProperty("parent"))
+ object.parent = message.parent;
+ if (message.userEvent != null && message.hasOwnProperty("userEvent"))
+ object.userEvent = message.userEvent;
+ if (message.uri != null && message.hasOwnProperty("uri")) {
+ object.uri = message.uri;
+ if (options.oneofs)
+ object._uri = "uri";
+ }
+ if (message.ets != null && message.hasOwnProperty("ets")) {
+ if (typeof message.ets === "number")
+ object.ets = options.longs === String ? String(message.ets) : message.ets;
+ else
+ object.ets = options.longs === String ? $util.Long.prototype.toString.call(message.ets) : options.longs === Number ? new $util.LongBits(message.ets.low >>> 0, message.ets.high >>> 0).toNumber() : message.ets;
+ if (options.oneofs)
+ object._ets = "ets";
+ }
+ return object;
+ };
+
+ /**
+ * Converts this CollectUserEventRequest to JSON.
+ * @function toJSON
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ CollectUserEventRequest.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for CollectUserEventRequest
+ * @function getTypeUrl
+ * @memberof google.cloud.discoveryengine.v1beta.CollectUserEventRequest
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ CollectUserEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CollectUserEventRequest";
+ };
+
+ return CollectUserEventRequest;
+ })();
+
+ return v1beta;
+ })();
+
+ return discoveryengine;
+ })();
+
+ return cloud;
+ })();
+
+ google.api = (function() {
+
+ /**
+ * Namespace api.
+ * @memberof google
+ * @namespace
+ */
+ var api = {};
+
+ 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) {
+ 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:
+ 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] : 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]] : 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;
+ })();
+
+ /**
+ * 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.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;
+ })();
+
+ api.HttpBody = (function() {
+
+ /**
+ * Properties of a HttpBody.
+ * @memberof google.api
+ * @interface IHttpBody
+ * @property {string|null} [contentType] HttpBody contentType
+ * @property {Uint8Array|null} [data] HttpBody data
+ * @property {Array.|null} [extensions] HttpBody extensions
+ */
+
+ /**
+ * Constructs a new HttpBody.
+ * @memberof google.api
+ * @classdesc Represents a HttpBody.
+ * @implements IHttpBody
+ * @constructor
+ * @param {google.api.IHttpBody=} [properties] Properties to set
+ */
+ function HttpBody(properties) {
+ this.extensions = [];
+ 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]];
+ }
+
+ /**
+ * HttpBody contentType.
+ * @member {string} contentType
+ * @memberof google.api.HttpBody
+ * @instance
+ */
+ HttpBody.prototype.contentType = "";
+
+ /**
+ * HttpBody data.
+ * @member {Uint8Array} data
+ * @memberof google.api.HttpBody
+ * @instance
+ */
+ HttpBody.prototype.data = $util.newBuffer([]);
+
+ /**
+ * HttpBody extensions.
+ * @member {Array.} extensions
+ * @memberof google.api.HttpBody
+ * @instance
+ */
+ HttpBody.prototype.extensions = $util.emptyArray;
+
+ /**
+ * Creates a new HttpBody instance using the specified properties.
+ * @function create
+ * @memberof google.api.HttpBody
+ * @static
+ * @param {google.api.IHttpBody=} [properties] Properties to set
+ * @returns {google.api.HttpBody} HttpBody instance
+ */
+ HttpBody.create = function create(properties) {
+ return new HttpBody(properties);
+ };
+
+ /**
+ * Encodes the specified HttpBody message. Does not implicitly {@link google.api.HttpBody.verify|verify} messages.
+ * @function encode
+ * @memberof google.api.HttpBody
+ * @static
+ * @param {google.api.IHttpBody} message HttpBody message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ HttpBody.encode = function encode(message, writer) {
+ if (!writer)
+ writer = $Writer.create();
+ if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType"))
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.contentType);
+ if (message.data != null && Object.hasOwnProperty.call(message, "data"))
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data);
+ if (message.extensions != null && message.extensions.length)
+ for (var i = 0; i < message.extensions.length; ++i)
+ $root.google.protobuf.Any.encode(message.extensions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
+ return writer;
+ };
+
+ /**
+ * Encodes the specified HttpBody message, length delimited. Does not implicitly {@link google.api.HttpBody.verify|verify} messages.
+ * @function encodeDelimited
+ * @memberof google.api.HttpBody
+ * @static
+ * @param {google.api.IHttpBody} message HttpBody message or plain object to encode
+ * @param {$protobuf.Writer} [writer] Writer to encode to
+ * @returns {$protobuf.Writer} Writer
+ */
+ HttpBody.encodeDelimited = function encodeDelimited(message, writer) {
+ return this.encode(message, writer).ldelim();
+ };
+
+ /**
+ * Decodes a HttpBody message from the specified reader or buffer.
+ * @function decode
+ * @memberof google.api.HttpBody
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @param {number} [length] Message length if known beforehand
+ * @returns {google.api.HttpBody} HttpBody
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ HttpBody.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.HttpBody();
+ while (reader.pos < end) {
+ var tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ message.contentType = reader.string();
+ break;
+ }
+ case 2: {
+ message.data = reader.bytes();
+ break;
+ }
+ case 3: {
+ if (!(message.extensions && message.extensions.length))
+ message.extensions = [];
+ message.extensions.push($root.google.protobuf.Any.decode(reader, reader.uint32()));
+ break;
+ }
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Decodes a HttpBody message from the specified reader or buffer, length delimited.
+ * @function decodeDelimited
+ * @memberof google.api.HttpBody
+ * @static
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
+ * @returns {google.api.HttpBody} HttpBody
+ * @throws {Error} If the payload is not a reader or valid buffer
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
+ */
+ HttpBody.decodeDelimited = function decodeDelimited(reader) {
+ if (!(reader instanceof $Reader))
+ reader = new $Reader(reader);
+ return this.decode(reader, reader.uint32());
+ };
+
+ /**
+ * Verifies a HttpBody message.
+ * @function verify
+ * @memberof google.api.HttpBody
+ * @static
+ * @param {Object.} message Plain object to verify
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
+ */
+ HttpBody.verify = function verify(message) {
+ if (typeof message !== "object" || message === null)
+ return "object expected";
+ if (message.contentType != null && message.hasOwnProperty("contentType"))
+ if (!$util.isString(message.contentType))
+ return "contentType: string expected";
+ if (message.data != null && message.hasOwnProperty("data"))
+ if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
+ return "data: buffer expected";
+ if (message.extensions != null && message.hasOwnProperty("extensions")) {
+ if (!Array.isArray(message.extensions))
+ return "extensions: array expected";
+ for (var i = 0; i < message.extensions.length; ++i) {
+ var error = $root.google.protobuf.Any.verify(message.extensions[i]);
+ if (error)
+ return "extensions." + error;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * Creates a HttpBody message from a plain object. Also converts values to their respective internal types.
+ * @function fromObject
+ * @memberof google.api.HttpBody
+ * @static
+ * @param {Object.} object Plain object
+ * @returns {google.api.HttpBody} HttpBody
+ */
+ HttpBody.fromObject = function fromObject(object) {
+ if (object instanceof $root.google.api.HttpBody)
+ return object;
+ var message = new $root.google.api.HttpBody();
+ if (object.contentType != null)
+ message.contentType = String(object.contentType);
+ if (object.data != null)
+ if (typeof object.data === "string")
+ $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
+ else if (object.data.length >= 0)
+ message.data = object.data;
+ if (object.extensions) {
+ if (!Array.isArray(object.extensions))
+ throw TypeError(".google.api.HttpBody.extensions: array expected");
+ message.extensions = [];
+ for (var i = 0; i < object.extensions.length; ++i) {
+ if (typeof object.extensions[i] !== "object")
+ throw TypeError(".google.api.HttpBody.extensions: object expected");
+ message.extensions[i] = $root.google.protobuf.Any.fromObject(object.extensions[i]);
+ }
+ }
+ return message;
+ };
+
+ /**
+ * Creates a plain object from a HttpBody message. Also converts values to other types if specified.
+ * @function toObject
+ * @memberof google.api.HttpBody
+ * @static
+ * @param {google.api.HttpBody} message HttpBody
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
+ * @returns {Object.} Plain object
+ */
+ HttpBody.toObject = function toObject(message, options) {
+ if (!options)
+ options = {};
+ var object = {};
+ if (options.arrays || options.defaults)
+ object.extensions = [];
+ if (options.defaults) {
+ object.contentType = "";
+ if (options.bytes === String)
+ object.data = "";
+ else {
+ object.data = [];
+ if (options.bytes !== Array)
+ object.data = $util.newBuffer(object.data);
+ }
+ }
+ if (message.contentType != null && message.hasOwnProperty("contentType"))
+ object.contentType = message.contentType;
+ if (message.data != null && message.hasOwnProperty("data"))
+ object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;
+ if (message.extensions && message.extensions.length) {
+ object.extensions = [];
+ for (var j = 0; j < message.extensions.length; ++j)
+ object.extensions[j] = $root.google.protobuf.Any.toObject(message.extensions[j], options);
+ }
+ return object;
+ };
+
+ /**
+ * Converts this HttpBody to JSON.
+ * @function toJSON
+ * @memberof google.api.HttpBody
+ * @instance
+ * @returns {Object.} JSON object
+ */
+ HttpBody.prototype.toJSON = function toJSON() {
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
+ };
+
+ /**
+ * Gets the default type url for HttpBody
+ * @function getTypeUrl
+ * @memberof google.api.HttpBody
+ * @static
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
+ * @returns {string} The default type url
+ */
+ HttpBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
+ if (typeUrlPrefix === undefined) {
+ typeUrlPrefix = "type.googleapis.com";
+ }
+ return typeUrlPrefix + "/google.api.HttpBody";
+ };
+
+ return HttpBody;
+ })();
+
+ 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.