diff --git a/packages/google-cloud-optimization/.OwlBot.yaml b/packages/google-cloud-optimization/.OwlBot.yaml
deleted file mode 100644
index b075fc91637..00000000000
--- a/packages/google-cloud-optimization/.OwlBot.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 2021 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-deep-remove-regex:
- - /owl-bot-staging
-deep-copy-regex:
- - source: /google/cloud/optimization/(.*)/.*-nodejs
- dest: /owl-bot-staging/google-cloud-optimization/$1
-api-name: optimization
diff --git a/packages/google-cloud-optimization/.eslintignore b/packages/google-cloud-optimization/.eslintignore
deleted file mode 100644
index ea5b04aebe6..00000000000
--- a/packages/google-cloud-optimization/.eslintignore
+++ /dev/null
@@ -1,7 +0,0 @@
-**/node_modules
-**/coverage
-test/fixtures
-build/
-docs/
-protos/
-samples/generated/
diff --git a/packages/google-cloud-optimization/.eslintrc.json b/packages/google-cloud-optimization/.eslintrc.json
deleted file mode 100644
index 78215349546..00000000000
--- a/packages/google-cloud-optimization/.eslintrc.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": "./node_modules/gts"
-}
diff --git a/packages/google-cloud-optimization/.gitattributes b/packages/google-cloud-optimization/.gitattributes
deleted file mode 100644
index 33739cb74e4..00000000000
--- a/packages/google-cloud-optimization/.gitattributes
+++ /dev/null
@@ -1,4 +0,0 @@
-*.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-optimization/.gitignore b/packages/google-cloud-optimization/.gitignore
deleted file mode 100644
index d4f03a0df2e..00000000000
--- a/packages/google-cloud-optimization/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-**/*.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-optimization/.jsdoc.js b/packages/google-cloud-optimization/.jsdoc.js
deleted file mode 100644
index aa821f0603e..00000000000
--- a/packages/google-cloud-optimization/.jsdoc.js
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2025 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// 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 2025 Google LLC',
- includeDate: false,
- sourceFiles: false,
- systemName: '@google-cloud/optimization',
- theme: 'lumen',
- default: {
- outputSourceFiles: false
- }
- },
- markdown: {
- idInHeadings: true
- }
-};
diff --git a/packages/google-cloud-optimization/.mocharc.js b/packages/google-cloud-optimization/.mocharc.js
deleted file mode 100644
index eef6173ab44..00000000000
--- a/packages/google-cloud-optimization/.mocharc.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2025 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-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-optimization/.nycrc b/packages/google-cloud-optimization/.nycrc
deleted file mode 100644
index b18d5472b62..00000000000
--- a/packages/google-cloud-optimization/.nycrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "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-optimization/.prettierignore b/packages/google-cloud-optimization/.prettierignore
deleted file mode 100644
index 9340ad9b86d..00000000000
--- a/packages/google-cloud-optimization/.prettierignore
+++ /dev/null
@@ -1,6 +0,0 @@
-**/node_modules
-**/coverage
-test/fixtures
-build/
-docs/
-protos/
diff --git a/packages/google-cloud-optimization/.prettierrc.js b/packages/google-cloud-optimization/.prettierrc.js
deleted file mode 100644
index b189724933b..00000000000
--- a/packages/google-cloud-optimization/.prettierrc.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2025 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// 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-optimization/.repo-metadata.json b/packages/google-cloud-optimization/.repo-metadata.json
deleted file mode 100644
index bc3ea251a61..00000000000
--- a/packages/google-cloud-optimization/.repo-metadata.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "cloudoptimization",
- "name_pretty": "Cloud Optimization AI",
- "product_documentation": "https://cloud.google.com/optimization/",
- "client_documentation": "https://googleapis.dev/nodejs/cloudoptimization/latest/",
- "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues",
- "release_level": "stable",
- "language": "nodejs",
- "repo": "googleapis/google-cloud-node",
- "distribution_name": "@google-cloud/optimization",
- "api_id": "cloudoptimization.googleapis.com",
- "default_version": "v1",
- "requires_billing": true,
- "api_shortname": "cloudoptimization",
- "library_type": "GAPIC_AUTO"
-}
diff --git a/packages/google-cloud-optimization/CHANGELOG.md b/packages/google-cloud-optimization/CHANGELOG.md
deleted file mode 100644
index b3859992490..00000000000
--- a/packages/google-cloud-optimization/CHANGELOG.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# Changelog
-
-## [3.5.0](https://github.com/googleapis/google-cloud-node/compare/optimization-v3.4.0...optimization-v3.5.0) (2024-05-21)
-
-
-### Features
-
-* [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5351](https://github.com/googleapis/google-cloud-node/issues/5351)) ([01f48fc](https://github.com/googleapis/google-cloud-node/commit/01f48fce63ec4ddf801d59ee2b8c0db9f6fb8372))
-* [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5354](https://github.com/googleapis/google-cloud-node/issues/5354)) ([a9784ed](https://github.com/googleapis/google-cloud-node/commit/a9784ed3db6ee96d171762308bbbcd57390b6866))
-
-## [3.4.0](https://github.com/googleapis/google-cloud-node/compare/optimization-v3.3.0...optimization-v3.4.0) (2024-04-05)
-
-
-### Features
-
-* [Many APIs] add several fields to manage state of database encryption update ([#5190](https://github.com/googleapis/google-cloud-node/issues/5190)) ([b569fbe](https://github.com/googleapis/google-cloud-node/commit/b569fbe1472d0fd71c1bfb58d0b1661814ac5727))
-
-## [3.3.0](https://github.com/googleapis/google-cloud-node/compare/optimization-v3.2.0...optimization-v3.3.0) (2024-02-09)
-
-
-### Features
-
-* Trusted Private Cloud support, use the universeDomain parameter ([#5026](https://github.com/googleapis/google-cloud-node/issues/5026)) ([43acd89](https://github.com/googleapis/google-cloud-node/commit/43acd893e6c428f219d62f0c4264e4db78b99f99))
-
-## [3.2.0](https://github.com/googleapis/google-cloud-node/compare/optimization-v3.1.0...optimization-v3.2.0) (2023-10-18)
-
-
-### Features
-
-* [optimization] added the route modifiers ([#4737](https://github.com/googleapis/google-cloud-node/issues/4737)) ([58506db](https://github.com/googleapis/google-cloud-node/commit/58506dbc77a118a1d9fb78511822b7fa6bb4c57d))
-
-## [3.1.0](https://github.com/googleapis/google-cloud-node/compare/optimization-v3.0.1...optimization-v3.1.0) (2023-09-08)
-
-
-### Features
-
-* [optimization] added support for walking mode and cost_per_kilometer_below_soft_max ([#4620](https://github.com/googleapis/google-cloud-node/issues/4620)) ([083c352](https://github.com/googleapis/google-cloud-node/commit/083c3528fb32cc692df4c33cfbba3d2cca371e59))
-
-## [3.0.1](https://github.com/googleapis/google-cloud-node/compare/optimization-v3.0.0...optimization-v3.0.1) (2023-09-06)
-
-
-### Bug Fixes
-
-* [Many APIs] simplify logic for HTTP/1.1 REST fallback option ([#4587](https://github.com/googleapis/google-cloud-node/issues/4587)) ([e3b1e7e](https://github.com/googleapis/google-cloud-node/commit/e3b1e7e46d666abb4df28c3cd69e97c08b88445a))
-
-## [3.0.0](https://github.com/googleapis/google-cloud-node/compare/optimization-v2.2.2...optimization-v3.0.0) (2023-08-06)
-
-
-### ⚠ BREAKING CHANGES
-
-* migrate to Node 14 ([#4443](https://github.com/googleapis/google-cloud-node/issues/4443))
-
-### Bug Fixes
-
-* [Many APIs] fix typings for IAM methods ([#4462](https://github.com/googleapis/google-cloud-node/issues/4462)) ([6df8854](https://github.com/googleapis/google-cloud-node/commit/6df8854fdfbf62e6374f79d785f142b2f2e6cfae))
-
-
-### Miscellaneous Chores
-
-* Migrate to Node 14 ([#4443](https://github.com/googleapis/google-cloud-node/issues/4443)) ([2260f12](https://github.com/googleapis/google-cloud-node/commit/2260f12543d171bda95345e53475f5f0fdc45770))
-
-## [2.2.2](https://github.com/googleapis/google-cloud-node/compare/optimization-v2.2.1...optimization-v2.2.2) (2023-04-13)
-
-
-### Bug Fixes
-
-* **deps:** Bump `google-gax` to ^3.5.8 ([#4117](https://github.com/googleapis/google-cloud-node/issues/4117)) ([0b67d88](https://github.com/googleapis/google-cloud-node/commit/0b67d883963643ce1b4f6d2ccd3e8d37adf6e029))
-* Minify JSON and JS files, and remove .map files ([#4143](https://github.com/googleapis/google-cloud-node/issues/4143)) ([170f7d5](https://github.com/googleapis/google-cloud-node/commit/170f7d57b8fd344d182a8e758867b8124722eebc))
-
-## [2.2.1](https://github.com/googleapis/google-cloud-node/compare/optimization-v2.2.0...optimization-v2.2.1) (2023-02-15)
-
-
-### Bug Fixes
-
-* [Many APIs] changing format of the jsdoc links ([#3988](https://github.com/googleapis/google-cloud-node/issues/3988)) ([f2134ed](https://github.com/googleapis/google-cloud-node/commit/f2134ed5f166a3bb7dd0bed556700f0b0fd9756a))
-
-## [2.2.0](https://github.com/googleapis/google-cloud-node/compare/optimization-v2.1.1...optimization-v2.2.0) (2023-01-28)
-
-
-### Features
-
-* Added SuggestConversationSummary RPC ([#3853](https://github.com/googleapis/google-cloud-node/issues/3853)) ([cc352db](https://github.com/googleapis/google-cloud-node/commit/cc352db97f3bd8925bf1a7631a0ae64ff976fa4e))
-
-## [2.1.1](https://github.com/googleapis/nodejs-cloud-optimization/compare/v2.1.0...v2.1.1) (2022-11-11)
-
-
-### Bug Fixes
-
-* Better support for fallback mode ([#30](https://github.com/googleapis/nodejs-cloud-optimization/issues/30)) ([05b1532](https://github.com/googleapis/nodejs-cloud-optimization/commit/05b153292444a83b39975482bc836acd8a1932c2))
-* **deps:** Use google-gax v3.5.2 ([#46](https://github.com/googleapis/nodejs-cloud-optimization/issues/46)) ([6c3dda7](https://github.com/googleapis/nodejs-cloud-optimization/commit/6c3dda7ac623dd6079c49520b69de92989323744))
-* Preserve default values in x-goog-request-params header ([#35](https://github.com/googleapis/nodejs-cloud-optimization/issues/35)) ([7108aba](https://github.com/googleapis/nodejs-cloud-optimization/commit/7108abaa353591fcddef959dbe1d3e89a8f9619b))
-* Use _gaxModule when accessing gax for bundling ([#32](https://github.com/googleapis/nodejs-cloud-optimization/issues/32)) ([ae16ecb](https://github.com/googleapis/nodejs-cloud-optimization/commit/ae16ecb6b7c6202c7a5c705ca11e1b1a77baa027))
-
-## [2.1.0](https://github.com/googleapis/nodejs-cloud-optimization/compare/v2.0.0...v2.1.0) (2022-06-30)
-
-
-### Features
-
-* support regapic LRO ([#21](https://github.com/googleapis/nodejs-cloud-optimization/issues/21)) ([29c8275](https://github.com/googleapis/nodejs-cloud-optimization/commit/29c8275335cb2a4bfbb1910eb0a15731d58b70cf))
-
-## [2.0.0](https://github.com/googleapis/nodejs-cloud-optimization/compare/v1.0.0...v2.0.0) (2022-05-20)
-
-
-### ⚠ BREAKING CHANGES
-
-* upgrade to stable (#15)
-* update library to use Node 12 (#14)
-
-### Features
-
-* upgrade to stable ([#15](https://github.com/googleapis/nodejs-cloud-optimization/issues/15)) ([e376320](https://github.com/googleapis/nodejs-cloud-optimization/commit/e376320d27e03c169143aa248bb77979a78cd21f))
-
-
-### Build System
-
-* update library to use Node 12 ([#14](https://github.com/googleapis/nodejs-cloud-optimization/issues/14)) ([1cf73c3](https://github.com/googleapis/nodejs-cloud-optimization/commit/1cf73c3bf6b5ad78cf2851686d4ee84315d8f107))
-
-## 1.0.0 (2022-04-21)
-
-
-### Features
-
-* add templated files from docker image ([ff4111a](https://github.com/googleapis/nodejs-cloud-optimization/commit/ff4111a94f59bbafdbe09b29f143ca4d816e3e43))
-* add tests and samples to library ([#1](https://github.com/googleapis/nodejs-cloud-optimization/issues/1)) ([e272a2e](https://github.com/googleapis/nodejs-cloud-optimization/commit/e272a2e3a8e2bf5eaa71659ddebbebb4e63a307d))
-* initial stub of library ([1485722](https://github.com/googleapis/nodejs-cloud-optimization/commit/1485722e27ad53169373b710f3ecb4540f169dd2))
diff --git a/packages/google-cloud-optimization/CODE_OF_CONDUCT.md b/packages/google-cloud-optimization/CODE_OF_CONDUCT.md
deleted file mode 100644
index 2add2547a81..00000000000
--- a/packages/google-cloud-optimization/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,94 +0,0 @@
-
-# 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-optimization/CONTRIBUTING.md b/packages/google-cloud-optimization/CONTRIBUTING.md
deleted file mode 100644
index 7ea94e89514..00000000000
--- a/packages/google-cloud-optimization/CONTRIBUTING.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# 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 Cloud Optimization AI 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=cloudoptimization.googleapis.com
-[auth]: https://cloud.google.com/docs/authentication/getting-started
\ No newline at end of file
diff --git a/packages/google-cloud-optimization/LICENSE b/packages/google-cloud-optimization/LICENSE
deleted file mode 100644
index d6456956733..00000000000
--- a/packages/google-cloud-optimization/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- 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-optimization/README.md b/packages/google-cloud-optimization/README.md
deleted file mode 100644
index 5d6c9aa7d8a..00000000000
--- a/packages/google-cloud-optimization/README.md
+++ /dev/null
@@ -1,137 +0,0 @@
-[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
-[//]: # "To regenerate it, use `python -m synthtool`."
-
-
-# [Cloud Optimization AI: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-optimization)
-
-[](https://cloud.google.com/terms/launch-stages)
-[](https://www.npmjs.org/package/@google-cloud/optimization)
-
-
-
-
-optimization client for Node.js
-
-
-A comprehensive list of changes in each version may be found in
-[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-optimization/CHANGELOG.md).
-
-* [Cloud Optimization AI Node.js Client API Reference][client-docs]
-* [Cloud Optimization AI Documentation][product-docs]
-* [github.com/googleapis/google-cloud-node/packages/google-cloud-optimization](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-optimization)
-
-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)
-
-* [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 Cloud Optimization AI API][enable_api].
-1. [Set up authentication][auth] so you can access the
- API from your local workstation.
-
-### Installing the client library
-
-```bash
-npm install @google-cloud/optimization
-```
-
-
-
-
-## Samples
-
-Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-optimization/samples) directory. Each sample's `README.md` has instructions for running its sample.
-
-| Sample | Source Code | Try it |
-| --------------------------- | --------------------------------- | ------ |
-| Fleet_routing.batch_optimize_tours | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.batch_optimize_tours.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-optimization/samples/generated/v1/fleet_routing.batch_optimize_tours.js,packages/google-cloud-optimization/samples/README.md) |
-| Fleet_routing.optimize_tours | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.optimize_tours.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-optimization/samples/generated/v1/fleet_routing.optimize_tours.js,packages/google-cloud-optimization/samples/README.md) |
-| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-optimization/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-optimization/samples/quickstart.js,packages/google-cloud-optimization/samples/README.md) |
-
-
-
-The [Cloud Optimization AI 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://github.com/nodejs/release#release-schedule).
-Libraries are compatible with all current _active_ and _maintenance_ versions of
-Node.js.
-If you are using an end-of-life version of Node.js, we recommend that you update
-as soon as possible to an actively supported LTS version.
-
-Google's client libraries support legacy versions of Node.js runtimes on a
-best-efforts basis with the following warnings:
-
-* Legacy versions are not tested in continuous integration.
-* Some security patches and features cannot be backported.
-* Dependencies cannot be kept up-to-date.
-
-Client libraries targeting some end-of-life versions of Node.js are available, and
-can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
-The dist-tags follow the naming convention `legacy-(version)`.
-For example, `npm install @google-cloud/optimization@legacy-8` installs client libraries
-for versions compatible with Node.js 8.
-
-## Versioning
-
-This library follows [Semantic Versioning](http://semver.org/).
-
-
-
-This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
-unless absolutely necessary (e.g. because of critical security issues) or with
-an extensive deprecation period. Issues and requests against **stable** libraries
-are addressed with the highest priority.
-
-
-
-
-
-
-More Information: [Google Cloud Platform Launch Stages][launch_stages]
-
-[launch_stages]: https://cloud.google.com/terms/launch-stages
-
-## Contributing
-
-Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
-
-Please note that this `README.md`, the `samples/README.md`,
-and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
-are generated from a central template. To edit one of these files, make an edit
-to its templates in
-[directory](https://github.com/googleapis/synthtool).
-
-## License
-
-Apache Version 2.0
-
-See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
-
-[client-docs]: https://googleapis.dev/nodejs/cloudoptimization/latest/
-[product-docs]: https://cloud.google.com/optimization/
-[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=cloudoptimization.googleapis.com
-[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
diff --git a/packages/google-cloud-optimization/linkinator.config.json b/packages/google-cloud-optimization/linkinator.config.json
deleted file mode 100644
index befd23c8633..00000000000
--- a/packages/google-cloud-optimization/linkinator.config.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "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-optimization/package.json b/packages/google-cloud-optimization/package.json
deleted file mode 100644
index 3b3b1db8560..00000000000
--- a/packages/google-cloud-optimization/package.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- "name": "@google-cloud/optimization",
- "version": "3.5.0",
- "description": "optimization client for Node.js",
- "repository": {
- "type": "git",
- "directory": "packages/google-cloud-optimization",
- "url": "https://github.com/googleapis/google-cloud-node.git"
- },
- "license": "Apache-2.0",
- "author": "Google LLC",
- "main": "build/src/index.js",
- "files": [
- "build/src",
- "build/protos",
- "!build/src/**/*.map"
- ],
- "keywords": [
- "google apis client",
- "google api client",
- "google apis",
- "google api",
- "google",
- "google cloud platform",
- "google cloud",
- "cloud",
- "google optimization",
- "optimization",
- "optimization service"
- ],
- "scripts": {
- "clean": "gts clean",
- "compile": "tsc -p . && cp -r protos build/",
- "compile-protos": "compileProtos src",
- "docs": "jsdoc -c .jsdoc.js",
- "predocs-test": "npm run docs",
- "docs-test": "linkinator docs",
- "fix": "gts fix",
- "lint": "gts check",
- "prepare": "npm run compile",
- "prelint": "cd samples; npm link ../; npm i",
- "postpack": "minifyProtoJson",
- "samples-test": "cd samples/ && npm link ../ && npm i && npm test",
- "system-test": "c8 mocha build/system-test",
- "test": "c8 mocha build/test"
- },
- "dependencies": {
- "google-gax": "^4.0.3"
- },
- "devDependencies": {
- "@types/mocha": "^9.0.0",
- "@types/node": "^22.0.0",
- "@types/sinon": "^17.0.0",
- "c8": "^9.0.0",
- "gapic-tools": "^0.4.0",
- "gts": "^5.0.0",
- "jsdoc": "^4.0.0",
- "jsdoc-fresh": "^3.0.0",
- "jsdoc-region-tag": "^3.0.0",
- "linkinator": "4.1.2",
- "long": "^5.2.3",
- "mocha": "^9.2.2",
- "pack-n-play": "^2.0.0",
- "sinon": "^18.0.0",
- "typescript": "^5.1.6"
- },
- "engines": {
- "node": ">=14.0.0"
- },
- "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-optimization"
-}
\ No newline at end of file
diff --git a/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/async_model.proto b/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/async_model.proto
deleted file mode 100644
index 65e99f36fbd..00000000000
--- a/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/async_model.proto
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2024 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.optimization.v1;
-
-import "google/api/field_behavior.proto";
-import "google/protobuf/timestamp.proto";
-
-option go_package = "cloud.google.com/go/optimization/apiv1/optimizationpb;optimizationpb";
-option java_multiple_files = true;
-option java_outer_classname = "AsyncModelProto";
-option java_package = "com.google.cloud.optimization.v1";
-
-// The desired input location information.
-message InputConfig {
- // The location of the input model in cloud storage.
- // Required.
- oneof source {
- // The Google Cloud Storage location to read the input from. This must be a
- // single file.
- GcsSource gcs_source = 1;
- }
-
- // The input data format that used to store the model in Cloud Storage.
- DataFormat data_format = 2;
-}
-
-// The desired output location.
-message OutputConfig {
- // The location of the output result in cloud storage.
- // Required.
- oneof destination {
- // The Google Cloud Storage location to write the output to.
- GcsDestination gcs_destination = 1;
- }
-
- // The output data format that used to store the results in Cloud Storage.
- DataFormat data_format = 2;
-}
-
-// The Google Cloud Storage location where the input file will be read from.
-message GcsSource {
- // Required. URI of the Google Cloud Storage location.
- string uri = 1 [(google.api.field_behavior) = REQUIRED];
-}
-
-// The Google Cloud Storage location where the output file will be written to.
-message GcsDestination {
- // Required. URI of the Google Cloud Storage location.
- string uri = 1 [(google.api.field_behavior) = REQUIRED];
-}
-
-// The long running operation metadata for async model related methods.
-message AsyncModelMetadata {
- // Possible states of the operation.
- enum State {
- // The default value. This value is used if the state is omitted.
- STATE_UNSPECIFIED = 0;
-
- // Request is being processed.
- RUNNING = 1;
-
- // The operation completed successfully.
- SUCCEEDED = 2;
-
- // The operation was cancelled.
- CANCELLED = 3;
-
- // The operation has failed.
- FAILED = 4;
- }
-
- // The state of the current operation.
- State state = 1;
-
- // A message providing more details about the current state of the operation.
- // For example, the error message if the operation is failed.
- string state_message = 2;
-
- // The creation time of the operation.
- google.protobuf.Timestamp create_time = 3;
-
- // The last update time of the operation.
- google.protobuf.Timestamp update_time = 4;
-}
-
-// Data formats for input and output files.
-enum DataFormat {
- // Default value.
- DATA_FORMAT_UNSPECIFIED = 0;
-
- // Input data in json format.
- JSON = 1;
-
- // Input data in string format.
- STRING = 2;
-}
diff --git a/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/fleet_routing.proto b/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/fleet_routing.proto
deleted file mode 100644
index 0892c723115..00000000000
--- a/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/fleet_routing.proto
+++ /dev/null
@@ -1,2809 +0,0 @@
-// Copyright 2024 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.optimization.v1;
-
-import "google/api/annotations.proto";
-import "google/api/client.proto";
-import "google/api/field_behavior.proto";
-import "google/cloud/optimization/v1/async_model.proto";
-import "google/longrunning/operations.proto";
-import "google/protobuf/duration.proto";
-import "google/protobuf/timestamp.proto";
-import "google/type/latlng.proto";
-
-option go_package = "cloud.google.com/go/optimization/apiv1/optimizationpb;optimizationpb";
-option java_multiple_files = true;
-option java_outer_classname = "FleetRoutingProto";
-option java_package = "com.google.cloud.optimization.v1";
-
-// A service for optimizing vehicle tours.
-//
-// Validity of certain types of fields:
-//
-// * `google.protobuf.Timestamp`
-// * Times are in Unix time: seconds since 1970-01-01T00:00:00+00:00.
-// * seconds must be in [0, 253402300799],
-// i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
-// * nanos must be unset or set to 0.
-// * `google.protobuf.Duration`
-// * seconds must be in [0, 253402300799],
-// i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
-// * nanos must be unset or set to 0.
-// * `google.type.LatLng`
-// * latitude must be in [-90.0, 90.0].
-// * longitude must be in [-180.0, 180.0].
-// * at least one of latitude and longitude must be non-zero.
-service FleetRouting {
- option (google.api.default_host) = "cloudoptimization.googleapis.com";
- option (google.api.oauth_scopes) =
- "https://www.googleapis.com/auth/cloud-platform";
-
- // Sends an `OptimizeToursRequest` containing a `ShipmentModel` and returns an
- // `OptimizeToursResponse` containing `ShipmentRoute`s, which are a set of
- // routes to be performed by vehicles minimizing the overall cost.
- //
- // A `ShipmentModel` model consists mainly of `Shipment`s that need to be
- // carried out and `Vehicle`s that can be used to transport the `Shipment`s.
- // The `ShipmentRoute`s assign `Shipment`s to `Vehicle`s. More specifically,
- // they assign a series of `Visit`s to each vehicle, where a `Visit`
- // corresponds to a `VisitRequest`, which is a pickup or delivery for a
- // `Shipment`.
- //
- // The goal is to provide an assignment of `ShipmentRoute`s to `Vehicle`s that
- // minimizes the total cost where cost has many components defined in the
- // `ShipmentModel`.
- rpc OptimizeTours(OptimizeToursRequest) returns (OptimizeToursResponse) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}:optimizeTours"
- body: "*"
- additional_bindings {
- post: "/v1/{parent=projects/*}:optimizeTours"
- body: "*"
- }
- };
- }
-
- // Optimizes vehicle tours for one or more `OptimizeToursRequest`
- // messages as a batch.
- //
- // This method is a Long Running Operation (LRO). The inputs for optimization
- // (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse`
- // messages) are read/written from/to Cloud Storage in user-specified
- // format. Like the `OptimizeTours` method, each `OptimizeToursRequest`
- // contains a `ShipmentModel` and returns an `OptimizeToursResponse`
- // containing `ShipmentRoute`s, which are a set of routes to be performed by
- // vehicles minimizing the overall cost.
- rpc BatchOptimizeTours(BatchOptimizeToursRequest)
- returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}:batchOptimizeTours"
- body: "*"
- additional_bindings {
- post: "/v1/{parent=projects/*}:batchOptimizeTours"
- body: "*"
- }
- };
- option (google.longrunning.operation_info) = {
- response_type: "BatchOptimizeToursResponse"
- metadata_type: "AsyncModelMetadata"
- };
- }
-}
-
-// Request to be given to a tour optimization solver which defines the
-// shipment model to solve as well as optimization parameters.
-message OptimizeToursRequest {
- // Defines how the solver should handle the request. In all modes but
- // `VALIDATE_ONLY`, if the request is invalid, you will receive an
- // `INVALID_REQUEST` error. See
- // [max_validation_errors][google.cloud.optimization.v1.OptimizeToursRequest.max_validation_errors]
- // to cap the number of errors returned.
- enum SolvingMode {
- // Solve the model.
- DEFAULT_SOLVE = 0;
-
- // Only validates the model without solving it: populates as many
- // [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
- // as possible.
- VALIDATE_ONLY = 1;
-
- // Only populates
- // [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
- // or
- // [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments],
- // and doesn't actually solve the rest of the request (`status` and `routes`
- // are unset in the response).
- // If infeasibilities in `injected_solution_constraint` routes are detected
- // they are populated in the
- // [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
- // field and
- // [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments]
- // is left empty.
- //
- // *IMPORTANT*: not all infeasible shipments are returned here, but only the
- // ones that are detected as infeasible during preprocessing.
- DETECT_SOME_INFEASIBLE_SHIPMENTS = 2;
- }
-
- // Mode defining the behavior of the search, trading off latency versus
- // solution quality. In all modes, the global request deadline is enforced.
- enum SearchMode {
- // Unspecified search mode, equivalent to `RETURN_FAST`.
- SEARCH_MODE_UNSPECIFIED = 0;
-
- // Stop the search after finding the first good solution.
- RETURN_FAST = 1;
-
- // Spend all the available time to search for better solutions.
- CONSUME_ALL_AVAILABLE_TIME = 2;
- }
-
- // Required. Target project and location to make a call.
- //
- // Format: `projects/{project-id}/locations/{location-id}`.
- //
- // If no location is specified, a region will be chosen automatically.
- string parent = 1 [(google.api.field_behavior) = REQUIRED];
-
- // If this timeout is set, the server returns a response before the timeout
- // period has elapsed or the server deadline for synchronous requests is
- // reached, whichever is sooner.
- //
- // For asynchronous requests, the server will generate a solution (if
- // possible) before the timeout has elapsed.
- google.protobuf.Duration timeout = 2;
-
- // Shipment model to solve.
- ShipmentModel model = 3;
-
- // By default, the solving mode is `DEFAULT_SOLVE` (0).
- SolvingMode solving_mode = 4;
-
- // Search mode used to solve the request.
- SearchMode search_mode = 6;
-
- // Guide the optimization algorithm in finding a first solution that is
- // similar to a previous solution.
- //
- // The model is constrained when the first solution is built.
- // Any shipments not performed on a route are implicitly skipped in the first
- // solution, but they may be performed in successive solutions.
- //
- // The solution must satisfy some basic validity assumptions:
- //
- // * for all routes, `vehicle_index` must be in range and not be duplicated.
- // * for all visits, `shipment_index` and `visit_request_index` must be
- // in range.
- // * a shipment may only be referenced on one route.
- // * the pickup of a pickup-delivery shipment must be performed before
- // the delivery.
- // * no more than one pickup alternative or delivery alternative of
- // a shipment may be performed.
- // * for all routes, times are increasing (i.e., `vehicle_start_time
- // <= visits[0].start_time <= visits[1].start_time ...
- // <= vehicle_end_time`).
- // * a shipment may only be performed on a vehicle that is allowed. A
- // vehicle is allowed if
- // [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
- // is empty or its `vehicle_index` is included in
- // [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
- //
- // If the injected solution is not feasible, a validation error is not
- // necessarily returned and an error indicating infeasibility may be returned
- // instead.
- repeated ShipmentRoute injected_first_solution_routes = 7;
-
- // Constrain the optimization algorithm to find a final solution that is
- // similar to a previous solution. For example, this may be used to freeze
- // portions of routes which have already been completed or which are to be
- // completed but must not be modified.
- //
- // If the injected solution is not feasible, a validation error is not
- // necessarily returned and an error indicating infeasibility may be returned
- // instead.
- InjectedSolutionConstraint injected_solution_constraint = 8;
-
- // If non-empty, the given routes will be refreshed, without modifying their
- // underlying sequence of visits or travel times: only other details will be
- // updated. This does not solve the model.
- //
- // As of 2020/11, this only populates the polylines of non-empty routes and
- // requires that `populate_polylines` is true.
- //
- // The `route_polyline` fields of the passed-in routes may be inconsistent
- // with route `transitions`.
- //
- // This field must not be used together with `injected_first_solution_routes`
- // or `injected_solution_constraint`.
- //
- // `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
- // Polylines are still populated between all visits in all non-empty routes
- // regardless of whether the related shipments or vehicles are ignored.
- repeated ShipmentRoute refresh_details_routes = 9;
-
- // If true:
- //
- // * uses
- // [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label]
- // instead of `vehicle_index` to
- // match routes in an injected solution with vehicles in the request;
- // reuses the mapping of original
- // [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
- // to new
- // [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
- // to update
- // [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices]
- // if non-empty, but the mapping must be unambiguous (i.e., multiple
- // `ShipmentRoute`s must not share the same original `vehicle_index`).
- // * uses
- // [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label]
- // instead of `shipment_index`
- // to match visits in an injected solution with shipments in the request;
- // * uses
- // [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
- // instead of
- // [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index]
- // to
- // match skipped shipments in the injected solution with request
- // shipments.
- //
- // This interpretation applies to the `injected_first_solution_routes`,
- // `injected_solution_constraint`, and `refresh_details_routes` fields.
- // It can be used when shipment or vehicle indices in the request have
- // changed since the solution was created, perhaps because shipments or
- // vehicles have been removed from or added to the request.
- //
- // If true, labels in the following categories must appear at most once in
- // their category:
- //
- // * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the
- // request;
- // * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the
- // request;
- // * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution;
- // * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in
- // the injected solution (except pickup/delivery visit pairs, whose
- // `shipment_label` must appear twice).
- //
- // If a `vehicle_label` in the injected solution does not correspond to a
- // request vehicle, the corresponding route is removed from the solution
- // along with its visits. If a `shipment_label` in the injected solution does
- // not correspond to a request shipment, the corresponding visit is removed
- // from the solution. If a
- // [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
- // in the injected solution does not correspond to a request shipment, the
- // `SkippedShipment` is removed from the solution.
- //
- // Removing route visits or entire routes from an injected solution may
- // have an effect on the implied constraints, which may lead to change in
- // solution, validation errors, or infeasibility.
- //
- // NOTE: The caller must ensure that each
- // [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp.
- // [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely
- // identifies a vehicle (resp. shipment) entity used across the two relevant
- // requests: the past request that produced the `OptimizeToursResponse` used
- // in the injected solution and the current request that includes the injected
- // solution. The uniqueness checks described above are not enough to guarantee
- // this requirement.
- bool interpret_injected_solutions_using_labels = 10;
-
- // Consider traffic estimation in calculating `ShipmentRoute` fields
- // [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration],
- // [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time],
- // and `vehicle_end_time`; in setting the
- // [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities]
- // field, and in calculating the
- // [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost]
- // field.
- bool consider_road_traffic = 11;
-
- // If true, polylines will be populated in response `ShipmentRoute`s.
- bool populate_polylines = 12;
-
- // If true, polylines will be populated in response
- // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
- // Note that in this case, the polylines will also be populated in the
- // deprecated `travel_steps`.
- bool populate_transition_polylines = 13;
-
- // If this is set, then the request can have a deadline
- // (see https://grpc.io/blog/deadlines) of up to 60 minutes.
- // Otherwise, the maximum deadline is only 30 minutes.
- // Note that long-lived requests have a significantly larger (but still small)
- // risk of interruption.
- bool allow_large_deadline_despite_interruption_risk = 14;
-
- // If true, travel distances will be computed using geodesic distances instead
- // of Google Maps distances, and travel times will be computed using geodesic
- // distances with a speed defined by `geodesic_meters_per_second`.
- bool use_geodesic_distances = 15;
-
- // When `use_geodesic_distances` is true, this field must be set and defines
- // the speed applied to compute travel times. Its value must be at least 1.0
- // meters/seconds.
- optional double geodesic_meters_per_second = 16;
-
- // Truncates the number of validation errors returned. These errors are
- // typically attached to an INVALID_ARGUMENT error payload as a BadRequest
- // error detail (https://cloud.google.com/apis/design/errors#error_details),
- // unless solving_mode=VALIDATE_ONLY: see the
- // [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
- // field.
- // This defaults to 100 and is capped at 10,000.
- optional int32 max_validation_errors = 5;
-
- // Label that may be used to identify this request, reported back in the
- // [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label].
- string label = 17;
-
- // Deprecated: Use
- // [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines]
- // instead. If true, polylines will be populated in response
- // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
- // Note that in this case, the polylines will also be populated in the
- // deprecated `travel_steps`.
- bool populate_travel_step_polylines = 20 [deprecated = true];
-}
-
-// Response after solving a tour optimization problem containing the routes
-// followed by each vehicle, the shipments which have been skipped and the
-// overall cost of the solution.
-message OptimizeToursResponse {
- // Overall metrics, aggregated over all routes.
- message Metrics {
- // Aggregated over the routes. Each metric is the sum (or max, for loads)
- // over all
- // [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics]
- // fields of the same name.
- AggregatedMetrics aggregated_route_metrics = 1;
-
- // Number of mandatory shipments skipped.
- int32 skipped_mandatory_shipment_count = 2;
-
- // Number of vehicles used. Note: if a vehicle route is empty and
- // [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty]
- // is true, the vehicle is considered used.
- int32 used_vehicle_count = 3;
-
- // The earliest start time for a used vehicle, computed as the minimum over
- // all used vehicles of
- // [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time].
- google.protobuf.Timestamp earliest_vehicle_start_time = 4;
-
- // The latest end time for a used vehicle, computed as the maximum over all
- // used vehicles of
- // [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time].
- google.protobuf.Timestamp latest_vehicle_end_time = 5;
-
- // Cost of the solution, broken down by cost-related request fields.
- // The keys are proto paths, relative to the input OptimizeToursRequest,
- // e.g. "model.shipments.pickups.cost", and the values are the total cost
- // generated by the corresponding cost field, aggregated over the whole
- // solution. In other words, costs["model.shipments.pickups.cost"] is the
- // sum of all pickup costs over the solution. All costs defined in the model
- // are reported in detail here with the exception of costs related to
- // TransitionAttributes that are only reported in an aggregated way as of
- // 2022/01.
- map costs = 10;
-
- // Total cost of the solution. The sum of all values in the costs map.
- double total_cost = 6;
- }
-
- // Routes computed for each vehicle; the i-th route corresponds to the i-th
- // vehicle in the model.
- repeated ShipmentRoute routes = 1;
-
- // Copy of the
- // [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label],
- // if a label was specified in the request.
- string request_label = 3;
-
- // The list of all shipments skipped.
- repeated SkippedShipment skipped_shipments = 4;
-
- // List of all the validation errors that we were able to detect
- // independently. See the "MULTIPLE ERRORS" explanation for the
- // [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError]
- // message.
- repeated OptimizeToursValidationError validation_errors = 5;
-
- // Duration, distance and usage metrics for this solution.
- Metrics metrics = 6;
-
- // Deprecated: Use
- // [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost]
- // instead. Total cost of the solution. This takes into account all costs:
- // costs per per hour and travel hour, fixed vehicle costs, unperformed
- // shipment penalty costs, global duration cost, etc.
- double total_cost = 2 [deprecated = true];
-}
-
-// Request to batch optimize tours as an asynchronous operation.
-// Each input file should contain one `OptimizeToursRequest`, and each output
-// file will contain one `OptimizeToursResponse`. The request contains
-// information to read/write and parse the files. All the input and output files
-// should be under the same project.
-message BatchOptimizeToursRequest {
- // Information for solving one optimization model asynchronously.
- message AsyncModelConfig {
- // User defined model name, can be used as alias by users to keep track of
- // models.
- string display_name = 1;
-
- // Required. Information about the input model.
- InputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED];
-
- // Required. The desired output location information.
- OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED];
-
- // If this is set, the model will be solved in the checkpoint mode. In this
- // mode, the input model can have a deadline longer than 30 mins without the
- // risk of interruption. The model will be solved in multiple short-running
- // stages. Each stage generates an intermediate checkpoint
- // and stores it in the user's Cloud Storage buckets. The checkpoint
- // mode should be preferred over
- // allow_large_deadline_despite_interruption_risk since it prevents the risk
- // of interruption.
- bool enable_checkpoints = 4;
- }
-
- // Required. Target project and location to make a call.
- //
- // Format: `projects/{project-id}/locations/{location-id}`.
- //
- // If no location is specified, a region will be chosen automatically.
- string parent = 1 [(google.api.field_behavior) = REQUIRED];
-
- // Required. Input/Output information each purchase model, such as file paths
- // and data formats.
- repeated AsyncModelConfig model_configs = 2
- [(google.api.field_behavior) = REQUIRED];
-}
-
-// Response to a `BatchOptimizeToursRequest`. This is returned in
-// the LRO Operation after the operation is complete.
-message BatchOptimizeToursResponse {}
-
-// A shipment model contains a set of shipments which must be performed by a
-// set of vehicles, while minimizing the overall cost, which is the sum of:
-//
-// * the cost of routing the vehicles (sum of cost per total time, cost per
-// travel time, and fixed cost over all vehicles).
-// * the unperformed shipment penalties.
-// * the cost of the global duration of the shipments
-message ShipmentModel {
- // Specifies a duration and distance matrix from visit and vehicle start
- // locations to visit and vehicle end locations.
- message DurationDistanceMatrix {
- // Specifies a row of the duration and distance matrix.
- message Row {
- // Duration values for a given row. It must have as many elements as
- // [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
- repeated google.protobuf.Duration durations = 1;
-
- // Distance values for a given row. If no costs or constraints refer to
- // distances in the model, this can be left empty; otherwise it must have
- // as many elements as `durations`.
- repeated double meters = 2;
- }
-
- // Specifies the rows of the duration and distance matrix. It must have as
- // many elements as
- // [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
- repeated Row rows = 1;
-
- // Tag defining to which vehicles this duration and distance matrix applies.
- // If empty, this applies to all vehicles, and there can only be a single
- // matrix.
- //
- // Each vehicle start must match exactly one matrix, i.e. exactly one of
- // their `start_tags` field must match the `vehicle_start_tag` of a matrix
- // (and of that matrix only).
- //
- // All matrices must have a different `vehicle_start_tag`.
- string vehicle_start_tag = 2;
- }
-
- // A precedence rule between two events (each event is the pickup or the
- // delivery of a shipment): the "second" event has to start at least
- // `offset_duration` after "first" has started.
- //
- // Several precedences can refer to the same (or related) events, e.g.,
- // "pickup of B happens after delivery of A" and "pickup of C happens after
- // pickup of B".
- //
- // Furthermore, precedences only apply when both shipments are performed and
- // are otherwise ignored.
- message PrecedenceRule {
- // Shipment index of the "first" event. This field must be specified.
- optional int32 first_index = 1;
-
- // Indicates if the "first" event is a delivery.
- bool first_is_delivery = 3;
-
- // Shipment index of the "second" event. This field must be specified.
- optional int32 second_index = 2;
-
- // Indicates if the "second" event is a delivery.
- bool second_is_delivery = 4;
-
- // The offset between the "first" and "second" event. It can be negative.
- google.protobuf.Duration offset_duration = 5;
- }
-
- // Deprecated: Use top level
- // [BreakRule][google.cloud.optimization.v1.ShipmentModel.BreakRule] instead.
- // Rules to generate time breaks for a vehicle (e.g. lunch
- // breaks). A break is a contiguous period of time during which the vehicle
- // remains idle at its current position and cannot perform any visit. A break
- // may occur:
- //
- // * during the travel between two visits (which includes the time right
- // before or right after a visit, but not in the middle of a visit), in
- // which case it extends the corresponding transit time between the visits
- // * before the vehicle start (the vehicle may not start in the middle of
- // a break), in which case it does not affect the vehicle start time.
- // * after the vehicle end (ditto, with the vehicle end time).
- message BreakRule {
- option deprecated = true;
-
- // The sequence of breaks (i.e. their number and order) that apply to each
- // vehicle must be known beforehand. The repeated `BreakRequest`s define
- // that sequence, in the order in which they must occur. Their time windows
- // (`earliest_start_time` / `latest_start_time`) may overlap, but they must
- // be compatible with the order (this is checked).
- message BreakRequest {
- // Required. Lower bound (inclusive) on the start of the break.
- google.protobuf.Timestamp earliest_start_time = 1
- [(google.api.field_behavior) = REQUIRED];
-
- // Required. Upper bound (inclusive) on the start of the break.
- google.protobuf.Timestamp latest_start_time = 2
- [(google.api.field_behavior) = REQUIRED];
-
- // Required. Minimum duration of the break. Must be positive.
- google.protobuf.Duration min_duration = 3
- [(google.api.field_behavior) = REQUIRED];
- }
-
- // One may further constrain the frequency and duration of the breaks
- // specified above, by enforcing a minimum break frequency, such as
- // "There must be a break of at least 1 hour every 12 hours". Assuming that
- // this can be interpreted as "Within any sliding time window of 12h, there
- // must be at least one break of at least one hour", that example would
- // translate to the following `FrequencyConstraint`:
- // ```
- // {
- // min_break_duration { seconds: 3600 } # 1 hour.
- // max_inter_break_duration { seconds: 39600 } # 11 hours (12 - 1 = 11).
- // }
- // ```
- //
- // The timing and duration of the breaks in the solution will respect all
- // such constraints, in addition to the time windows and minimum durations
- // already specified in the `BreakRequest`.
- //
- // A `FrequencyConstraint` may in practice apply to non-consecutive breaks.
- // For example, the following schedule honors the "1h every 12h" example:
- // ```
- // 04:00 vehicle start
- // .. performing travel and visits ..
- // 09:00 1 hour break
- // 10:00 end of the break
- // .. performing travel and visits ..
- // 12:00 20-min lunch break
- // 12:20 end of the break
- // .. performing travel and visits ..
- // 21:00 1 hour break
- // 22:00 end of the break
- // .. performing travel and visits ..
- // 23:59 vehicle end
- // ```
- message FrequencyConstraint {
- // Required. Minimum break duration for this constraint. Nonnegative.
- // See description of `FrequencyConstraint`.
- google.protobuf.Duration min_break_duration = 1
- [(google.api.field_behavior) = REQUIRED];
-
- // Required. Maximum allowed span of any interval of time in the route
- // that does not include at least partially a break of `duration >=
- // min_break_duration`. Must be positive.
- google.protobuf.Duration max_inter_break_duration = 2
- [(google.api.field_behavior) = REQUIRED];
- }
-
- // Sequence of breaks. See the `BreakRequest` message.
- repeated BreakRequest break_requests = 1;
-
- // Several `FrequencyConstraint` may apply. They must all be satisfied by
- // the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
- repeated FrequencyConstraint frequency_constraints = 2;
- }
-
- // Set of shipments which must be performed in the model.
- repeated Shipment shipments = 1;
-
- // Set of vehicles which can be used to perform visits.
- repeated Vehicle vehicles = 2;
-
- // Constrains the maximum number of active vehicles. A vehicle is active if
- // its route performs at least one shipment. This can be used to limit the
- // number of routes in the case where there are fewer drivers than
- // vehicles and that the fleet of vehicles is heterogeneous. The optimization
- // will then select the best subset of vehicles to use.
- // Must be strictly positive.
- optional int32 max_active_vehicles = 4;
-
- // Global start and end time of the model: no times outside of this range
- // can be considered valid.
- //
- // The model's time span must be less than a year, i.e. the `global_end_time`
- // and the `global_start_time` must be within 31536000 seconds of each other.
- //
- // When using `cost_per_*hour` fields, you might want to set this window to a
- // smaller interval to increase performance (eg. if you model a single day,
- // you should set the global time limits to that day).
- // If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
- // as default.
- google.protobuf.Timestamp global_start_time = 5;
-
- // If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
- // is used as default.
- google.protobuf.Timestamp global_end_time = 6;
-
- // The "global duration" of the overall plan is the difference between the
- // earliest effective start time and the latest effective end time of
- // all vehicles. Users can assign a cost per hour to that quantity to try
- // and optimize for earliest job completion, for example. This cost must be in
- // the same unit as
- // [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
- double global_duration_cost_per_hour = 7;
-
- // Specifies duration and distance matrices used in the model. If this field
- // is empty, Google Maps or geodesic distances will be used instead, depending
- // on the value of the `use_geodesic_distances` field. If it is not empty,
- // `use_geodesic_distances` cannot be true and neither
- // `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
- // can be empty.
- //
- // Usage examples:
- //
- // * There are two locations: locA and locB.
- // * 1 vehicle starting its route at locA and ending it at locA.
- // * 1 pickup visit request at locB.
- //
- // ```
- // model {
- // vehicles { start_tags: "locA" end_tags: "locA" }
- // shipments { pickups { tags: "locB" } }
- // duration_distance_matrix_src_tags: "locA"
- // duration_distance_matrix_src_tags: "locB"
- // duration_distance_matrix_dst_tags: "locA"
- // duration_distance_matrix_dst_tags: "locB"
- // duration_distance_matrices {
- // rows { # from: locA
- // durations { seconds: 0 } meters: 0 # to: locA
- // durations { seconds: 100 } meters: 1000 # to: locB
- // }
- // rows { # from: locB
- // durations { seconds: 102 } meters: 990 # to: locA
- // durations { seconds: 0 } meters: 0 # to: locB
- // }
- // }
- // }
- // ```
- //
- //
- // * There are three locations: locA, locB and locC.
- // * 1 vehicle starting its route at locA and ending it at locB, using
- // matrix "fast".
- // * 1 vehicle starting its route at locB and ending it at locB, using
- // matrix "slow".
- // * 1 vehicle starting its route at locB and ending it at locB, using
- // matrix "fast".
- // * 1 pickup visit request at locC.
- //
- // ```
- // model {
- // vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
- // vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
- // vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
- // shipments { pickups { tags: "locC" } }
- // duration_distance_matrix_src_tags: "locA"
- // duration_distance_matrix_src_tags: "locB"
- // duration_distance_matrix_src_tags: "locC"
- // duration_distance_matrix_dst_tags: "locB"
- // duration_distance_matrix_dst_tags: "locC"
- // duration_distance_matrices {
- // vehicle_start_tag: "fast"
- // rows { # from: locA
- // durations { seconds: 1000 } meters: 2000 # to: locB
- // durations { seconds: 600 } meters: 1000 # to: locC
- // }
- // rows { # from: locB
- // durations { seconds: 0 } meters: 0 # to: locB
- // durations { seconds: 700 } meters: 1200 # to: locC
- // }
- // rows { # from: locC
- // durations { seconds: 702 } meters: 1190 # to: locB
- // durations { seconds: 0 } meters: 0 # to: locC
- // }
- // }
- // duration_distance_matrices {
- // vehicle_start_tag: "slow"
- // rows { # from: locA
- // durations { seconds: 1800 } meters: 2001 # to: locB
- // durations { seconds: 900 } meters: 1002 # to: locC
- // }
- // rows { # from: locB
- // durations { seconds: 0 } meters: 0 # to: locB
- // durations { seconds: 1000 } meters: 1202 # to: locC
- // }
- // rows { # from: locC
- // durations { seconds: 1001 } meters: 1195 # to: locB
- // durations { seconds: 0 } meters: 0 # to: locC
- // }
- // }
- // }
- // ```
- repeated DurationDistanceMatrix duration_distance_matrices = 8;
-
- // Tags defining the sources of the duration and distance matrices;
- // `duration_distance_matrices(i).rows(j)` defines durations and distances
- // from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
- // in matrix i.
- //
- // Tags correspond to
- // [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
- // or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
- // A given `VisitRequest` or `Vehicle` must match exactly one tag in this
- // field. Note that a `Vehicle`'s source, destination and matrix tags may be
- // the same; similarly a `VisitRequest`'s source and destination tags may be
- // the same. All tags must be different and cannot be empty strings. If this
- // field is not empty, then `duration_distance_matrices` must not be empty.
- repeated string duration_distance_matrix_src_tags = 9;
-
- // Tags defining the destinations of the duration and distance matrices;
- // `duration_distance_matrices(i).rows(j).durations(k)` (resp.
- // `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
- // (resp. the distance) of the travel from visits with tag
- // `duration_distance_matrix_src_tags(j)` to visits with tag
- // `duration_distance_matrix_dst_tags(k)` in matrix i.
- //
- // Tags correspond to
- // [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
- // or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
- // A given `VisitRequest` or `Vehicle` must match exactly one tag in this
- // field. Note that a `Vehicle`'s source, destination and matrix tags may be
- // the same; similarly a `VisitRequest`'s source and destination tags may be
- // the same. All tags must be different and cannot be empty strings. If this
- // field is not empty, then `duration_distance_matrices` must not be empty.
- repeated string duration_distance_matrix_dst_tags = 10;
-
- // Transition attributes added to the model.
- repeated TransitionAttributes transition_attributes = 11;
-
- // Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
- repeated ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
-
- // Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
- repeated ShipmentTypeRequirement shipment_type_requirements = 13;
-
- // Set of precedence rules which must be enforced in the model.
- repeated PrecedenceRule precedence_rules = 14;
-
- // Deprecated: No longer used.
- // Set of break rules used in the model.
- // Each vehicle specifies the `BreakRule` that applies to it via the
- // [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
- // field (which must be a singleton).
- repeated BreakRule break_rules = 15 [deprecated = true];
-}
-
-// The shipment of a single item, from one of its pickups to one of its
-// deliveries. For the shipment to be considered as performed, a unique vehicle
-// must visit one of its pickup locations (and decrease its spare capacities
-// accordingly), then visit one of its delivery locations later on (and
-// therefore re-increase its spare capacities accordingly).
-message Shipment {
- // Request for a visit which can be done by a vehicle: it has a geo-location
- // (or two, see below), opening and closing times represented by time windows,
- // and a service duration time (time spent by the vehicle once it has arrived
- // to pickup or drop off goods).
- message VisitRequest {
- // The geo-location where the vehicle arrives when performing this
- // `VisitRequest`. If the shipment model has duration distance matrices,
- // `arrival_location` must not be specified.
- google.type.LatLng arrival_location = 1;
-
- // The waypoint where the vehicle arrives when performing this
- // `VisitRequest`. If the shipment model has duration distance matrices,
- // `arrival_waypoint` must not be specified.
- Waypoint arrival_waypoint = 2;
-
- // The geo-location where the vehicle departs after completing this
- // `VisitRequest`. Can be omitted if it is the same as `arrival_location`.
- // If the shipment model has duration distance matrices,
- // `departure_location` must not be specified.
- google.type.LatLng departure_location = 3;
-
- // The waypoint where the vehicle departs after completing this
- // `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`.
- // If the shipment model has duration distance matrices,
- // `departure_waypoint` must not be specified.
- Waypoint departure_waypoint = 4;
-
- // Specifies tags attached to the visit request.
- // Empty or duplicate strings are not allowed.
- repeated string tags = 5;
-
- // Time windows which constrain the arrival time at a visit.
- // Note that a vehicle may depart outside of the arrival time window, i.e.
- // arrival time + duration do not need to be inside a time window. This can
- // result in waiting time if the vehicle arrives before
- // [TimeWindow.start_time][google.cloud.optimization.v1.TimeWindow.start_time].
- //
- // The absence of `TimeWindow` means that the vehicle can perform this visit
- // at any time.
- //
- // Time windows must be disjoint, i.e. no time window must overlap with or
- // be adjacent to another, and they must be in increasing order.
- //
- // `cost_per_hour_after_soft_end_time` and `soft_end_time` can only
- // be set if there is a single time window.
- repeated TimeWindow time_windows = 6;
-
- // Duration of the visit, i.e. time spent by the vehicle between arrival
- // and departure (to be added to the possible waiting time; see
- // `time_windows`).
- google.protobuf.Duration duration = 7;
-
- // Cost to service this visit request on a vehicle route. This can be used
- // to pay different costs for each alternative pickup or delivery of a
- // shipment. This cost must be in the same unit as `Shipment.penalty_cost`
- // and must not be negative.
- double cost = 8;
-
- // Load demands of this visit request. This is just like
- // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
- // field, except that it only applies to this
- // [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest]
- // instead of the whole [Shipment][google.cloud.optimization.v1.Shipment].
- // The demands listed here are added to the demands listed in
- // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands].
- map load_demands = 12;
-
- // Specifies the types of the visit. This may be used to allocate additional
- // time required for a vehicle to complete this visit (see
- // [Vehicle.extra_visit_duration_for_visit_type][google.cloud.optimization.v1.Vehicle.extra_visit_duration_for_visit_type]).
- //
- // A type can only appear once.
- repeated string visit_types = 10;
-
- // Specifies a label for this `VisitRequest`. This label is reported in the
- // response as `visit_label` in the corresponding
- // [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit].
- string label = 11;
-
- // Deprecated: Use
- // [VisitRequest.load_demands][google.cloud.optimization.v1.Shipment.VisitRequest.load_demands]
- // instead.
- repeated CapacityQuantity demands = 9 [deprecated = true];
- }
-
- // When performing a visit, a predefined amount may be added to the vehicle
- // load if it's a pickup, or subtracted if it's a delivery. This message
- // defines such amount. See
- // [load_demands][google.cloud.optimization.v1.Shipment.load_demands].
- message Load {
- // The amount by which the load of the vehicle performing the corresponding
- // visit will vary. Since it is an integer, users are advised to choose an
- // appropriate unit to avoid loss of precision. Must be ≥ 0.
- int64 amount = 2;
- }
-
- // Set of pickup alternatives associated to the shipment. If not specified,
- // the vehicle only needs to visit a location corresponding to the deliveries.
- repeated VisitRequest pickups = 1;
-
- // Set of delivery alternatives associated to the shipment. If not specified,
- // the vehicle only needs to visit a location corresponding to the pickups.
- repeated VisitRequest deliveries = 2;
-
- // Load demands of the shipment (for example weight, volume, number of
- // pallets etc). The keys in the map should be identifiers describing the type
- // of the corresponding load, ideally also including the units.
- // For example: "weight_kg", "volume_gallons", "pallet_count", etc.
- // If a given key does not appear in the map, the corresponding load is
- // considered as null.
- map load_demands = 14;
-
- // If the shipment is not completed, this penalty is added to the overall
- // cost of the routes. A shipment is considered completed if one of its pickup
- // and delivery alternatives is visited. The cost may be expressed in the
- // same unit used for all other cost-related fields in the model and must be
- // positive.
- //
- // *IMPORTANT*: If this penalty is not specified, it is considered infinite,
- // i.e. the shipment must be completed.
- optional double penalty_cost = 4;
-
- // The set of vehicles that may perform this shipment. If empty, all vehicles
- // may perform it. Vehicles are given by their index in the `ShipmentModel`'s
- // `vehicles` list.
- repeated int32 allowed_vehicle_indices = 5;
-
- // Specifies the cost that is incurred when this shipment is delivered by each
- // vehicle. If specified, it must have EITHER:
- //
- // * the same number of elements as `costs_per_vehicle_indices`.
- // `costs_per_vehicle[i]` corresponds to vehicle
- // `costs_per_vehicle_indices[i]` of the model.
- // * the same number of elements as there are vehicles in the model. The
- // i-th element corresponds to vehicle #i of the model.
- //
- // These costs must be in the same unit as `penalty_cost` and must not be
- // negative. Leave this field empty, if there are no such costs.
- repeated double costs_per_vehicle = 6;
-
- // Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty,
- // it must have the same number of elements as `costs_per_vehicle`. A vehicle
- // index may not be specified more than once. If a vehicle is excluded from
- // `costs_per_vehicle_indices`, its cost is zero.
- repeated int32 costs_per_vehicle_indices = 7;
-
- // Specifies the maximum relative detour time compared to the shortest path
- // from pickup to delivery. If specified, it must be nonnegative, and the
- // shipment must contain at least a pickup and a delivery.
- //
- // For example, let t be the shortest time taken to go from the selected
- // pickup alternative directly to the selected delivery alternative. Then
- // setting `pickup_to_delivery_relative_detour_limit` enforces:
- //
- // ```
- // start_time(delivery) - start_time(pickup) <=
- // std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
- // ```
- //
- // If both relative and absolute limits are specified on the same shipment,
- // the more constraining limit is used for each possible pickup/delivery pair.
- // As of 2017/10, detours are only supported when travel durations do not
- // depend on vehicles.
- optional double pickup_to_delivery_relative_detour_limit = 8;
-
- // Specifies the maximum absolute detour time compared to the shortest path
- // from pickup to delivery. If specified, it must be nonnegative, and the
- // shipment must contain at least a pickup and a delivery.
- //
- // For example, let t be the shortest time taken to go from the selected
- // pickup alternative directly to the selected delivery alternative. Then
- // setting `pickup_to_delivery_absolute_detour_limit` enforces:
- //
- // ```
- // start_time(delivery) - start_time(pickup) <=
- // t + pickup_to_delivery_absolute_detour_limit
- // ```
- //
- // If both relative and absolute limits are specified on the same shipment,
- // the more constraining limit is used for each possible pickup/delivery pair.
- // As of 2017/10, detours are only supported when travel durations do not
- // depend on vehicles.
- google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
-
- // Specifies the maximum duration from start of pickup to start of delivery of
- // a shipment. If specified, it must be nonnegative, and the shipment must
- // contain at least a pickup and a delivery. This does not depend on which
- // alternatives are selected for pickup and delivery, nor on vehicle speed.
- // This can be specified alongside maximum detour constraints: the solution
- // will respect both specifications.
- google.protobuf.Duration pickup_to_delivery_time_limit = 10;
-
- // Non-empty string specifying a "type" for this shipment.
- // This feature can be used to define incompatibilities or requirements
- // between `shipment_types` (see `shipment_type_incompatibilities` and
- // `shipment_type_requirements` in `ShipmentModel`).
- //
- // Differs from `visit_types` which is specified for a single visit: All
- // pickup/deliveries belonging to the same shipment share the same
- // `shipment_type`.
- string shipment_type = 11;
-
- // Specifies a label for this shipment. This label is reported in the response
- // in the `shipment_label` of the corresponding
- // [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit].
- string label = 12;
-
- // If true, skip this shipment, but don't apply a `penalty_cost`.
- //
- // Ignoring a shipment results in a validation error when there are any
- // `shipment_type_requirements` in the model.
- //
- // Ignoring a shipment that is performed in `injected_first_solution_routes`
- // or `injected_solution_constraint` is permitted; the solver removes the
- // related pickup/delivery visits from the performing route.
- // `precedence_rules` that reference ignored shipments will also be ignored.
- bool ignore = 13;
-
- // Deprecated: Use
- // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
- // instead.
- repeated CapacityQuantity demands = 3 [deprecated = true];
-}
-
-// Specifies incompatibilties between shipments depending on their
-// shipment_type. The appearance of incompatible shipments on the same route is
-// restricted based on the incompatibility mode.
-message ShipmentTypeIncompatibility {
- // Modes defining how the appearance of incompatible shipments are restricted
- // on the same route.
- enum IncompatibilityMode {
- // Unspecified incompatibility mode. This value should never be used.
- INCOMPATIBILITY_MODE_UNSPECIFIED = 0;
-
- // In this mode, two shipments with incompatible types can never share the
- // same vehicle.
- NOT_PERFORMED_BY_SAME_VEHICLE = 1;
-
- // For two shipments with incompatible types with the
- // `NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY` incompatibility mode:
- //
- // * If both are pickups only (no deliveries) or deliveries only (no
- // pickups), they cannot share the same vehicle at all.
- // * If one of the shipments has a delivery and the other a pickup, the two
- // shipments can share the same vehicle iff the former shipment is
- // delivered before the latter is picked up.
- NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2;
- }
-
- // List of incompatible types. Two shipments having different `shipment_types`
- // among those listed are "incompatible".
- repeated string types = 1;
-
- // Mode applied to the incompatibility.
- IncompatibilityMode incompatibility_mode = 2;
-}
-
-// Specifies requirements between shipments based on their shipment_type.
-// The specifics of the requirement are defined by the requirement mode.
-message ShipmentTypeRequirement {
- // Modes defining the appearance of dependent shipments on a route.
- enum RequirementMode {
- // Unspecified requirement mode. This value should never be used.
- REQUIREMENT_MODE_UNSPECIFIED = 0;
-
- // In this mode, all "dependent" shipments must share the same vehicle as at
- // least one of their "required" shipments.
- PERFORMED_BY_SAME_VEHICLE = 1;
-
- // With the `IN_SAME_VEHICLE_AT_PICKUP_TIME` mode, all "dependent"
- // shipments need to have at least one "required" shipment on their vehicle
- // at the time of their pickup.
- //
- // A "dependent" shipment pickup must therefore have either:
- //
- // * A delivery-only "required" shipment delivered on the route after, or
- // * A "required" shipment picked up on the route before it, and if the
- // "required" shipment has a delivery, this delivery must be performed
- // after the "dependent" shipment's pickup.
- IN_SAME_VEHICLE_AT_PICKUP_TIME = 2;
-
- // Same as before, except the "dependent" shipments need to have a
- // "required" shipment on their vehicle at the time of their *delivery*.
- IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3;
- }
-
- // List of alternative shipment types required by the
- // `dependent_shipment_types`.
- repeated string required_shipment_type_alternatives = 1;
-
- // All shipments with a type in the `dependent_shipment_types` field require
- // at least one shipment of type `required_shipment_type_alternatives` to be
- // visited on the same route.
- //
- // NOTE: Chains of requirements such that a `shipment_type` depends on itself
- // are not allowed.
- repeated string dependent_shipment_types = 2;
-
- // Mode applied to the requirement.
- RequirementMode requirement_mode = 3;
-}
-
-// Encapsulates a set of optional conditions to satisfy when calculating
-// vehicle routes. This is similar to `RouteModifiers` in the Google Maps
-// Platform API; see:
-// https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers.
-message RouteModifiers {
- // Specifies whether to avoid toll roads where reasonable. Preference will be
- // given to routes not containing toll roads. Applies only to motorized travel
- // modes.
- bool avoid_tolls = 2;
-
- // Specifies whether to avoid highways where reasonable. Preference will be
- // given to routes not containing highways. Applies only to motorized travel
- // modes.
- bool avoid_highways = 3;
-
- // Specifies whether to avoid ferries where reasonable. Preference will be
- // given to routes not containing travel by ferries. Applies only to motorized
- // travel modes.
- bool avoid_ferries = 4;
-
- // Optional. Specifies whether to avoid navigating indoors where reasonable.
- // Preference will be given to routes not containing indoor navigation.
- // Applies only to the `WALKING` travel mode.
- bool avoid_indoor = 5 [(google.api.field_behavior) = OPTIONAL];
-}
-
-// Models a vehicle in a shipment problem. Solving a shipment problem will
-// build a route starting from `start_location` and ending at `end_location`
-// for this vehicle. A route is a sequence of visits (see `ShipmentRoute`).
-message Vehicle {
- // Travel modes which can be used by vehicles.
- //
- // These should be a subset of the Google Maps Platform Routes Preferred API
- // travel modes, see:
- // https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode.
- enum TravelMode {
- // Unspecified travel mode, equivalent to `DRIVING`.
- TRAVEL_MODE_UNSPECIFIED = 0;
-
- // Travel mode corresponding to driving directions (car, ...).
- DRIVING = 1;
-
- // Travel mode corresponding to walking directions.
- WALKING = 2;
- }
-
- // Policy on how a vehicle can be unloaded. Applies only to shipments having
- // both a pickup and a delivery.
- //
- // Other shipments are free to occur anywhere on the route independent of
- // `unloading_policy`.
- enum UnloadingPolicy {
- // Unspecified unloading policy; deliveries must just occur after their
- // corresponding pickups.
- UNLOADING_POLICY_UNSPECIFIED = 0;
-
- // Deliveries must occur in reverse order of pickups
- LAST_IN_FIRST_OUT = 1;
-
- // Deliveries must occur in the same order as pickups
- FIRST_IN_FIRST_OUT = 2;
- }
-
- // Defines a load limit applying to a vehicle, e.g. "this truck may only
- // carry up to 3500 kg". See
- // [load_limits][google.cloud.optimization.v1.Vehicle.load_limits].
- message LoadLimit {
- // Interval of acceptable load amounts.
- message Interval {
- // A minimum acceptable load. Must be ≥ 0.
- // If they're both specified,
- // [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must
- // be ≤
- // [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max].
- int64 min = 1;
-
- // A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum
- // load is unrestricted by this message.
- // If they're both specified,
- // [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must
- // be ≤
- // [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max].
- optional int64 max = 2;
- }
-
- // The maximum acceptable amount of load.
- optional int64 max_load = 1;
-
- // A soft limit of the load. See
- // [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max].
- int64 soft_max_load = 2;
-
- // If the load ever exceeds
- // [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]
- // along this vehicle's route, the following cost penalty applies (only once
- // per vehicle): (load -
- // [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load])
- // * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs
- // add up and must be in the same unit as
- // [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
- double cost_per_unit_above_soft_max = 3;
-
- // The acceptable load interval of the vehicle at the start of the route.
- Interval start_load_interval = 4;
-
- // The acceptable load interval of the vehicle at the end of the route.
- Interval end_load_interval = 5;
- }
-
- // A limit defining a maximum duration of the route of a vehicle. It can be
- // either hard or soft.
- //
- // When a soft limit field is defined, both the soft max threshold and its
- // associated cost must be defined together.
- message DurationLimit {
- // A hard limit constraining the duration to be at most max_duration.
- google.protobuf.Duration max_duration = 1;
-
- // A soft limit not enforcing a maximum duration limit, but when violated
- // makes the route incur a cost. This cost adds up to other costs defined in
- // the model, with the same unit.
- //
- // If defined, `soft_max_duration` must be nonnegative. If max_duration is
- // also defined, `soft_max_duration` must be less than max_duration.
- google.protobuf.Duration soft_max_duration = 2;
-
- // Cost per hour incurred if the `soft_max_duration` threshold is violated.
- // The additional cost is 0 if the duration is under the threshold,
- // otherwise the cost depends on the duration as follows:
- // ```
- // cost_per_hour_after_soft_max * (duration - soft_max_duration)
- // ```
- // The cost must be nonnegative.
- optional double cost_per_hour_after_soft_max = 3;
-
- // A soft limit not enforcing a maximum duration limit, but when violated
- // makes the route incur a cost, quadratic in the duration. This cost adds
- // up to other costs defined in the model, with the same unit.
- //
- // If defined, `quadratic_soft_max_duration` must be nonnegative. If
- // `max_duration` is also defined, `quadratic_soft_max_duration` must be
- // less than `max_duration`, and the difference must be no larger than one
- // day:
- //
- // `max_duration - quadratic_soft_max_duration <= 86400 seconds`
- google.protobuf.Duration quadratic_soft_max_duration = 4;
-
- // Cost per square hour incurred if the
- // `quadratic_soft_max_duration` threshold is violated.
- //
- // The additional cost is 0 if the duration is under the threshold,
- // otherwise the cost depends on the duration as follows:
- //
- // ```
- // cost_per_square_hour_after_quadratic_soft_max *
- // (duration - quadratic_soft_max_duration)^2
- // ```
- //
- // The cost must be nonnegative.
- optional double cost_per_square_hour_after_quadratic_soft_max = 5;
- }
-
- // The travel mode which affects the roads usable by the vehicle and its
- // speed. See also `travel_duration_multiple`.
- TravelMode travel_mode = 1;
-
- // Optional. A set of conditions to satisfy that affect the way routes are
- // calculated for the given vehicle.
- RouteModifiers route_modifiers = 2 [(google.api.field_behavior) = OPTIONAL];
-
- // Geographic location where the vehicle starts before picking up any
- // shipments. If not specified, the vehicle starts at its first pickup.
- // If the shipment model has duration and distance matrices, `start_location`
- // must not be specified.
- google.type.LatLng start_location = 3;
-
- // Waypoint representing a geographic location where the vehicle starts before
- // picking up any shipments. If neither `start_waypoint` nor `start_location`
- // is specified, the vehicle starts at its first pickup.
- // If the shipment model has duration and distance matrices, `start_waypoint`
- // must not be specified.
- Waypoint start_waypoint = 4;
-
- // Geographic location where the vehicle ends after it has completed its last
- // `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends
- // immediately when it completes its last `VisitRequest`.
- // If the shipment model has duration and distance matrices, `end_location`
- // must not be specified.
- google.type.LatLng end_location = 5;
-
- // Waypoint representing a geographic location where the vehicle ends after
- // it has completed its last `VisitRequest`. If neither `end_waypoint` nor
- // `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately
- // when it completes its last `VisitRequest`.
- // If the shipment model has duration and distance matrices, `end_waypoint`
- // must not be specified.
- Waypoint end_waypoint = 6;
-
- // Specifies tags attached to the start of the vehicle's route.
- //
- // Empty or duplicate strings are not allowed.
- repeated string start_tags = 7;
-
- // Specifies tags attached to the end of the vehicle's route.
- //
- // Empty or duplicate strings are not allowed.
- repeated string end_tags = 8;
-
- // Time windows during which the vehicle may depart its start location.
- // They must be within the global time limits (see
- // [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time]
- // fields). If unspecified, there is no limitation besides those global time
- // limits.
- //
- // Time windows belonging to the same repeated field must be disjoint, i.e. no
- // time window can overlap with or be adjacent to another, and they must be in
- // chronological order.
- //
- // `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if
- // there is a single time window.
- repeated TimeWindow start_time_windows = 9;
-
- // Time windows during which the vehicle may arrive at its end location.
- // They must be within the global time limits (see
- // [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time]
- // fields). If unspecified, there is no limitation besides those global time
- // limits.
- //
- // Time windows belonging to the same repeated field must be disjoint, i.e. no
- // time window can overlap with or be adjacent to another, and they must be in
- // chronological order.
- //
- // `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if
- // there is a single time window.
- repeated TimeWindow end_time_windows = 10;
-
- // Specifies a multiplicative factor that can be used to increase or decrease
- // travel times of this vehicle. For example, setting this to 2.0 means
- // that this vehicle is slower and has travel times that are twice what they
- // are for standard vehicles. This multiple does not affect visit durations.
- // It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are
- // specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle
- // is standard, and this multiple is considered 1.0.
- //
- // WARNING: Travel times will be rounded to the nearest second after this
- // multiple is applied but before performing any numerical operations, thus,
- // a small multiple may result in a loss of precision.
- //
- // See also `extra_visit_duration_for_visit_type` below.
- optional double travel_duration_multiple = 11;
-
- // Unloading policy enforced on the vehicle.
- UnloadingPolicy unloading_policy = 12;
-
- // Capacities of the vehicle (weight, volume, # of pallets for example).
- // The keys in the map are the identifiers of the type of load, consistent
- // with the keys of the
- // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
- // field. If a given key is absent from this map, the corresponding capacity
- // is considered to be limitless.
- map load_limits = 30;
-
- // Vehicle costs: all costs add up and must be in the same unit as
- // [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
- //
- // Cost per hour of the vehicle route. This cost is applied to the total time
- // taken by the route, and includes travel time, waiting time, and visit time.
- // Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result
- // in additional latency.
- double cost_per_hour = 16;
-
- // Cost per traveled hour of the vehicle route. This cost is applied only to
- // travel time taken by the route (i.e., that reported in
- // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]),
- // and excludes waiting time and visit time.
- double cost_per_traveled_hour = 17;
-
- // Cost per kilometer of the vehicle route. This cost is applied to the
- // distance reported in the
- // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]
- // and does not apply to any distance implicitly traveled from the
- // `arrival_location` to the `departure_location` of a single `VisitRequest`.
- double cost_per_kilometer = 18;
-
- // Fixed cost applied if this vehicle is used to handle a shipment.
- double fixed_cost = 19;
-
- // This field only applies to vehicles when their route does not serve any
- // shipments. It indicates if the vehicle should be considered as used or not
- // in this case.
- //
- // If true, the vehicle goes from its start to its end location even if it
- // doesn't serve any shipments, and time and distance costs resulting from its
- // start --> end travel are taken into account.
- //
- // Otherwise, it doesn't travel from its start to its end location, and no
- // `break_rule` or delay (from `TransitionAttributes`) are scheduled for this
- // vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any
- // information except for the vehicle index and label.
- bool used_if_route_is_empty = 20;
-
- // Limit applied to the total duration of the vehicle's route. In a given
- // `OptimizeToursResponse`, the route duration of a vehicle is the
- // difference between its `vehicle_end_time` and `vehicle_start_time`.
- DurationLimit route_duration_limit = 21;
-
- // Limit applied to the travel duration of the vehicle's route. In a given
- // `OptimizeToursResponse`, the route travel duration is the sum of all its
- // [transitions.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration].
- DurationLimit travel_duration_limit = 22;
-
- // Limit applied to the total distance of the vehicle's route. In a given
- // `OptimizeToursResponse`, the route distance is the sum of all its
- // [transitions.travel_distance_meters][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_distance_meters].
- DistanceLimit route_distance_limit = 23;
-
- // Specifies a map from visit_types strings to durations. The duration is time
- // in addition to
- // [VisitRequest.duration][google.cloud.optimization.v1.Shipment.VisitRequest.duration]
- // to be taken at visits with the specified `visit_types`. This extra visit
- // duration adds cost if `cost_per_hour` is specified. Keys (i.e.
- // `visit_types`) cannot be empty strings.
- //
- // If a visit request has multiple types, a duration will be added for each
- // type in the map.
- map extra_visit_duration_for_visit_type =
- 24;
-
- // Describes the break schedule to be enforced on this vehicle.
- // If empty, no breaks will be scheduled for this vehicle.
- BreakRule break_rule = 25;
-
- // Specifies a label for this vehicle. This label is reported in the response
- // as the `vehicle_label` of the corresponding
- // [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute].
- string label = 27;
-
- // If true, `used_if_route_is_empty` must be false, and this vehicle will
- // remain unused.
- //
- // If a shipment is performed by an ignored vehicle in
- // `injected_first_solution_routes`, it is skipped in the first solution but
- // is free to be performed in the response.
- //
- // If a shipment is performed by an ignored vehicle in
- // `injected_solution_constraint` and any related pickup/delivery is
- // constrained to remain on the vehicle (i.e., not relaxed to level
- // `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response.
- // If a shipment has a non-empty `allowed_vehicle_indices` field and all of
- // the allowed vehicles are ignored, it is skipped in the response.
- bool ignore = 28;
-
- // Deprecated: No longer used.
- // Indices in the `break_rule` field in the source
- // [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. They
- // correspond to break rules enforced on the vehicle.
- //
- // As of 2018/03, at most one rule index per vehicle can be specified.
- repeated int32 break_rule_indices = 29 [deprecated = true];
-
- // Deprecated: Use
- // [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits]
- // instead.
- repeated CapacityQuantity capacities = 13 [deprecated = true];
-
- // Deprecated: Use
- // [Vehicle.LoadLimit.start_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.start_load_interval]
- // instead.
- repeated CapacityQuantityInterval start_load_intervals = 14
- [deprecated = true];
-
- // Deprecated: Use
- // [Vehicle.LoadLimit.end_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.end_load_interval]
- // instead.
- repeated CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
-}
-
-// Time windows constrain the time of an event, such as the arrival time at a
-// visit, or the start and end time of a vehicle.
-//
-// Hard time window bounds, `start_time` and `end_time`, enforce the earliest
-// and latest time of the event, such that `start_time <= event_time <=
-// end_time`. The soft time window lower bound, `soft_start_time`, expresses a
-// preference for the event to happen at or after `soft_start_time` by incurring
-// a cost proportional to how long before soft_start_time the event occurs. The
-// soft time window upper bound, `soft_end_time`, expresses a preference for the
-// event to happen at or before `soft_end_time` by incurring a cost proportional
-// to how long after `soft_end_time` the event occurs. `start_time`, `end_time`,
-// `soft_start_time` and `soft_end_time` should be within the global time limits
-// (see
-// [ShipmentModel.global_start_time][google.cloud.optimization.v1.ShipmentModel.global_start_time]
-// and
-// [ShipmentModel.global_end_time][google.cloud.optimization.v1.ShipmentModel.global_end_time])
-// and should respect:
-// ```
-// 0 <= `start_time` <= `soft_start_time` <= `end_time` and
-// 0 <= `start_time` <= `soft_end_time` <= `end_time`.
-// ```
-message TimeWindow {
- // The hard time window start time. If unspecified it will be set to
- // `ShipmentModel.global_start_time`.
- google.protobuf.Timestamp start_time = 1;
-
- // The hard time window end time. If unspecified it will be set to
- // `ShipmentModel.global_end_time`.
- google.protobuf.Timestamp end_time = 2;
-
- // The soft start time of the time window.
- google.protobuf.Timestamp soft_start_time = 3;
-
- // The soft end time of the time window.
- google.protobuf.Timestamp soft_end_time = 4;
-
- // A cost per hour added to other costs in the model if the event occurs
- // before soft_start_time, computed as:
- //
- // ```
- // max(0, soft_start_time - t.seconds)
- // * cost_per_hour_before_soft_start_time / 3600,
- // t being the time of the event.
- // ```
- //
- // This cost must be positive, and the field can only be set if
- // soft_start_time has been set.
- optional double cost_per_hour_before_soft_start_time = 5;
-
- // A cost per hour added to other costs in the model if the event occurs after
- // `soft_end_time`, computed as:
- //
- // ```
- // max(0, t.seconds - soft_end_time.seconds)
- // * cost_per_hour_after_soft_end_time / 3600,
- // t being the time of the event.
- // ```
- //
- // This cost must be positive, and the field can only be set if
- // `soft_end_time` has been set.
- optional double cost_per_hour_after_soft_end_time = 6;
-}
-
-// Deprecated: Use
-// [Vehicle.LoadLimit.Interval][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval]
-// instead.
-message CapacityQuantity {
- option deprecated = true;
-
- string type = 1;
-
- int64 value = 2;
-}
-
-// Deprecated: Use
-// [Vehicle.LoadLimit.Interval][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval]
-// instead.
-message CapacityQuantityInterval {
- option deprecated = true;
-
- string type = 1;
-
- optional int64 min_value = 2;
-
- optional int64 max_value = 3;
-}
-
-// A limit defining a maximum distance which can be traveled. It can be either
-// hard or soft.
-//
-// If a soft limit is defined, both `soft_max_meters` and
-// `cost_per_kilometer_above_soft_max` must be defined and be nonnegative.
-message DistanceLimit {
- // A hard limit constraining the distance to be at most max_meters. The limit
- // must be nonnegative.
- optional int64 max_meters = 1;
-
- // A soft limit not enforcing a maximum distance limit, but when violated
- // results in a cost which adds up to other costs defined in the model,
- // with the same unit.
- //
- // If defined soft_max_meters must be less than max_meters and must be
- // nonnegative.
- optional int64 soft_max_meters = 2;
-
- // Cost per kilometer incurred, increasing up to `soft_max_meters`, with
- // formula:
- // ```
- // min(distance_meters, soft_max_meters) / 1000.0 *
- // cost_per_kilometer_below_soft_max.
- // ```
- // This cost is not supported in `route_distance_limit`.
- optional double cost_per_kilometer_below_soft_max = 4;
-
- // Cost per kilometer incurred if distance is above `soft_max_meters` limit.
- // The additional cost is 0 if the distance is under the limit, otherwise the
- // formula used to compute the cost is the following:
- // ```
- // (distance_meters - soft_max_meters) / 1000.0 *
- // cost_per_kilometer_above_soft_max.
- // ```
- // The cost must be nonnegative.
- optional double cost_per_kilometer_above_soft_max = 3;
-}
-
-// Specifies attributes of transitions between two consecutive visits on a
-// route. Several `TransitionAttributes` may apply to the same transition: in
-// that case, all extra costs add up and the strictest constraint or limit
-// applies (following natural "AND" semantics).
-message TransitionAttributes {
- // Tags defining the set of (src->dst) transitions these attributes apply to.
- //
- // A source visit or vehicle start matches iff its
- // [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
- // or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]
- // either contains `src_tag` or does not contain `excluded_src_tag` (depending
- // on which of these two fields is non-empty).
- string src_tag = 1;
-
- // See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be
- // non-empty.
- string excluded_src_tag = 2;
-
- // A destination visit or vehicle end matches iff its
- // [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
- // or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either
- // contains `dst_tag` or does not contain `excluded_dst_tag` (depending on
- // which of these two fields is non-empty).
- string dst_tag = 3;
-
- // See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be
- // non-empty.
- string excluded_dst_tag = 4;
-
- // Specifies a cost for performing this transition. This is in the same unit
- // as all other costs in the model and must not be negative. It is applied on
- // top of all other existing costs.
- double cost = 5;
-
- // Specifies a cost per kilometer applied to the distance traveled while
- // performing this transition. It adds up to any
- // [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer]
- // specified on vehicles.
- double cost_per_kilometer = 6;
-
- // Specifies a limit on the distance traveled while performing this
- // transition.
- //
- // As of 2021/06, only soft limits are supported.
- DistanceLimit distance_limit = 7;
-
- // Specifies a delay incurred when performing this transition.
- //
- // This delay always occurs *after* finishing the source visit and *before*
- // starting the destination visit.
- google.protobuf.Duration delay = 8;
-}
-
-// Encapsulates a waypoint. Waypoints mark arrival and departure locations of
-// VisitRequests, and start and end locations of Vehicles.
-message Waypoint {
- // Different ways to represent a location.
- oneof location_type {
- // A point specified using geographic coordinates, including an optional
- // heading.
- Location location = 1;
-
- // The POI Place ID associated with the waypoint.
- string place_id = 2;
- }
-
- // Indicates that the location of this waypoint is meant to have a preference
- // for the vehicle to stop at a particular side of road. When you set this
- // value, the route will pass through the location so that the vehicle can
- // stop at the side of road that the location is biased towards from the
- // center of the road. This option works only for the 'DRIVING' travel mode,
- // and when the 'location_type' is set to 'location'.
- bool side_of_road = 3;
-}
-
-// Encapsulates a location (a geographic point, and an optional heading).
-message Location {
- // The waypoint's geographic coordinates.
- google.type.LatLng lat_lng = 1;
-
- // The compass heading associated with the direction of the flow of traffic.
- // This value is used to specify the side of the road to use for pickup and
- // drop-off. Heading values can be from 0 to 360, where 0 specifies a heading
- // of due North, 90 specifies a heading of due East, etc.
- optional int32 heading = 2;
-}
-
-// Rules to generate time breaks for a vehicle (e.g. lunch breaks). A break
-// is a contiguous period of time during which the vehicle remains idle at its
-// current position and cannot perform any visit. A break may occur:
-//
-// * during the travel between two visits (which includes the time right
-// before or right after a visit, but not in the middle of a visit), in
-// which case it extends the corresponding transit time between the visits,
-// * or before the vehicle start (the vehicle may not start in the middle of
-// a break), in which case it does not affect the vehicle start time.
-// * or after the vehicle end (ditto, with the vehicle end time).
-message BreakRule {
- // The sequence of breaks (i.e. their number and order) that apply to each
- // vehicle must be known beforehand. The repeated `BreakRequest`s define
- // that sequence, in the order in which they must occur. Their time windows
- // (`earliest_start_time` / `latest_start_time`) may overlap, but they must
- // be compatible with the order (this is checked).
- message BreakRequest {
- // Required. Lower bound (inclusive) on the start of the break.
- google.protobuf.Timestamp earliest_start_time = 1
- [(google.api.field_behavior) = REQUIRED];
-
- // Required. Upper bound (inclusive) on the start of the break.
- google.protobuf.Timestamp latest_start_time = 2
- [(google.api.field_behavior) = REQUIRED];
-
- // Required. Minimum duration of the break. Must be positive.
- google.protobuf.Duration min_duration = 3
- [(google.api.field_behavior) = REQUIRED];
- }
-
- // One may further constrain the frequency and duration of the breaks
- // specified above, by enforcing a minimum break frequency, such as
- // "There must be a break of at least 1 hour every 12 hours". Assuming that
- // this can be interpreted as "Within any sliding time window of 12h, there
- // must be at least one break of at least one hour", that example would
- // translate to the following `FrequencyConstraint`:
- // ```
- // {
- // min_break_duration { seconds: 3600 } # 1 hour.
- // max_inter_break_duration { seconds: 39600 } # 11 hours (12 - 1 = 11).
- // }
- // ```
- //
- // The timing and duration of the breaks in the solution will respect all
- // such constraints, in addition to the time windows and minimum durations
- // already specified in the `BreakRequest`.
- //
- // A `FrequencyConstraint` may in practice apply to non-consecutive breaks.
- // For example, the following schedule honors the "1h every 12h" example:
- // ```
- // 04:00 vehicle start
- // .. performing travel and visits ..
- // 09:00 1 hour break
- // 10:00 end of the break
- // .. performing travel and visits ..
- // 12:00 20-min lunch break
- // 12:20 end of the break
- // .. performing travel and visits ..
- // 21:00 1 hour break
- // 22:00 end of the break
- // .. performing travel and visits ..
- // 23:59 vehicle end
- // ```
- message FrequencyConstraint {
- // Required. Minimum break duration for this constraint. Nonnegative.
- // See description of `FrequencyConstraint`.
- google.protobuf.Duration min_break_duration = 1
- [(google.api.field_behavior) = REQUIRED];
-
- // Required. Maximum allowed span of any interval of time in the route that
- // does not include at least partially a break of `duration >=
- // min_break_duration`. Must be positive.
- google.protobuf.Duration max_inter_break_duration = 2
- [(google.api.field_behavior) = REQUIRED];
- }
-
- // Sequence of breaks. See the `BreakRequest` message.
- repeated BreakRequest break_requests = 1;
-
- // Several `FrequencyConstraint` may apply. They must all be satisfied by
- // the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
- repeated FrequencyConstraint frequency_constraints = 2;
-}
-
-// A vehicle's route can be decomposed, along the time axis, like this (we
-// assume there are n visits):
-// ```
-// | | | | | T[2], | | |
-// | Transition | Visit #0 | | | V[2], | | |
-// | #0 | aka | T[1] | V[1] | ... | V[n-1] | T[n] |
-// | aka T[0] | V[0] | | | V[n-2],| | |
-// | | | | | T[n-1] | | |
-// ^ ^ ^ ^ ^ ^ ^ ^
-// vehicle V[0].start V[0].end V[1]. V[1]. V[n]. V[n]. vehicle
-// start (arrival) (departure) start end start end end
-// ```
-// Note that we make a difference between:
-//
-// * "punctual events", such as the vehicle start and end and each visit's start
-// and end (aka arrival and departure). They happen at a given second.
-// * "time intervals", such as the visits themselves, and the transition between
-// visits. Though time intervals can sometimes have zero duration, i.e. start
-// and end at the same second, they often have a positive duration.
-//
-// Invariants:
-//
-// * If there are n visits, there are n+1 transitions.
-// * A visit is always surrounded by a transition before it (same index) and a
-// transition after it (index + 1).
-// * The vehicle start is always followed by transition #0.
-// * The vehicle end is always preceded by transition #n.
-//
-// Zooming in, here is what happens during a `Transition` and a `Visit`:
-// ```
-// ---+-------------------------------------+-----------------------------+-->
-// | TRANSITION[i] | VISIT[i] |
-// | | |
-// | * TRAVEL: the vehicle moves from | PERFORM the visit: |
-// | VISIT[i-1].departure_location to | |
-// | VISIT[i].arrival_location, which | * Spend some time: |
-// | takes a given travel duration | the "visit duration". |
-// | and distance | |
-// | | * Load or unload |
-// | * BREAKS: the driver may have | some quantities from the |
-// | breaks (e.g. lunch break). | vehicle: the "demand". |
-// | | |
-// | * WAIT: the driver/vehicle does | |
-// | nothing. This can happen for | |
-// | many reasons, for example when | |
-// | the vehicle reaches the next | |
-// | event's destination before the | |
-// | start of its time window | |
-// | | |
-// | * DELAY: *right before* the next | |
-// | arrival. E.g. the vehicle and/or | |
-// | driver spends time unloading. | |
-// | | |
-// ---+-------------------------------------+-----------------------------+-->
-// ^ ^ ^
-// V[i-1].end V[i].start V[i].end
-// ```
-// Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged
-// during a transition.
-//
-// * They don't overlap.
-// * The DELAY is unique and *must* be a contiguous period of time right
-// before the next visit (or vehicle end). Thus, it suffice to know the
-// delay duration to know its start and end time.
-// * The BREAKS are contiguous, non-overlapping periods of time. The
-// response specifies the start time and duration of each break.
-// * TRAVEL and WAIT are "preemptable": they can be interrupted several times
-// during this transition. Clients can assume that travel happens "as soon as
-// possible" and that "wait" fills the remaining time.
-//
-// A (complex) example:
-// ```
-// TRANSITION[i]
-// --++-----+-----------------------------------------------------------++-->
-// || | | | | | | ||
-// || T | B | T | | B | | D ||
-// || r | r | r | W | r | W | e ||
-// || a | e | a | a | e | a | l ||
-// || v | a | v | i | a | i | a ||
-// || e | k | e | t | k | t | y ||
-// || l | | l | | | | ||
-// || | | | | | | ||
-// --++-----------------------------------------------------------------++-->
-// ```
-message ShipmentRoute {
- // Deprecated: Use
- // [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration]
- // instead. Time interval spent on the route resulting from a
- // [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay].
- message Delay {
- option deprecated = true;
-
- // Start of the delay.
- google.protobuf.Timestamp start_time = 1;
-
- // Duration of the delay.
- google.protobuf.Duration duration = 2;
- }
-
- // A visit performed during a route. This visit corresponds to a pickup or a
- // delivery of a `Shipment`.
- message Visit {
- // Index of the `shipments` field in the source
- // [ShipmentModel][google.cloud.optimization.v1.ShipmentModel].
- int32 shipment_index = 1;
-
- // If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it
- // corresponds to a delivery.
- bool is_pickup = 2;
-
- // Index of `VisitRequest` in either the pickup or delivery field of the
- // `Shipment` (see `is_pickup`).
- int32 visit_request_index = 3;
-
- // Time at which the visit starts. Note that the vehicle may arrive earlier
- // than this at the visit location. Times are consistent with the
- // `ShipmentModel`.
- google.protobuf.Timestamp start_time = 4;
-
- // Total visit load demand as the sum of the shipment and the visit request
- // `load_demands`. The values are negative if the visit is a delivery.
- // Demands are reported for the same types as the
- // [Transition.loads][google.cloud.optimization.v1.ShipmentRoute.Transition]
- // (see this field).
- map load_demands = 11;
-
- // Extra detour time due to the shipments visited on the route before the
- // visit and to the potential waiting time induced by time windows.
- // If the visit is a delivery, the detour is computed from the corresponding
- // pickup visit and is equal to:
- // ```
- // start_time(delivery) - start_time(pickup)
- // - (duration(pickup) + travel duration from the pickup location
- // to the delivery location).
- // ```
- // Otherwise, it is computed from the vehicle `start_location` and is equal
- // to:
- // ```
- // start_time - vehicle_start_time - travel duration from
- // the vehicle's `start_location` to the visit.
- // ```
- google.protobuf.Duration detour = 6;
-
- // Copy of the corresponding `Shipment.label`, if specified in the
- // `Shipment`.
- string shipment_label = 7;
-
- // Copy of the corresponding
- // [VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label],
- // if specified in the `VisitRequest`.
- string visit_label = 8;
-
- // Deprecated: Use
- // [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
- // instead. Vehicle loads upon arrival at the visit location, for each type
- // specified in
- // [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities],
- // `start_load_intervals`, `end_load_intervals` or `demands`.
- //
- // Exception: we omit loads for quantity types unconstrained by intervals
- // and that don't have any non-zero demand on the route.
- repeated CapacityQuantity arrival_loads = 9 [deprecated = true];
-
- // Deprecated: Use
- // [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration]
- // instead. Delay occurring before the visit starts.
- Delay delay_before_start = 10 [deprecated = true];
-
- // Deprecated: Use
- // [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands]
- // instead.
- repeated CapacityQuantity demands = 5 [deprecated = true];
- }
-
- // Transition between two events on the route. See the description of
- // [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute].
- //
- // If the vehicle does not have a `start_location` and/or `end_location`, the
- // corresponding travel metrics are 0.
- message Transition {
- // Travel duration during this transition.
- google.protobuf.Duration travel_duration = 1;
-
- // Distance traveled during the transition.
- double travel_distance_meters = 2;
-
- // When traffic is requested via
- // [OptimizeToursRequest.consider_road_traffic]
- // [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic],
- // and the traffic info couldn't be retrieved for a `Transition`, this
- // boolean is set to true. This may be temporary (rare hiccup in the
- // realtime traffic servers) or permanent (no data for this location).
- bool traffic_info_unavailable = 3;
-
- // Sum of the delay durations applied to this transition. If any, the delay
- // starts exactly `delay_duration` seconds before the next event (visit or
- // vehicle end). See
- // [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay].
- google.protobuf.Duration delay_duration = 4;
-
- // Sum of the duration of the breaks occurring during this transition, if
- // any. Details about each break's start time and duration are stored in
- // [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks].
- google.protobuf.Duration break_duration = 5;
-
- // Time spent waiting during this transition. Wait duration corresponds to
- // idle time and does not include break time. Also note that this wait time
- // may be split into several non-contiguous intervals.
- google.protobuf.Duration wait_duration = 6;
-
- // Total duration of the transition, provided for convenience. It is equal
- // to:
- //
- // * next visit `start_time` (or `vehicle_end_time` if this is the last
- // transition) - this transition's `start_time`;
- // * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following
- // additionally holds: `total_duration = travel_duration + delay_duration
- // + break_duration + wait_duration`.
- google.protobuf.Duration total_duration = 7;
-
- // Start time of this transition.
- google.protobuf.Timestamp start_time = 8;
-
- // The encoded polyline representation of the route followed during the
- // transition.
- // This field is only populated if [populate_transition_polylines]
- // [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines]
- // is set to true.
- EncodedPolyline route_polyline = 9;
-
- // Vehicle loads during this transition, for each type that either appears
- // in this vehicle's
- // [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits],
- // or that have non-zero
- // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
- // on some shipment performed on this route.
- //
- // The loads during the first transition are the starting loads of the
- // vehicle route. Then, after each visit, the visit's `load_demands` are
- // either added or subtracted to get the next transition's loads, depending
- // on whether the visit was a pickup or a delivery.
- map vehicle_loads = 11;
-
- // Deprecated: Use
- // [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
- // instead.
- repeated CapacityQuantity loads = 10 [deprecated = true];
- }
-
- // Reports the actual load of the vehicle at some point along the route,
- // for a given type (see
- // [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]).
- message VehicleLoad {
- // The amount of load on the vehicle, for the given type. The unit of load
- // is usually indicated by the type. See
- // [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads].
- int64 amount = 1;
- }
-
- // The encoded representation of a polyline. More information on polyline
- // encoding can be found here:
- // https://developers.google.com/maps/documentation/utilities/polylinealgorithm
- // https://developers.google.com/maps/documentation/javascript/reference/geometry#encoding.
- message EncodedPolyline {
- // String representing encoded points of the polyline.
- string points = 1;
- }
-
- // Data representing the execution of a break.
- message Break {
- // Start time of a break.
- google.protobuf.Timestamp start_time = 1;
-
- // Duration of a break.
- google.protobuf.Duration duration = 2;
- }
-
- // Deprecated: Use
- // [ShipmentRoute.Transition][google.cloud.optimization.v1.ShipmentRoute.Transition]
- // instead. Travel between each visit along the route: from the vehicle's
- // `start_location` to the first visit's `arrival_location`, then from the
- // first visit's `departure_location` to the second visit's
- // `arrival_location`, and so on until the vehicle's `end_location`. This
- // accounts only for the actual travel between visits, not counting the
- // waiting time, the time spent performing a visit, nor the distance covered
- // during a visit.
- //
- // Invariant: `travel_steps_size() == visits_size() + 1`.
- //
- // If the vehicle does not have a start_ and/or end_location, the
- // corresponding travel metrics are 0 and/or empty.
- message TravelStep {
- option deprecated = true;
-
- // Duration of the travel step.
- google.protobuf.Duration duration = 1;
-
- // Distance traveled during the step.
- double distance_meters = 2;
-
- // When traffic is requested via
- // [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic],
- // and the traffic info couldn't be retrieved for a TravelStep, this boolean
- // is set to true. This may be temporary (rare hiccup in the realtime
- // traffic servers) or permanent (no data for this location).
- bool traffic_info_unavailable = 3;
-
- // The encoded polyline representation of the route followed during the
- // step.
- //
- // This field is only populated if
- // [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines]
- // is set to true.
- EncodedPolyline route_polyline = 4;
- }
-
- // Vehicle performing the route, identified by its index in the source
- // `ShipmentModel`.
- int32 vehicle_index = 1;
-
- // Label of the vehicle performing this route, equal to
- // `ShipmentModel.vehicles(vehicle_index).label`, if specified.
- string vehicle_label = 2;
-
- // Time at which the vehicle starts its route.
- google.protobuf.Timestamp vehicle_start_time = 5;
-
- // Time at which the vehicle finishes its route.
- google.protobuf.Timestamp vehicle_end_time = 6;
-
- // Ordered sequence of visits representing a route.
- // visits[i] is the i-th visit in the route.
- // If this field is empty, the vehicle is considered as unused.
- repeated Visit visits = 7;
-
- // Ordered list of transitions for the route.
- repeated Transition transitions = 8;
-
- // When
- // [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic],
- // is set to true, this field indicates that inconsistencies in route timings
- // are predicted using traffic-based travel duration estimates. There may be
- // insufficient time to complete traffic-adjusted travel, delays, and breaks
- // between visits, before the first visit, or after the last visit, while
- // still satisfying the visit and vehicle time windows. For example,
- //
- // ```
- // start_time(previous_visit) + duration(previous_visit) +
- // travel_duration(previous_visit, next_visit) > start_time(next_visit)
- // ```
- //
- // Arrival at next_visit will likely happen later than its current
- // time window due the increased estimate of travel time
- // `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break
- // may be forced to overlap with a visit due to an increase in travel time
- // estimates and visit or break time window restrictions.
- bool has_traffic_infeasibilities = 9;
-
- // The encoded polyline representation of the route.
- // This field is only populated if
- // [OptimizeToursRequest.populate_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_polylines]
- // is set to true.
- EncodedPolyline route_polyline = 10;
-
- // Breaks scheduled for the vehicle performing this route.
- // The `breaks` sequence represents time intervals, each starting at the
- // corresponding `start_time` and lasting `duration` seconds.
- repeated Break breaks = 11;
-
- // Duration, distance and load metrics for this route. The fields of
- // [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are
- // summed over all
- // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]
- // or
- // [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits],
- // depending on the context.
- AggregatedMetrics metrics = 12;
-
- // Cost of the route, broken down by cost-related request fields.
- // The keys are proto paths, relative to the input OptimizeToursRequest, e.g.
- // "model.shipments.pickups.cost", and the values are the total cost
- // generated by the corresponding cost field, aggregated over the whole route.
- // In other words, costs["model.shipments.pickups.cost"] is the sum of all
- // pickup costs over the route. All costs defined in the model are reported in
- // detail here with the exception of costs related to TransitionAttributes
- // that are only reported in an aggregated way as of 2022/01.
- map route_costs = 17;
-
- // Total cost of the route. The sum of all costs in the cost map.
- double route_total_cost = 18;
-
- // Deprecated: Use
- // [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
- // instead. Vehicle loads upon arrival at its end location, for each type
- // specified in
- // [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities],
- // `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit
- // loads for quantity types unconstrained by intervals and that don't have any
- // non-zero demand on the route.
- repeated CapacityQuantity end_loads = 13 [deprecated = true];
-
- // Deprecated: Use
- // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]
- // instead. Ordered list of travel steps for the route.
- repeated TravelStep travel_steps = 14 [deprecated = true];
-
- // Deprecated: No longer used.
- // This field will only be populated at the
- // [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]
- // level.
- //
- // This field is the extra detour time due to the shipments visited on the
- // route.
- //
- // It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration
- // from the vehicle's start_location to its `end_location`.
- google.protobuf.Duration vehicle_detour = 15 [deprecated = true];
-
- // Deprecated: Delay occurring before the vehicle end. See
- // [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay].
- Delay delay_before_vehicle_end = 16 [deprecated = true];
-}
-
-// Specifies details of unperformed shipments in a solution. For trivial cases
-// and/or if we are able to identify the cause for skipping, we report the
-// reason here.
-message SkippedShipment {
- // If we can explain why the shipment was skipped, reasons will be listed
- // here. If the reason is not the same for all vehicles, `reason` will have
- // more than 1 element. A skipped shipment cannot have duplicate reasons,
- // i.e. where all fields are the same except for `example_vehicle_index`.
- // Example:
- // ```
- // reasons {
- // code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
- // example_vehicle_index: 1
- // example_exceeded_capacity_type: "Apples"
- // }
- // reasons {
- // code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
- // example_vehicle_index: 3
- // example_exceeded_capacity_type: "Pears"
- // }
- // reasons {
- // code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT
- // example_vehicle_index: 1
- // }
- // ```
- // The skipped shipment is incompatible with all vehicles. The reasons may
- // be different for all vehicles but at least one vehicle's "Apples"
- // capacity would be exceeded (including vehicle 1), at least one vehicle's
- // "Pears" capacity would be exceeded (including vehicle 3) and at least one
- // vehicle's distance limit would be exceeded (including vehicle 1).
- message Reason {
- // Code identifying the reason type. The order here is meaningless. In
- // particular, it gives no indication of whether a given reason will
- // appear before another in the solution, if both apply.
- enum Code {
- // This should never be used. If we are unable to understand why a
- // shipment was skipped, we simply return an empty set of reasons.
- CODE_UNSPECIFIED = 0;
-
- // There is no vehicle in the model making all shipments infeasible.
- NO_VEHICLE = 1;
-
- // The demand of the shipment exceeds a vehicle's capacity for some
- // capacity types, one of which is `example_exceeded_capacity_type`.
- DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2;
-
- // The minimum distance necessary to perform this shipment, i.e. from
- // the vehicle's `start_location` to the shipment's pickup and/or delivery
- // locations and to the vehicle's end location exceeds the vehicle's
- // `route_distance_limit`.
- //
- // Note that for this computation we use the geodesic distances.
- CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3;
-
- // The minimum time necessary to perform this shipment, including travel
- // time, wait time and service time exceeds the vehicle's
- // `route_duration_limit`.
- //
- // Note: travel time is computed in the best-case scenario, namely as
- // geodesic distance x 36 m/s (roughly 130 km/hour).
- CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4;
-
- // Same as above but we only compare minimum travel time and the
- // vehicle's `travel_duration_limit`.
- CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5;
-
- // The vehicle cannot perform this shipment in the best-case scenario
- // (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time
- // computation) if it starts at its earliest start time: the total time
- // would make the vehicle end after its latest end time.
- CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6;
-
- // The `allowed_vehicle_indices` field of the shipment is not empty and
- // this vehicle does not belong to it.
- VEHICLE_NOT_ALLOWED = 7;
- }
-
- // Refer to the comments of Code.
- Code code = 1;
-
- // If the reason is related to a shipment-vehicle incompatibility, this
- // field provides the index of one relevant vehicle.
- optional int32 example_vehicle_index = 2;
-
- // If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one
- // capacity type that is exceeded.
- string example_exceeded_capacity_type = 3;
- }
-
- // The index corresponds to the index of the shipment in the source
- // `ShipmentModel`.
- int32 index = 1;
-
- // Copy of the corresponding
- // [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified
- // in the `Shipment`.
- string label = 2;
-
- // A list of reasons that explain why the shipment was skipped. See comment
- // above `Reason`.
- repeated Reason reasons = 3;
-}
-
-// Aggregated metrics for
-// [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute] (resp. for
-// [OptimizeToursResponse][google.cloud.optimization.v1.OptimizeToursResponse]
-// over all [Transition][google.cloud.optimization.v1.ShipmentRoute.Transition]
-// and/or [Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] (resp. over
-// all [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]) elements.
-message AggregatedMetrics {
- // Number of shipments performed. Note that a pickup and delivery pair only
- // counts once.
- int32 performed_shipment_count = 1;
-
- // Total travel duration for a route or a solution.
- google.protobuf.Duration travel_duration = 2;
-
- // Total wait duration for a route or a solution.
- google.protobuf.Duration wait_duration = 3;
-
- // Total delay duration for a route or a solution.
- google.protobuf.Duration delay_duration = 4;
-
- // Total break duration for a route or a solution.
- google.protobuf.Duration break_duration = 5;
-
- // Total visit duration for a route or a solution.
- google.protobuf.Duration visit_duration = 6;
-
- // The total duration should be equal to the sum of all durations above.
- // For routes, it also corresponds to:
- // [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]
- // `-`
- // [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]
- google.protobuf.Duration total_duration = 7;
-
- // Total travel distance for a route or a solution.
- double travel_distance_meters = 8;
-
- // Maximum load achieved over the entire route (resp. solution), for each of
- // the quantities on this route (resp. solution), computed as the maximum over
- // all
- // [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
- // (resp.
- // [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads].
- map max_loads = 9;
-
- // Deprecated: Use
- // [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs]
- // and
- // [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs]
- // instead.
- map costs = 10 [deprecated = true];
-
- // Deprecated: Use
- // [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost]
- // and
- // [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost]
- // instead.
- double total_cost = 11 [deprecated = true];
-}
-
-// Solution injected in the request including information about which visits
-// must be constrained and how they must be constrained.
-message InjectedSolutionConstraint {
- // For a group of vehicles, specifies at what threshold(s) constraints on
- // visits will be relaxed and to which level. Shipments listed in
- // the `skipped_shipment` field are constrained to be skipped; i.e., they
- // cannot be performed.
- message ConstraintRelaxation {
- // If `relaxations` is empty, the start time and sequence of all visits
- // on `routes` are fully constrained and no new visits may be inserted or
- // added to those routes. Also, a vehicle's start and end time in
- // `routes` is fully constrained, unless the vehicle is empty (i.e., has no
- // visits and has `used_if_route_is_empty` set to false in the model).
- //
- // `relaxations(i).level` specifies the constraint relaxation level applied
- // to a visit #j that satisfies:
- //
- // * `route.visits(j).start_time >= relaxations(i).threshold_time` AND
- // * `j + 1 >= relaxations(i).threshold_visit_count`
- //
- // Similarly, the vehicle start is relaxed to `relaxations(i).level` if it
- // satisfies:
- //
- // * `vehicle_start_time >= relaxations(i).threshold_time` AND
- // * `relaxations(i).threshold_visit_count == 0`
- // and the vehicle end is relaxed to `relaxations(i).level` if it satisfies:
- // * `vehicle_end_time >= relaxations(i).threshold_time` AND
- // * `route.visits_size() + 1 >= relaxations(i).threshold_visit_count`
- //
- // To apply a relaxation level if a visit meets the `threshold_visit_count`
- // OR the `threshold_time` add two `relaxations` with the same `level`:
- // one with only `threshold_visit_count` set and the other with only
- // `threshold_time` set. If a visit satisfies the conditions of multiple
- // `relaxations`, the most relaxed level applies. As a result, from the
- // vehicle start through the route visits in order to the vehicle end, the
- // relaxation level becomes more relaxed: i.e., the relaxation level is
- // non-decreasing as the route progresses.
- //
- // The timing and sequence of route visits that do not satisfy the
- // threshold conditions of any `relaxations` are fully constrained
- // and no visits may be inserted into these sequences. Also, if a
- // vehicle start or end does not satisfy the conditions of any
- // relaxation the time is fixed, unless the vehicle is empty.
- message Relaxation {
- // Expresses the different constraint relaxation levels, which are
- // applied for a visit and those that follow when it satisfies the
- // threshold conditions.
- //
- // The enumeration below is in order of increasing relaxation.
- enum Level {
- // Implicit default relaxation level: no constraints are relaxed,
- // i.e., all visits are fully constrained.
- //
- // This value must not be explicitly used in `level`.
- LEVEL_UNSPECIFIED = 0;
-
- // Visit start times and vehicle start/end times will be relaxed, but
- // each visit remains bound to the same vehicle and the visit sequence
- // must be observed: no visit can be inserted between them or before
- // them.
- RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1;
-
- // Same as `RELAX_VISIT_TIMES_AFTER_THRESHOLD`, but the visit sequence
- // is also relaxed: visits can only be performed by this vehicle, but
- // can potentially become unperformed.
- RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2;
-
- // Same as `RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD`, but the
- // vehicle is also relaxed: visits are completely free at or after the
- // threshold time and can potentially become unperformed.
- RELAX_ALL_AFTER_THRESHOLD = 3;
- }
-
- // The constraint relaxation level that applies when the conditions
- // at or after `threshold_time` AND at least `threshold_visit_count` are
- // satisfied.
- Level level = 1;
-
- // The time at or after which the relaxation `level` may be applied.
- google.protobuf.Timestamp threshold_time = 2;
-
- // The number of visits at or after which the relaxation `level` may be
- // applied. If `threshold_visit_count` is 0 (or unset), the `level` may be
- // applied directly at the vehicle start.
- //
- // If it is `route.visits_size() + 1`, the `level` may only be applied to
- // the vehicle end. If it is more than `route.visits_size() + 1`,
- // `level` is not applied at all for that route.
- int32 threshold_visit_count = 3;
- }
-
- // All the visit constraint relaxations that will apply to visits on
- // routes with vehicles in `vehicle_indices`.
- repeated Relaxation relaxations = 1;
-
- // Specifies the vehicle indices to which the visit constraint
- // `relaxations` apply. If empty, this is considered the default and the
- // `relaxations` apply to all vehicles that are not specified in other
- // `constraint_relaxations`. There can be at most one default, i.e., at
- // most one constraint relaxation field is allowed empty
- // `vehicle_indices`. A vehicle index can only be listed once, even within
- // several `constraint_relaxations`.
- //
- // A vehicle index is mapped the same as
- // [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index],
- // if `interpret_injected_solutions_using_labels` is true (see `fields`
- // comment).
- repeated int32 vehicle_indices = 2;
- }
-
- // Routes of the solution to inject. Some routes may be omitted from the
- // original solution. The routes and skipped shipments must satisfy the basic
- // validity assumptions listed for `injected_first_solution_routes`.
- repeated ShipmentRoute routes = 1;
-
- // Skipped shipments of the solution to inject. Some may be omitted from the
- // original solution. See the `routes` field.
- repeated SkippedShipment skipped_shipments = 2;
-
- // For zero or more groups of vehicles, specifies when and how much to relax
- // constraints. If this field is empty, all non-empty vehicle routes are
- // fully constrained.
- repeated ConstraintRelaxation constraint_relaxations = 3;
-}
-
-// Describes an error encountered when validating an `OptimizeToursRequest`.
-message OptimizeToursValidationError {
- // Specifies a context for the validation error. A `FieldReference` always
- // refers to a given field in this file and follows the same hierarchical
- // structure. For example, we may specify element #2 of `start_time_windows`
- // of vehicle #5 using:
- // ```
- // name: "vehicles" index: 5 sub_field { name: "end_time_windows" index: 2 }
- // ```
- // We however omit top-level entities such as `OptimizeToursRequest` or
- // `ShipmentModel` to avoid crowding the message.
- message FieldReference {
- // Name of the field, e.g., "vehicles".
- string name = 1;
-
- oneof index_or_key {
- // Index of the field if repeated.
- int32 index = 2;
-
- // Key if the field is a map.
- string key = 4;
- }
-
- // Recursively nested sub-field, if needed.
- FieldReference sub_field = 3;
- }
-
- // A validation error is defined by the pair (`code`, `display_name`) which
- // are always present.
- //
- // Other fields (below) provide more context about the error.
- //
- // *MULTIPLE ERRORS*:
- // When there are multiple errors, the validation process tries to output
- // several of them. Much like a compiler, this is an imperfect process. Some
- // validation errors will be "fatal", meaning that they stop the entire
- // validation process. This is the case for `display_name="UNSPECIFIED"`
- // errors, among others. Some may cause the validation process to skip other
- // errors.
- //
- // *STABILITY*:
- // `code` and `display_name` should be very stable. But new codes and
- // display names may appear over time, which may cause a given (invalid)
- // request to yield a different (`code`, `display_name`) pair because the new
- // error hid the old one (see "MULTIPLE ERRORS").
- //
- // *REFERENCE*: A list of all (code, name) pairs:
- //
- // * UNSPECIFIED = 0;
- // * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within
- // the deadline.
- //
- // * REQUEST_OPTIONS_ERROR = 12;
- // * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201;
- // * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203;
- // * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204;
- // * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205;
- // * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206;
- // * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE
- // = 1207;
- // * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208;
- // * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211;
- // * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212;
- // * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213;
- // * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214;
- // * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215;
- // * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216;
- // * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217;
- // * INJECTED_SOLUTION_ERROR = 20;
- // * INJECTED_SOLUTION_MISSING_LABEL = 2000;
- // * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001;
- // * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002;
- // * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003;
- // * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004;
- // * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005;
- // * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006;
- // * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008;
- // * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010;
- // * SHIPMENT_MODEL_ERROR = 22;
- // * SHIPMENT_MODEL_TOO_LARGE = 2200;
- // * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201;
- // * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202;
- // * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203;
- // * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204;
- // * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205;
- // * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206;
- // * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207;
- // * INDEX_ERROR = 24;
- // * TAG_ERROR = 26;
- // * TIME_WINDOW_ERROR = 28;
- // * TIME_WINDOW_INVALID_START_TIME = 2800;
- // * TIME_WINDOW_INVALID_END_TIME = 2801;
- // * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802;
- // * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803;
- // * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804;
- // * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805;
- // * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806;
- // * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807;
- // * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME
- // = 2808;
- // * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809;
- // * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME
- // = 2810;
- // * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811;
- // * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812;
- // * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813;
- // * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814;
- // * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815;
- // * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816;
- // * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS
- // = 2817;
- // * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818;
- // * TRANSITION_ATTRIBUTES_ERROR = 30;
- // * TRANSITION_ATTRIBUTES_INVALID_COST = 3000;
- // * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001;
- // * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002;
- // * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003;
- // * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004;
- // * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005;
- // * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006;
- // * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007;
- // * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008;
- // * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009;
- // * AMOUNT_ERROR = 31;
- // * AMOUNT_NEGATIVE_VALUE = 3100;
- // * LOAD_LIMIT_ERROR = 33;
- // * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303;
- // * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304;
- // * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305;
- // * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306;
- // * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307;
- // * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308;
- // * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309;
- // * INTERVAL_ERROR = 34;
- // * INTERVAL_MIN_EXCEEDS_MAX = 3401;
- // * INTERVAL_NEGATIVE_MIN = 3402;
- // * INTERVAL_NEGATIVE_MAX = 3403;
- // * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404;
- // * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405;
- // * DISTANCE_LIMIT_ERROR = 36;
- // * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601;
- // * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602;
- // * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603;
- // * DISTANCE_LIMIT_NEGATIVE_MAX = 3604;
- // * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605;
- // * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606;
- // * DURATION_LIMIT_ERROR = 38;
- // * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800;
- // * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801;
- // * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802;
- // * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803;
- // * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804;
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805;
- // * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806;
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR
- // = 3807;
- // * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX
- // = 3808;
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809;
- // * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810;
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811;
- // * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE
- // = 3812;
- // * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813;
- // * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814;
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION
- // = 3815;
- // * SHIPMENT_ERROR = 40;
- // * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014;
- // * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000;
- // * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION
- // = 4001;
- // * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015;
- // * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016;
- // * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002;
- // * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003;
- // * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004;
- // * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005;
- // * SHIPMENT_INVALID_PENALTY_COST = 4006;
- // * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007;
- // * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008;
- // * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009;
- // * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010;
- // * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011;
- // * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012;
- // * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013;
- // * VEHICLE_ERROR = 42;
- // * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200;
- // * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201;
- // * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202;
- // * VEHICLE_EMPTY_START_TAG = 4203;
- // * VEHICLE_DUPLICATE_START_TAG = 4204;
- // * VEHICLE_EMPTY_END_TAG = 4205;
- // * VEHICLE_DUPLICATE_END_TAG = 4206;
- // * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207;
- // * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208;
- // * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209;
- // * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210;
- // * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211;
- // * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212;
- // * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213;
- // * VEHICLE_LAST_SHIPMENT_IGNORED = 4214;
- // * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215;
- // * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216;
- // * VEHICLE_INVALID_COST_PER_KILOMETER = 4217;
- // * VEHICLE_INVALID_COST_PER_HOUR = 4218;
- // * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219;
- // * VEHICLE_INVALID_FIXED_COST = 4220;
- // * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221;
- // * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS
- // = 4223;
- // * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224;
- // * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222;
- // * VISIT_REQUEST_ERROR = 44;
- // * VISIT_REQUEST_EMPTY_TAG = 4400;
- // * VISIT_REQUEST_DUPLICATE_TAG = 4401;
- // * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404;
- // * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405;
- // * PRECEDENCE_ERROR = 46;
- // * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600;
- // * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601;
- // * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602;
- // * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603;
- // * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604;
- // * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605;
- // * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606;
- // * BREAK_ERROR = 48;
- // * BREAK_RULE_EMPTY = 4800;
- // * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801;
- // * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802;
- // * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803;
- // * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804;
- // * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805;
- // * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806;
- // * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807;
- // * BREAK_REQUEST_NON_SCHEDULABLE = 4808;
- // * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809;
- // * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810;
- // * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811;
- // * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION
- // = 4812;
- // * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813;
- // * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814;
- // * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815;
- // * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50;
- // * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001;
- // * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002;
- // * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003;
- // * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004;
- // * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005;
- // * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52;
- // * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001;
- // * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002;
- // * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003;
- // * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004;
- // * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005;
- // * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006;
- // * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007;
- // * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008;
- // * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009;
- // * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010;
- // * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011;
- // * VEHICLE_OPERATOR_ERROR = 54;
- // * VEHICLE_OPERATOR_EMPTY_TYPE = 5400;
- // * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401;
- // * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402;
- // * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403;
- // * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404;
- // * DURATION_SECONDS_MATRIX_ERROR = 56;
- // * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600;
- // * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601;
- int32 code = 1;
-
- // The error display name.
- string display_name = 2;
-
- // An error context may involve 0, 1 (most of the time) or more fields. For
- // example, referring to vehicle #4 and shipment #2's first pickup can be
- // done as follows:
- // ```
- // fields { name: "vehicles" index: 4}
- // fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
- // ```
- // Note, however, that the cardinality of `fields` should not change for a
- // given error code.
- repeated FieldReference fields = 3;
-
- // Human-readable string describing the error. There is a 1:1 mapping
- // between `code` and `error_message` (when code != "UNSPECIFIED").
- //
- // *STABILITY*: Not stable: the error message associated to a given `code` may
- // change (hopefully to clarify it) over time. Please rely on the
- // `display_name` and `code` instead.
- string error_message = 4;
-
- // May contain the value(s) of the field(s). This is not always available. You
- // should absolutely not rely on it and use it only for manual model
- // debugging.
- string offending_values = 5;
-}
diff --git a/packages/google-cloud-optimization/protos/protos.d.ts b/packages/google-cloud-optimization/protos/protos.d.ts
deleted file mode 100644
index 362d5c16e88..00000000000
--- a/packages/google-cloud-optimization/protos/protos.d.ts
+++ /dev/null
@@ -1,14410 +0,0 @@
-// Copyright 2025 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-import type {protobuf as $protobuf} from "google-gax";
-import Long = require("long");
-/** Namespace google. */
-export namespace google {
-
- /** Namespace cloud. */
- namespace cloud {
-
- /** Namespace optimization. */
- namespace optimization {
-
- /** Namespace v1. */
- namespace v1 {
-
- /** Properties of an InputConfig. */
- interface IInputConfig {
-
- /** InputConfig gcsSource */
- gcsSource?: (google.cloud.optimization.v1.IGcsSource|null);
-
- /** InputConfig dataFormat */
- dataFormat?: (google.cloud.optimization.v1.DataFormat|keyof typeof google.cloud.optimization.v1.DataFormat|null);
- }
-
- /** Represents an InputConfig. */
- class InputConfig implements IInputConfig {
-
- /**
- * Constructs a new InputConfig.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IInputConfig);
-
- /** InputConfig gcsSource. */
- public gcsSource?: (google.cloud.optimization.v1.IGcsSource|null);
-
- /** InputConfig dataFormat. */
- public dataFormat: (google.cloud.optimization.v1.DataFormat|keyof typeof google.cloud.optimization.v1.DataFormat);
-
- /** InputConfig source. */
- public source?: "gcsSource";
-
- /**
- * Creates a new InputConfig instance using the specified properties.
- * @param [properties] Properties to set
- * @returns InputConfig instance
- */
- public static create(properties?: google.cloud.optimization.v1.IInputConfig): google.cloud.optimization.v1.InputConfig;
-
- /**
- * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.optimization.v1.InputConfig.verify|verify} messages.
- * @param message InputConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.InputConfig.verify|verify} messages.
- * @param message InputConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an InputConfig message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns InputConfig
- * @throws {Error} If the payload is not 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.optimization.v1.InputConfig;
-
- /**
- * Decodes an InputConfig message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns InputConfig
- * @throws {Error} If the payload 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.optimization.v1.InputConfig;
-
- /**
- * Verifies an InputConfig message.
- * @param message Plain 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 InputConfig message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns InputConfig
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.InputConfig;
-
- /**
- * Creates a plain object from an InputConfig message. Also converts values to other types if specified.
- * @param message InputConfig
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.InputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this InputConfig to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for InputConfig
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of an OutputConfig. */
- interface IOutputConfig {
-
- /** OutputConfig gcsDestination */
- gcsDestination?: (google.cloud.optimization.v1.IGcsDestination|null);
-
- /** OutputConfig dataFormat */
- dataFormat?: (google.cloud.optimization.v1.DataFormat|keyof typeof google.cloud.optimization.v1.DataFormat|null);
- }
-
- /** Represents an OutputConfig. */
- class OutputConfig implements IOutputConfig {
-
- /**
- * Constructs a new OutputConfig.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IOutputConfig);
-
- /** OutputConfig gcsDestination. */
- public gcsDestination?: (google.cloud.optimization.v1.IGcsDestination|null);
-
- /** OutputConfig dataFormat. */
- public dataFormat: (google.cloud.optimization.v1.DataFormat|keyof typeof google.cloud.optimization.v1.DataFormat);
-
- /** OutputConfig destination. */
- public destination?: "gcsDestination";
-
- /**
- * Creates a new OutputConfig instance using the specified properties.
- * @param [properties] Properties to set
- * @returns OutputConfig instance
- */
- public static create(properties?: google.cloud.optimization.v1.IOutputConfig): google.cloud.optimization.v1.OutputConfig;
-
- /**
- * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.optimization.v1.OutputConfig.verify|verify} messages.
- * @param message OutputConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OutputConfig.verify|verify} messages.
- * @param message OutputConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IOutputConfig, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an OutputConfig message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns OutputConfig
- * @throws {Error} If the payload is not 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.optimization.v1.OutputConfig;
-
- /**
- * Decodes an OutputConfig message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns OutputConfig
- * @throws {Error} If the payload 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.optimization.v1.OutputConfig;
-
- /**
- * Verifies an OutputConfig message.
- * @param message Plain 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 OutputConfig message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns OutputConfig
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.OutputConfig;
-
- /**
- * Creates a plain object from an OutputConfig message. Also converts values to other types if specified.
- * @param message OutputConfig
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.OutputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this OutputConfig to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for OutputConfig
- * @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 uri */
- uri?: (string|null);
- }
-
- /** Represents a GcsSource. */
- class GcsSource implements IGcsSource {
-
- /**
- * Constructs a new GcsSource.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IGcsSource);
-
- /** GcsSource uri. */
- public uri: string;
-
- /**
- * Creates a new GcsSource instance using the specified properties.
- * @param [properties] Properties to set
- * @returns GcsSource instance
- */
- public static create(properties?: google.cloud.optimization.v1.IGcsSource): google.cloud.optimization.v1.GcsSource;
-
- /**
- * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.optimization.v1.GcsSource.verify|verify} messages.
- * @param message GcsSource message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.GcsSource.verify|verify} messages.
- * @param message GcsSource message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a GcsSource message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns GcsSource
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.optimization.v1.GcsSource;
-
- /**
- * Decodes a GcsSource message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns GcsSource
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.optimization.v1.GcsSource;
-
- /**
- * Verifies a GcsSource message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a GcsSource message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns GcsSource
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.GcsSource;
-
- /**
- * Creates a plain object from a GcsSource message. Also converts values to other types if specified.
- * @param message GcsSource
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this GcsSource to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for GcsSource
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a GcsDestination. */
- interface IGcsDestination {
-
- /** GcsDestination uri */
- uri?: (string|null);
- }
-
- /** Represents a GcsDestination. */
- class GcsDestination implements IGcsDestination {
-
- /**
- * Constructs a new GcsDestination.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IGcsDestination);
-
- /** GcsDestination uri. */
- public uri: string;
-
- /**
- * Creates a new GcsDestination instance using the specified properties.
- * @param [properties] Properties to set
- * @returns GcsDestination instance
- */
- public static create(properties?: google.cloud.optimization.v1.IGcsDestination): google.cloud.optimization.v1.GcsDestination;
-
- /**
- * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.optimization.v1.GcsDestination.verify|verify} messages.
- * @param message GcsDestination message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.GcsDestination.verify|verify} messages.
- * @param message GcsDestination message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a GcsDestination message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns GcsDestination
- * @throws {Error} If the payload is not 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.optimization.v1.GcsDestination;
-
- /**
- * Decodes a GcsDestination message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns GcsDestination
- * @throws {Error} If the payload 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.optimization.v1.GcsDestination;
-
- /**
- * Verifies a GcsDestination message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns GcsDestination
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.GcsDestination;
-
- /**
- * Creates a plain object from a GcsDestination message. Also converts values to other types if specified.
- * @param message GcsDestination
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this GcsDestination to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for GcsDestination
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of an AsyncModelMetadata. */
- interface IAsyncModelMetadata {
-
- /** AsyncModelMetadata state */
- state?: (google.cloud.optimization.v1.AsyncModelMetadata.State|keyof typeof google.cloud.optimization.v1.AsyncModelMetadata.State|null);
-
- /** AsyncModelMetadata stateMessage */
- stateMessage?: (string|null);
-
- /** AsyncModelMetadata createTime */
- createTime?: (google.protobuf.ITimestamp|null);
-
- /** AsyncModelMetadata updateTime */
- updateTime?: (google.protobuf.ITimestamp|null);
- }
-
- /** Represents an AsyncModelMetadata. */
- class AsyncModelMetadata implements IAsyncModelMetadata {
-
- /**
- * Constructs a new AsyncModelMetadata.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IAsyncModelMetadata);
-
- /** AsyncModelMetadata state. */
- public state: (google.cloud.optimization.v1.AsyncModelMetadata.State|keyof typeof google.cloud.optimization.v1.AsyncModelMetadata.State);
-
- /** AsyncModelMetadata stateMessage. */
- public stateMessage: string;
-
- /** AsyncModelMetadata createTime. */
- public createTime?: (google.protobuf.ITimestamp|null);
-
- /** AsyncModelMetadata updateTime. */
- public updateTime?: (google.protobuf.ITimestamp|null);
-
- /**
- * Creates a new AsyncModelMetadata instance using the specified properties.
- * @param [properties] Properties to set
- * @returns AsyncModelMetadata instance
- */
- public static create(properties?: google.cloud.optimization.v1.IAsyncModelMetadata): google.cloud.optimization.v1.AsyncModelMetadata;
-
- /**
- * Encodes the specified AsyncModelMetadata message. Does not implicitly {@link google.cloud.optimization.v1.AsyncModelMetadata.verify|verify} messages.
- * @param message AsyncModelMetadata message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IAsyncModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified AsyncModelMetadata message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.AsyncModelMetadata.verify|verify} messages.
- * @param message AsyncModelMetadata message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IAsyncModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an AsyncModelMetadata message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns AsyncModelMetadata
- * @throws {Error} If the payload is not 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.optimization.v1.AsyncModelMetadata;
-
- /**
- * Decodes an AsyncModelMetadata message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns AsyncModelMetadata
- * @throws {Error} If the payload 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.optimization.v1.AsyncModelMetadata;
-
- /**
- * Verifies an AsyncModelMetadata message.
- * @param message Plain 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 AsyncModelMetadata message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns AsyncModelMetadata
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.AsyncModelMetadata;
-
- /**
- * Creates a plain object from an AsyncModelMetadata message. Also converts values to other types if specified.
- * @param message AsyncModelMetadata
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.AsyncModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this AsyncModelMetadata to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for AsyncModelMetadata
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace AsyncModelMetadata {
-
- /** State enum. */
- enum State {
- STATE_UNSPECIFIED = 0,
- RUNNING = 1,
- SUCCEEDED = 2,
- CANCELLED = 3,
- FAILED = 4
- }
- }
-
- /** DataFormat enum. */
- enum DataFormat {
- DATA_FORMAT_UNSPECIFIED = 0,
- JSON = 1,
- STRING = 2
- }
-
- /** Represents a FleetRouting */
- class FleetRouting extends $protobuf.rpc.Service {
-
- /**
- * Constructs a new FleetRouting 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 FleetRouting 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): FleetRouting;
-
- /**
- * Calls OptimizeTours.
- * @param request OptimizeToursRequest message or plain object
- * @param callback Node-style callback called with the error, if any, and OptimizeToursResponse
- */
- public optimizeTours(request: google.cloud.optimization.v1.IOptimizeToursRequest, callback: google.cloud.optimization.v1.FleetRouting.OptimizeToursCallback): void;
-
- /**
- * Calls OptimizeTours.
- * @param request OptimizeToursRequest message or plain object
- * @returns Promise
- */
- public optimizeTours(request: google.cloud.optimization.v1.IOptimizeToursRequest): Promise;
-
- /**
- * Calls BatchOptimizeTours.
- * @param request BatchOptimizeToursRequest message or plain object
- * @param callback Node-style callback called with the error, if any, and Operation
- */
- public batchOptimizeTours(request: google.cloud.optimization.v1.IBatchOptimizeToursRequest, callback: google.cloud.optimization.v1.FleetRouting.BatchOptimizeToursCallback): void;
-
- /**
- * Calls BatchOptimizeTours.
- * @param request BatchOptimizeToursRequest message or plain object
- * @returns Promise
- */
- public batchOptimizeTours(request: google.cloud.optimization.v1.IBatchOptimizeToursRequest): Promise;
- }
-
- namespace FleetRouting {
-
- /**
- * Callback as used by {@link google.cloud.optimization.v1.FleetRouting|optimizeTours}.
- * @param error Error, if any
- * @param [response] OptimizeToursResponse
- */
- type OptimizeToursCallback = (error: (Error|null), response?: google.cloud.optimization.v1.OptimizeToursResponse) => void;
-
- /**
- * Callback as used by {@link google.cloud.optimization.v1.FleetRouting|batchOptimizeTours}.
- * @param error Error, if any
- * @param [response] Operation
- */
- type BatchOptimizeToursCallback = (error: (Error|null), response?: google.longrunning.Operation) => void;
- }
-
- /** Properties of an OptimizeToursRequest. */
- interface IOptimizeToursRequest {
-
- /** OptimizeToursRequest parent */
- parent?: (string|null);
-
- /** OptimizeToursRequest timeout */
- timeout?: (google.protobuf.IDuration|null);
-
- /** OptimizeToursRequest model */
- model?: (google.cloud.optimization.v1.IShipmentModel|null);
-
- /** OptimizeToursRequest solvingMode */
- solvingMode?: (google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode|keyof typeof google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode|null);
-
- /** OptimizeToursRequest searchMode */
- searchMode?: (google.cloud.optimization.v1.OptimizeToursRequest.SearchMode|keyof typeof google.cloud.optimization.v1.OptimizeToursRequest.SearchMode|null);
-
- /** OptimizeToursRequest injectedFirstSolutionRoutes */
- injectedFirstSolutionRoutes?: (google.cloud.optimization.v1.IShipmentRoute[]|null);
-
- /** OptimizeToursRequest injectedSolutionConstraint */
- injectedSolutionConstraint?: (google.cloud.optimization.v1.IInjectedSolutionConstraint|null);
-
- /** OptimizeToursRequest refreshDetailsRoutes */
- refreshDetailsRoutes?: (google.cloud.optimization.v1.IShipmentRoute[]|null);
-
- /** OptimizeToursRequest interpretInjectedSolutionsUsingLabels */
- interpretInjectedSolutionsUsingLabels?: (boolean|null);
-
- /** OptimizeToursRequest considerRoadTraffic */
- considerRoadTraffic?: (boolean|null);
-
- /** OptimizeToursRequest populatePolylines */
- populatePolylines?: (boolean|null);
-
- /** OptimizeToursRequest populateTransitionPolylines */
- populateTransitionPolylines?: (boolean|null);
-
- /** OptimizeToursRequest allowLargeDeadlineDespiteInterruptionRisk */
- allowLargeDeadlineDespiteInterruptionRisk?: (boolean|null);
-
- /** OptimizeToursRequest useGeodesicDistances */
- useGeodesicDistances?: (boolean|null);
-
- /** OptimizeToursRequest geodesicMetersPerSecond */
- geodesicMetersPerSecond?: (number|null);
-
- /** OptimizeToursRequest maxValidationErrors */
- maxValidationErrors?: (number|null);
-
- /** OptimizeToursRequest label */
- label?: (string|null);
-
- /** OptimizeToursRequest populateTravelStepPolylines */
- populateTravelStepPolylines?: (boolean|null);
- }
-
- /** Represents an OptimizeToursRequest. */
- class OptimizeToursRequest implements IOptimizeToursRequest {
-
- /**
- * Constructs a new OptimizeToursRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IOptimizeToursRequest);
-
- /** OptimizeToursRequest parent. */
- public parent: string;
-
- /** OptimizeToursRequest timeout. */
- public timeout?: (google.protobuf.IDuration|null);
-
- /** OptimizeToursRequest model. */
- public model?: (google.cloud.optimization.v1.IShipmentModel|null);
-
- /** OptimizeToursRequest solvingMode. */
- public solvingMode: (google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode|keyof typeof google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode);
-
- /** OptimizeToursRequest searchMode. */
- public searchMode: (google.cloud.optimization.v1.OptimizeToursRequest.SearchMode|keyof typeof google.cloud.optimization.v1.OptimizeToursRequest.SearchMode);
-
- /** OptimizeToursRequest injectedFirstSolutionRoutes. */
- public injectedFirstSolutionRoutes: google.cloud.optimization.v1.IShipmentRoute[];
-
- /** OptimizeToursRequest injectedSolutionConstraint. */
- public injectedSolutionConstraint?: (google.cloud.optimization.v1.IInjectedSolutionConstraint|null);
-
- /** OptimizeToursRequest refreshDetailsRoutes. */
- public refreshDetailsRoutes: google.cloud.optimization.v1.IShipmentRoute[];
-
- /** OptimizeToursRequest interpretInjectedSolutionsUsingLabels. */
- public interpretInjectedSolutionsUsingLabels: boolean;
-
- /** OptimizeToursRequest considerRoadTraffic. */
- public considerRoadTraffic: boolean;
-
- /** OptimizeToursRequest populatePolylines. */
- public populatePolylines: boolean;
-
- /** OptimizeToursRequest populateTransitionPolylines. */
- public populateTransitionPolylines: boolean;
-
- /** OptimizeToursRequest allowLargeDeadlineDespiteInterruptionRisk. */
- public allowLargeDeadlineDespiteInterruptionRisk: boolean;
-
- /** OptimizeToursRequest useGeodesicDistances. */
- public useGeodesicDistances: boolean;
-
- /** OptimizeToursRequest geodesicMetersPerSecond. */
- public geodesicMetersPerSecond?: (number|null);
-
- /** OptimizeToursRequest maxValidationErrors. */
- public maxValidationErrors?: (number|null);
-
- /** OptimizeToursRequest label. */
- public label: string;
-
- /** OptimizeToursRequest populateTravelStepPolylines. */
- public populateTravelStepPolylines: boolean;
-
- /** OptimizeToursRequest _geodesicMetersPerSecond. */
- public _geodesicMetersPerSecond?: "geodesicMetersPerSecond";
-
- /** OptimizeToursRequest _maxValidationErrors. */
- public _maxValidationErrors?: "maxValidationErrors";
-
- /**
- * Creates a new OptimizeToursRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns OptimizeToursRequest instance
- */
- public static create(properties?: google.cloud.optimization.v1.IOptimizeToursRequest): google.cloud.optimization.v1.OptimizeToursRequest;
-
- /**
- * Encodes the specified OptimizeToursRequest message. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursRequest.verify|verify} messages.
- * @param message OptimizeToursRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IOptimizeToursRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified OptimizeToursRequest message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursRequest.verify|verify} messages.
- * @param message OptimizeToursRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IOptimizeToursRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an OptimizeToursRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns OptimizeToursRequest
- * @throws {Error} If the payload is not 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.optimization.v1.OptimizeToursRequest;
-
- /**
- * Decodes an OptimizeToursRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns OptimizeToursRequest
- * @throws {Error} If the payload 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.optimization.v1.OptimizeToursRequest;
-
- /**
- * Verifies an OptimizeToursRequest message.
- * @param message Plain 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 OptimizeToursRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns OptimizeToursRequest
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.OptimizeToursRequest;
-
- /**
- * Creates a plain object from an OptimizeToursRequest message. Also converts values to other types if specified.
- * @param message OptimizeToursRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.OptimizeToursRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this OptimizeToursRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for OptimizeToursRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace OptimizeToursRequest {
-
- /** SolvingMode enum. */
- enum SolvingMode {
- DEFAULT_SOLVE = 0,
- VALIDATE_ONLY = 1,
- DETECT_SOME_INFEASIBLE_SHIPMENTS = 2
- }
-
- /** SearchMode enum. */
- enum SearchMode {
- SEARCH_MODE_UNSPECIFIED = 0,
- RETURN_FAST = 1,
- CONSUME_ALL_AVAILABLE_TIME = 2
- }
- }
-
- /** Properties of an OptimizeToursResponse. */
- interface IOptimizeToursResponse {
-
- /** OptimizeToursResponse routes */
- routes?: (google.cloud.optimization.v1.IShipmentRoute[]|null);
-
- /** OptimizeToursResponse requestLabel */
- requestLabel?: (string|null);
-
- /** OptimizeToursResponse skippedShipments */
- skippedShipments?: (google.cloud.optimization.v1.ISkippedShipment[]|null);
-
- /** OptimizeToursResponse validationErrors */
- validationErrors?: (google.cloud.optimization.v1.IOptimizeToursValidationError[]|null);
-
- /** OptimizeToursResponse metrics */
- metrics?: (google.cloud.optimization.v1.OptimizeToursResponse.IMetrics|null);
-
- /** OptimizeToursResponse totalCost */
- totalCost?: (number|null);
- }
-
- /** Represents an OptimizeToursResponse. */
- class OptimizeToursResponse implements IOptimizeToursResponse {
-
- /**
- * Constructs a new OptimizeToursResponse.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IOptimizeToursResponse);
-
- /** OptimizeToursResponse routes. */
- public routes: google.cloud.optimization.v1.IShipmentRoute[];
-
- /** OptimizeToursResponse requestLabel. */
- public requestLabel: string;
-
- /** OptimizeToursResponse skippedShipments. */
- public skippedShipments: google.cloud.optimization.v1.ISkippedShipment[];
-
- /** OptimizeToursResponse validationErrors. */
- public validationErrors: google.cloud.optimization.v1.IOptimizeToursValidationError[];
-
- /** OptimizeToursResponse metrics. */
- public metrics?: (google.cloud.optimization.v1.OptimizeToursResponse.IMetrics|null);
-
- /** OptimizeToursResponse totalCost. */
- public totalCost: number;
-
- /**
- * Creates a new OptimizeToursResponse instance using the specified properties.
- * @param [properties] Properties to set
- * @returns OptimizeToursResponse instance
- */
- public static create(properties?: google.cloud.optimization.v1.IOptimizeToursResponse): google.cloud.optimization.v1.OptimizeToursResponse;
-
- /**
- * Encodes the specified OptimizeToursResponse message. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursResponse.verify|verify} messages.
- * @param message OptimizeToursResponse message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IOptimizeToursResponse, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified OptimizeToursResponse message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursResponse.verify|verify} messages.
- * @param message OptimizeToursResponse message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IOptimizeToursResponse, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an OptimizeToursResponse message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns OptimizeToursResponse
- * @throws {Error} If the payload is not 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.optimization.v1.OptimizeToursResponse;
-
- /**
- * Decodes an OptimizeToursResponse message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns OptimizeToursResponse
- * @throws {Error} If the payload 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.optimization.v1.OptimizeToursResponse;
-
- /**
- * Verifies an OptimizeToursResponse message.
- * @param message Plain 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 OptimizeToursResponse message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns OptimizeToursResponse
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.OptimizeToursResponse;
-
- /**
- * Creates a plain object from an OptimizeToursResponse message. Also converts values to other types if specified.
- * @param message OptimizeToursResponse
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.OptimizeToursResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this OptimizeToursResponse to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for OptimizeToursResponse
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace OptimizeToursResponse {
-
- /** Properties of a Metrics. */
- interface IMetrics {
-
- /** Metrics aggregatedRouteMetrics */
- aggregatedRouteMetrics?: (google.cloud.optimization.v1.IAggregatedMetrics|null);
-
- /** Metrics skippedMandatoryShipmentCount */
- skippedMandatoryShipmentCount?: (number|null);
-
- /** Metrics usedVehicleCount */
- usedVehicleCount?: (number|null);
-
- /** Metrics earliestVehicleStartTime */
- earliestVehicleStartTime?: (google.protobuf.ITimestamp|null);
-
- /** Metrics latestVehicleEndTime */
- latestVehicleEndTime?: (google.protobuf.ITimestamp|null);
-
- /** Metrics costs */
- costs?: ({ [k: string]: number }|null);
-
- /** Metrics totalCost */
- totalCost?: (number|null);
- }
-
- /** Represents a Metrics. */
- class Metrics implements IMetrics {
-
- /**
- * Constructs a new Metrics.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.OptimizeToursResponse.IMetrics);
-
- /** Metrics aggregatedRouteMetrics. */
- public aggregatedRouteMetrics?: (google.cloud.optimization.v1.IAggregatedMetrics|null);
-
- /** Metrics skippedMandatoryShipmentCount. */
- public skippedMandatoryShipmentCount: number;
-
- /** Metrics usedVehicleCount. */
- public usedVehicleCount: number;
-
- /** Metrics earliestVehicleStartTime. */
- public earliestVehicleStartTime?: (google.protobuf.ITimestamp|null);
-
- /** Metrics latestVehicleEndTime. */
- public latestVehicleEndTime?: (google.protobuf.ITimestamp|null);
-
- /** Metrics costs. */
- public costs: { [k: string]: number };
-
- /** Metrics totalCost. */
- public totalCost: number;
-
- /**
- * Creates a new Metrics instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Metrics instance
- */
- public static create(properties?: google.cloud.optimization.v1.OptimizeToursResponse.IMetrics): google.cloud.optimization.v1.OptimizeToursResponse.Metrics;
-
- /**
- * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursResponse.Metrics.verify|verify} messages.
- * @param message Metrics message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.OptimizeToursResponse.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursResponse.Metrics.verify|verify} messages.
- * @param message Metrics message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.OptimizeToursResponse.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Metrics message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Metrics
- * @throws {Error} If the payload is not 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.optimization.v1.OptimizeToursResponse.Metrics;
-
- /**
- * Decodes a Metrics message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Metrics
- * @throws {Error} If the payload 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.optimization.v1.OptimizeToursResponse.Metrics;
-
- /**
- * Verifies a Metrics message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Metrics message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Metrics
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.OptimizeToursResponse.Metrics;
-
- /**
- * Creates a plain object from a Metrics message. Also converts values to other types if specified.
- * @param message Metrics
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.OptimizeToursResponse.Metrics, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Metrics to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Metrics
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a BatchOptimizeToursRequest. */
- interface IBatchOptimizeToursRequest {
-
- /** BatchOptimizeToursRequest parent */
- parent?: (string|null);
-
- /** BatchOptimizeToursRequest modelConfigs */
- modelConfigs?: (google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig[]|null);
- }
-
- /** Represents a BatchOptimizeToursRequest. */
- class BatchOptimizeToursRequest implements IBatchOptimizeToursRequest {
-
- /**
- * Constructs a new BatchOptimizeToursRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IBatchOptimizeToursRequest);
-
- /** BatchOptimizeToursRequest parent. */
- public parent: string;
-
- /** BatchOptimizeToursRequest modelConfigs. */
- public modelConfigs: google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig[];
-
- /**
- * Creates a new BatchOptimizeToursRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns BatchOptimizeToursRequest instance
- */
- public static create(properties?: google.cloud.optimization.v1.IBatchOptimizeToursRequest): google.cloud.optimization.v1.BatchOptimizeToursRequest;
-
- /**
- * Encodes the specified BatchOptimizeToursRequest message. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursRequest.verify|verify} messages.
- * @param message BatchOptimizeToursRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IBatchOptimizeToursRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified BatchOptimizeToursRequest message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursRequest.verify|verify} messages.
- * @param message BatchOptimizeToursRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IBatchOptimizeToursRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a BatchOptimizeToursRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns BatchOptimizeToursRequest
- * @throws {Error} If the payload is not 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.optimization.v1.BatchOptimizeToursRequest;
-
- /**
- * Decodes a BatchOptimizeToursRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns BatchOptimizeToursRequest
- * @throws {Error} If the payload 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.optimization.v1.BatchOptimizeToursRequest;
-
- /**
- * Verifies a BatchOptimizeToursRequest message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a BatchOptimizeToursRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns BatchOptimizeToursRequest
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.BatchOptimizeToursRequest;
-
- /**
- * Creates a plain object from a BatchOptimizeToursRequest message. Also converts values to other types if specified.
- * @param message BatchOptimizeToursRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.BatchOptimizeToursRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this BatchOptimizeToursRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for BatchOptimizeToursRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace BatchOptimizeToursRequest {
-
- /** Properties of an AsyncModelConfig. */
- interface IAsyncModelConfig {
-
- /** AsyncModelConfig displayName */
- displayName?: (string|null);
-
- /** AsyncModelConfig inputConfig */
- inputConfig?: (google.cloud.optimization.v1.IInputConfig|null);
-
- /** AsyncModelConfig outputConfig */
- outputConfig?: (google.cloud.optimization.v1.IOutputConfig|null);
-
- /** AsyncModelConfig enableCheckpoints */
- enableCheckpoints?: (boolean|null);
- }
-
- /** Represents an AsyncModelConfig. */
- class AsyncModelConfig implements IAsyncModelConfig {
-
- /**
- * Constructs a new AsyncModelConfig.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig);
-
- /** AsyncModelConfig displayName. */
- public displayName: string;
-
- /** AsyncModelConfig inputConfig. */
- public inputConfig?: (google.cloud.optimization.v1.IInputConfig|null);
-
- /** AsyncModelConfig outputConfig. */
- public outputConfig?: (google.cloud.optimization.v1.IOutputConfig|null);
-
- /** AsyncModelConfig enableCheckpoints. */
- public enableCheckpoints: boolean;
-
- /**
- * Creates a new AsyncModelConfig instance using the specified properties.
- * @param [properties] Properties to set
- * @returns AsyncModelConfig instance
- */
- public static create(properties?: google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig): google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig;
-
- /**
- * Encodes the specified AsyncModelConfig message. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.verify|verify} messages.
- * @param message AsyncModelConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified AsyncModelConfig message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.verify|verify} messages.
- * @param message AsyncModelConfig message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an AsyncModelConfig message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns AsyncModelConfig
- * @throws {Error} If the payload is not 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.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig;
-
- /**
- * Decodes an AsyncModelConfig message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns AsyncModelConfig
- * @throws {Error} If the payload 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.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig;
-
- /**
- * Verifies an AsyncModelConfig message.
- * @param message Plain 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 AsyncModelConfig message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns AsyncModelConfig
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig;
-
- /**
- * Creates a plain object from an AsyncModelConfig message. Also converts values to other types if specified.
- * @param message AsyncModelConfig
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this AsyncModelConfig to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for AsyncModelConfig
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a BatchOptimizeToursResponse. */
- interface IBatchOptimizeToursResponse {
- }
-
- /** Represents a BatchOptimizeToursResponse. */
- class BatchOptimizeToursResponse implements IBatchOptimizeToursResponse {
-
- /**
- * Constructs a new BatchOptimizeToursResponse.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IBatchOptimizeToursResponse);
-
- /**
- * Creates a new BatchOptimizeToursResponse instance using the specified properties.
- * @param [properties] Properties to set
- * @returns BatchOptimizeToursResponse instance
- */
- public static create(properties?: google.cloud.optimization.v1.IBatchOptimizeToursResponse): google.cloud.optimization.v1.BatchOptimizeToursResponse;
-
- /**
- * Encodes the specified BatchOptimizeToursResponse message. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursResponse.verify|verify} messages.
- * @param message BatchOptimizeToursResponse message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IBatchOptimizeToursResponse, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified BatchOptimizeToursResponse message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursResponse.verify|verify} messages.
- * @param message BatchOptimizeToursResponse message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IBatchOptimizeToursResponse, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a BatchOptimizeToursResponse message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns BatchOptimizeToursResponse
- * @throws {Error} If the payload is not 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.optimization.v1.BatchOptimizeToursResponse;
-
- /**
- * Decodes a BatchOptimizeToursResponse message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns BatchOptimizeToursResponse
- * @throws {Error} If the payload 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.optimization.v1.BatchOptimizeToursResponse;
-
- /**
- * Verifies a BatchOptimizeToursResponse message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a BatchOptimizeToursResponse message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns BatchOptimizeToursResponse
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.BatchOptimizeToursResponse;
-
- /**
- * Creates a plain object from a BatchOptimizeToursResponse message. Also converts values to other types if specified.
- * @param message BatchOptimizeToursResponse
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.BatchOptimizeToursResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this BatchOptimizeToursResponse to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for BatchOptimizeToursResponse
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a ShipmentModel. */
- interface IShipmentModel {
-
- /** ShipmentModel shipments */
- shipments?: (google.cloud.optimization.v1.IShipment[]|null);
-
- /** ShipmentModel vehicles */
- vehicles?: (google.cloud.optimization.v1.IVehicle[]|null);
-
- /** ShipmentModel maxActiveVehicles */
- maxActiveVehicles?: (number|null);
-
- /** ShipmentModel globalStartTime */
- globalStartTime?: (google.protobuf.ITimestamp|null);
-
- /** ShipmentModel globalEndTime */
- globalEndTime?: (google.protobuf.ITimestamp|null);
-
- /** ShipmentModel globalDurationCostPerHour */
- globalDurationCostPerHour?: (number|null);
-
- /** ShipmentModel durationDistanceMatrices */
- durationDistanceMatrices?: (google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix[]|null);
-
- /** ShipmentModel durationDistanceMatrixSrcTags */
- durationDistanceMatrixSrcTags?: (string[]|null);
-
- /** ShipmentModel durationDistanceMatrixDstTags */
- durationDistanceMatrixDstTags?: (string[]|null);
-
- /** ShipmentModel transitionAttributes */
- transitionAttributes?: (google.cloud.optimization.v1.ITransitionAttributes[]|null);
-
- /** ShipmentModel shipmentTypeIncompatibilities */
- shipmentTypeIncompatibilities?: (google.cloud.optimization.v1.IShipmentTypeIncompatibility[]|null);
-
- /** ShipmentModel shipmentTypeRequirements */
- shipmentTypeRequirements?: (google.cloud.optimization.v1.IShipmentTypeRequirement[]|null);
-
- /** ShipmentModel precedenceRules */
- precedenceRules?: (google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule[]|null);
-
- /** ShipmentModel breakRules */
- breakRules?: (google.cloud.optimization.v1.ShipmentModel.IBreakRule[]|null);
- }
-
- /** Represents a ShipmentModel. */
- class ShipmentModel implements IShipmentModel {
-
- /**
- * Constructs a new ShipmentModel.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IShipmentModel);
-
- /** ShipmentModel shipments. */
- public shipments: google.cloud.optimization.v1.IShipment[];
-
- /** ShipmentModel vehicles. */
- public vehicles: google.cloud.optimization.v1.IVehicle[];
-
- /** ShipmentModel maxActiveVehicles. */
- public maxActiveVehicles?: (number|null);
-
- /** ShipmentModel globalStartTime. */
- public globalStartTime?: (google.protobuf.ITimestamp|null);
-
- /** ShipmentModel globalEndTime. */
- public globalEndTime?: (google.protobuf.ITimestamp|null);
-
- /** ShipmentModel globalDurationCostPerHour. */
- public globalDurationCostPerHour: number;
-
- /** ShipmentModel durationDistanceMatrices. */
- public durationDistanceMatrices: google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix[];
-
- /** ShipmentModel durationDistanceMatrixSrcTags. */
- public durationDistanceMatrixSrcTags: string[];
-
- /** ShipmentModel durationDistanceMatrixDstTags. */
- public durationDistanceMatrixDstTags: string[];
-
- /** ShipmentModel transitionAttributes. */
- public transitionAttributes: google.cloud.optimization.v1.ITransitionAttributes[];
-
- /** ShipmentModel shipmentTypeIncompatibilities. */
- public shipmentTypeIncompatibilities: google.cloud.optimization.v1.IShipmentTypeIncompatibility[];
-
- /** ShipmentModel shipmentTypeRequirements. */
- public shipmentTypeRequirements: google.cloud.optimization.v1.IShipmentTypeRequirement[];
-
- /** ShipmentModel precedenceRules. */
- public precedenceRules: google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule[];
-
- /** ShipmentModel breakRules. */
- public breakRules: google.cloud.optimization.v1.ShipmentModel.IBreakRule[];
-
- /** ShipmentModel _maxActiveVehicles. */
- public _maxActiveVehicles?: "maxActiveVehicles";
-
- /**
- * Creates a new ShipmentModel instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ShipmentModel instance
- */
- public static create(properties?: google.cloud.optimization.v1.IShipmentModel): google.cloud.optimization.v1.ShipmentModel;
-
- /**
- * Encodes the specified ShipmentModel message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.verify|verify} messages.
- * @param message ShipmentModel message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IShipmentModel, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ShipmentModel message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.verify|verify} messages.
- * @param message ShipmentModel message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IShipmentModel, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a ShipmentModel message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ShipmentModel
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentModel;
-
- /**
- * Decodes a ShipmentModel message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ShipmentModel
- * @throws {Error} If the payload 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.optimization.v1.ShipmentModel;
-
- /**
- * Verifies a ShipmentModel message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a ShipmentModel message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ShipmentModel
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentModel;
-
- /**
- * Creates a plain object from a ShipmentModel message. Also converts values to other types if specified.
- * @param message ShipmentModel
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentModel, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ShipmentModel to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ShipmentModel
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace ShipmentModel {
-
- /** Properties of a DurationDistanceMatrix. */
- interface IDurationDistanceMatrix {
-
- /** DurationDistanceMatrix rows */
- rows?: (google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow[]|null);
-
- /** DurationDistanceMatrix vehicleStartTag */
- vehicleStartTag?: (string|null);
- }
-
- /** Represents a DurationDistanceMatrix. */
- class DurationDistanceMatrix implements IDurationDistanceMatrix {
-
- /**
- * Constructs a new DurationDistanceMatrix.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix);
-
- /** DurationDistanceMatrix rows. */
- public rows: google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow[];
-
- /** DurationDistanceMatrix vehicleStartTag. */
- public vehicleStartTag: string;
-
- /**
- * Creates a new DurationDistanceMatrix instance using the specified properties.
- * @param [properties] Properties to set
- * @returns DurationDistanceMatrix instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix): google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix;
-
- /**
- * Encodes the specified DurationDistanceMatrix message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.verify|verify} messages.
- * @param message DurationDistanceMatrix message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified DurationDistanceMatrix message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.verify|verify} messages.
- * @param message DurationDistanceMatrix message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a DurationDistanceMatrix message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns DurationDistanceMatrix
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentModel.DurationDistanceMatrix;
-
- /**
- * Decodes a DurationDistanceMatrix message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns DurationDistanceMatrix
- * @throws {Error} If the payload 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.optimization.v1.ShipmentModel.DurationDistanceMatrix;
-
- /**
- * Verifies a DurationDistanceMatrix message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a DurationDistanceMatrix message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns DurationDistanceMatrix
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix;
-
- /**
- * Creates a plain object from a DurationDistanceMatrix message. Also converts values to other types if specified.
- * @param message DurationDistanceMatrix
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this DurationDistanceMatrix to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for DurationDistanceMatrix
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace DurationDistanceMatrix {
-
- /** Properties of a Row. */
- interface IRow {
-
- /** Row durations */
- durations?: (google.protobuf.IDuration[]|null);
-
- /** Row meters */
- meters?: (number[]|null);
- }
-
- /** Represents a Row. */
- class Row implements IRow {
-
- /**
- * Constructs a new Row.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow);
-
- /** Row durations. */
- public durations: google.protobuf.IDuration[];
-
- /** Row meters. */
- public meters: number[];
-
- /**
- * Creates a new Row instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Row instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow): google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row;
-
- /**
- * Encodes the specified Row message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.verify|verify} messages.
- * @param message Row message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.verify|verify} messages.
- * @param message Row message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Row message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Row
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row;
-
- /**
- * Decodes a Row message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Row
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row;
-
- /**
- * Verifies a Row message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Row message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Row
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row;
-
- /**
- * Creates a plain object from a Row message. Also converts values to other types if specified.
- * @param message Row
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Row to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Row
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a PrecedenceRule. */
- interface IPrecedenceRule {
-
- /** PrecedenceRule firstIndex */
- firstIndex?: (number|null);
-
- /** PrecedenceRule firstIsDelivery */
- firstIsDelivery?: (boolean|null);
-
- /** PrecedenceRule secondIndex */
- secondIndex?: (number|null);
-
- /** PrecedenceRule secondIsDelivery */
- secondIsDelivery?: (boolean|null);
-
- /** PrecedenceRule offsetDuration */
- offsetDuration?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a PrecedenceRule. */
- class PrecedenceRule implements IPrecedenceRule {
-
- /**
- * Constructs a new PrecedenceRule.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule);
-
- /** PrecedenceRule firstIndex. */
- public firstIndex?: (number|null);
-
- /** PrecedenceRule firstIsDelivery. */
- public firstIsDelivery: boolean;
-
- /** PrecedenceRule secondIndex. */
- public secondIndex?: (number|null);
-
- /** PrecedenceRule secondIsDelivery. */
- public secondIsDelivery: boolean;
-
- /** PrecedenceRule offsetDuration. */
- public offsetDuration?: (google.protobuf.IDuration|null);
-
- /** PrecedenceRule _firstIndex. */
- public _firstIndex?: "firstIndex";
-
- /** PrecedenceRule _secondIndex. */
- public _secondIndex?: "secondIndex";
-
- /**
- * Creates a new PrecedenceRule instance using the specified properties.
- * @param [properties] Properties to set
- * @returns PrecedenceRule instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule): google.cloud.optimization.v1.ShipmentModel.PrecedenceRule;
-
- /**
- * Encodes the specified PrecedenceRule message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.verify|verify} messages.
- * @param message PrecedenceRule message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified PrecedenceRule message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.verify|verify} messages.
- * @param message PrecedenceRule message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a PrecedenceRule message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns PrecedenceRule
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentModel.PrecedenceRule;
-
- /**
- * Decodes a PrecedenceRule message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns PrecedenceRule
- * @throws {Error} If the payload 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.optimization.v1.ShipmentModel.PrecedenceRule;
-
- /**
- * Verifies a PrecedenceRule message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a PrecedenceRule message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns PrecedenceRule
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentModel.PrecedenceRule;
-
- /**
- * Creates a plain object from a PrecedenceRule message. Also converts values to other types if specified.
- * @param message PrecedenceRule
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentModel.PrecedenceRule, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this PrecedenceRule to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for PrecedenceRule
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a BreakRule. */
- interface IBreakRule {
-
- /** BreakRule breakRequests */
- breakRequests?: (google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest[]|null);
-
- /** BreakRule frequencyConstraints */
- frequencyConstraints?: (google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint[]|null);
- }
-
- /** Represents a BreakRule. */
- class BreakRule implements IBreakRule {
-
- /**
- * Constructs a new BreakRule.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentModel.IBreakRule);
-
- /** BreakRule breakRequests. */
- public breakRequests: google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest[];
-
- /** BreakRule frequencyConstraints. */
- public frequencyConstraints: google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint[];
-
- /**
- * Creates a new BreakRule instance using the specified properties.
- * @param [properties] Properties to set
- * @returns BreakRule instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentModel.IBreakRule): google.cloud.optimization.v1.ShipmentModel.BreakRule;
-
- /**
- * Encodes the specified BreakRule message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.verify|verify} messages.
- * @param message BreakRule message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentModel.IBreakRule, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified BreakRule message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.verify|verify} messages.
- * @param message BreakRule message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentModel.IBreakRule, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a BreakRule message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns BreakRule
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentModel.BreakRule;
-
- /**
- * Decodes a BreakRule message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns BreakRule
- * @throws {Error} If the payload 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.optimization.v1.ShipmentModel.BreakRule;
-
- /**
- * Verifies a BreakRule message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a BreakRule message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns BreakRule
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentModel.BreakRule;
-
- /**
- * Creates a plain object from a BreakRule message. Also converts values to other types if specified.
- * @param message BreakRule
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentModel.BreakRule, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this BreakRule to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for BreakRule
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace BreakRule {
-
- /** Properties of a BreakRequest. */
- interface IBreakRequest {
-
- /** BreakRequest earliestStartTime */
- earliestStartTime?: (google.protobuf.ITimestamp|null);
-
- /** BreakRequest latestStartTime */
- latestStartTime?: (google.protobuf.ITimestamp|null);
-
- /** BreakRequest minDuration */
- minDuration?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a BreakRequest. */
- class BreakRequest implements IBreakRequest {
-
- /**
- * Constructs a new BreakRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest);
-
- /** BreakRequest earliestStartTime. */
- public earliestStartTime?: (google.protobuf.ITimestamp|null);
-
- /** BreakRequest latestStartTime. */
- public latestStartTime?: (google.protobuf.ITimestamp|null);
-
- /** BreakRequest minDuration. */
- public minDuration?: (google.protobuf.IDuration|null);
-
- /**
- * Creates a new BreakRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns BreakRequest instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest): google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest;
-
- /**
- * Encodes the specified BreakRequest message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.verify|verify} messages.
- * @param message BreakRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified BreakRequest message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.verify|verify} messages.
- * @param message BreakRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a BreakRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns BreakRequest
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentModel.BreakRule.BreakRequest;
-
- /**
- * Decodes a BreakRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns BreakRequest
- * @throws {Error} If the payload 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.optimization.v1.ShipmentModel.BreakRule.BreakRequest;
-
- /**
- * Verifies a BreakRequest message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a BreakRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns BreakRequest
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest;
-
- /**
- * Creates a plain object from a BreakRequest message. Also converts values to other types if specified.
- * @param message BreakRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this BreakRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for BreakRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a FrequencyConstraint. */
- interface IFrequencyConstraint {
-
- /** FrequencyConstraint minBreakDuration */
- minBreakDuration?: (google.protobuf.IDuration|null);
-
- /** FrequencyConstraint maxInterBreakDuration */
- maxInterBreakDuration?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a FrequencyConstraint. */
- class FrequencyConstraint implements IFrequencyConstraint {
-
- /**
- * Constructs a new FrequencyConstraint.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint);
-
- /** FrequencyConstraint minBreakDuration. */
- public minBreakDuration?: (google.protobuf.IDuration|null);
-
- /** FrequencyConstraint maxInterBreakDuration. */
- public maxInterBreakDuration?: (google.protobuf.IDuration|null);
-
- /**
- * Creates a new FrequencyConstraint instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FrequencyConstraint instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint): google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint;
-
- /**
- * Encodes the specified FrequencyConstraint message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.verify|verify} messages.
- * @param message FrequencyConstraint message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FrequencyConstraint message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.verify|verify} messages.
- * @param message FrequencyConstraint message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FrequencyConstraint message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FrequencyConstraint
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint;
-
- /**
- * Decodes a FrequencyConstraint message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FrequencyConstraint
- * @throws {Error} If the payload 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.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint;
-
- /**
- * Verifies a FrequencyConstraint message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FrequencyConstraint message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FrequencyConstraint
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint;
-
- /**
- * Creates a plain object from a FrequencyConstraint message. Also converts values to other types if specified.
- * @param message FrequencyConstraint
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FrequencyConstraint to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FrequencyConstraint
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
- }
-
- /** Properties of a Shipment. */
- interface IShipment {
-
- /** Shipment pickups */
- pickups?: (google.cloud.optimization.v1.Shipment.IVisitRequest[]|null);
-
- /** Shipment deliveries */
- deliveries?: (google.cloud.optimization.v1.Shipment.IVisitRequest[]|null);
-
- /** Shipment loadDemands */
- loadDemands?: ({ [k: string]: google.cloud.optimization.v1.Shipment.ILoad }|null);
-
- /** Shipment penaltyCost */
- penaltyCost?: (number|null);
-
- /** Shipment allowedVehicleIndices */
- allowedVehicleIndices?: (number[]|null);
-
- /** Shipment costsPerVehicle */
- costsPerVehicle?: (number[]|null);
-
- /** Shipment costsPerVehicleIndices */
- costsPerVehicleIndices?: (number[]|null);
-
- /** Shipment pickupToDeliveryRelativeDetourLimit */
- pickupToDeliveryRelativeDetourLimit?: (number|null);
-
- /** Shipment pickupToDeliveryAbsoluteDetourLimit */
- pickupToDeliveryAbsoluteDetourLimit?: (google.protobuf.IDuration|null);
-
- /** Shipment pickupToDeliveryTimeLimit */
- pickupToDeliveryTimeLimit?: (google.protobuf.IDuration|null);
-
- /** Shipment shipmentType */
- shipmentType?: (string|null);
-
- /** Shipment label */
- label?: (string|null);
-
- /** Shipment ignore */
- ignore?: (boolean|null);
-
- /** Shipment demands */
- demands?: (google.cloud.optimization.v1.ICapacityQuantity[]|null);
- }
-
- /** Represents a Shipment. */
- class Shipment implements IShipment {
-
- /**
- * Constructs a new Shipment.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IShipment);
-
- /** Shipment pickups. */
- public pickups: google.cloud.optimization.v1.Shipment.IVisitRequest[];
-
- /** Shipment deliveries. */
- public deliveries: google.cloud.optimization.v1.Shipment.IVisitRequest[];
-
- /** Shipment loadDemands. */
- public loadDemands: { [k: string]: google.cloud.optimization.v1.Shipment.ILoad };
-
- /** Shipment penaltyCost. */
- public penaltyCost?: (number|null);
-
- /** Shipment allowedVehicleIndices. */
- public allowedVehicleIndices: number[];
-
- /** Shipment costsPerVehicle. */
- public costsPerVehicle: number[];
-
- /** Shipment costsPerVehicleIndices. */
- public costsPerVehicleIndices: number[];
-
- /** Shipment pickupToDeliveryRelativeDetourLimit. */
- public pickupToDeliveryRelativeDetourLimit?: (number|null);
-
- /** Shipment pickupToDeliveryAbsoluteDetourLimit. */
- public pickupToDeliveryAbsoluteDetourLimit?: (google.protobuf.IDuration|null);
-
- /** Shipment pickupToDeliveryTimeLimit. */
- public pickupToDeliveryTimeLimit?: (google.protobuf.IDuration|null);
-
- /** Shipment shipmentType. */
- public shipmentType: string;
-
- /** Shipment label. */
- public label: string;
-
- /** Shipment ignore. */
- public ignore: boolean;
-
- /** Shipment demands. */
- public demands: google.cloud.optimization.v1.ICapacityQuantity[];
-
- /** Shipment _penaltyCost. */
- public _penaltyCost?: "penaltyCost";
-
- /** Shipment _pickupToDeliveryRelativeDetourLimit. */
- public _pickupToDeliveryRelativeDetourLimit?: "pickupToDeliveryRelativeDetourLimit";
-
- /**
- * Creates a new Shipment instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Shipment instance
- */
- public static create(properties?: google.cloud.optimization.v1.IShipment): google.cloud.optimization.v1.Shipment;
-
- /**
- * Encodes the specified Shipment message. Does not implicitly {@link google.cloud.optimization.v1.Shipment.verify|verify} messages.
- * @param message Shipment message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IShipment, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Shipment message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Shipment.verify|verify} messages.
- * @param message Shipment message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IShipment, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Shipment message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Shipment
- * @throws {Error} If the payload is not 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.optimization.v1.Shipment;
-
- /**
- * Decodes a Shipment message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Shipment
- * @throws {Error} If the payload 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.optimization.v1.Shipment;
-
- /**
- * Verifies a Shipment message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Shipment message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Shipment
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.Shipment;
-
- /**
- * Creates a plain object from a Shipment message. Also converts values to other types if specified.
- * @param message Shipment
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.Shipment, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Shipment to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Shipment
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace Shipment {
-
- /** Properties of a VisitRequest. */
- interface IVisitRequest {
-
- /** VisitRequest arrivalLocation */
- arrivalLocation?: (google.type.ILatLng|null);
-
- /** VisitRequest arrivalWaypoint */
- arrivalWaypoint?: (google.cloud.optimization.v1.IWaypoint|null);
-
- /** VisitRequest departureLocation */
- departureLocation?: (google.type.ILatLng|null);
-
- /** VisitRequest departureWaypoint */
- departureWaypoint?: (google.cloud.optimization.v1.IWaypoint|null);
-
- /** VisitRequest tags */
- tags?: (string[]|null);
-
- /** VisitRequest timeWindows */
- timeWindows?: (google.cloud.optimization.v1.ITimeWindow[]|null);
-
- /** VisitRequest duration */
- duration?: (google.protobuf.IDuration|null);
-
- /** VisitRequest cost */
- cost?: (number|null);
-
- /** VisitRequest loadDemands */
- loadDemands?: ({ [k: string]: google.cloud.optimization.v1.Shipment.ILoad }|null);
-
- /** VisitRequest visitTypes */
- visitTypes?: (string[]|null);
-
- /** VisitRequest label */
- label?: (string|null);
-
- /** VisitRequest demands */
- demands?: (google.cloud.optimization.v1.ICapacityQuantity[]|null);
- }
-
- /** Represents a VisitRequest. */
- class VisitRequest implements IVisitRequest {
-
- /**
- * Constructs a new VisitRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.Shipment.IVisitRequest);
-
- /** VisitRequest arrivalLocation. */
- public arrivalLocation?: (google.type.ILatLng|null);
-
- /** VisitRequest arrivalWaypoint. */
- public arrivalWaypoint?: (google.cloud.optimization.v1.IWaypoint|null);
-
- /** VisitRequest departureLocation. */
- public departureLocation?: (google.type.ILatLng|null);
-
- /** VisitRequest departureWaypoint. */
- public departureWaypoint?: (google.cloud.optimization.v1.IWaypoint|null);
-
- /** VisitRequest tags. */
- public tags: string[];
-
- /** VisitRequest timeWindows. */
- public timeWindows: google.cloud.optimization.v1.ITimeWindow[];
-
- /** VisitRequest duration. */
- public duration?: (google.protobuf.IDuration|null);
-
- /** VisitRequest cost. */
- public cost: number;
-
- /** VisitRequest loadDemands. */
- public loadDemands: { [k: string]: google.cloud.optimization.v1.Shipment.ILoad };
-
- /** VisitRequest visitTypes. */
- public visitTypes: string[];
-
- /** VisitRequest label. */
- public label: string;
-
- /** VisitRequest demands. */
- public demands: google.cloud.optimization.v1.ICapacityQuantity[];
-
- /**
- * Creates a new VisitRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns VisitRequest instance
- */
- public static create(properties?: google.cloud.optimization.v1.Shipment.IVisitRequest): google.cloud.optimization.v1.Shipment.VisitRequest;
-
- /**
- * Encodes the specified VisitRequest message. Does not implicitly {@link google.cloud.optimization.v1.Shipment.VisitRequest.verify|verify} messages.
- * @param message VisitRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.Shipment.IVisitRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified VisitRequest message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Shipment.VisitRequest.verify|verify} messages.
- * @param message VisitRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.Shipment.IVisitRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a VisitRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns VisitRequest
- * @throws {Error} If the payload is not 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.optimization.v1.Shipment.VisitRequest;
-
- /**
- * Decodes a VisitRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns VisitRequest
- * @throws {Error} If the payload 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.optimization.v1.Shipment.VisitRequest;
-
- /**
- * Verifies a VisitRequest message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a VisitRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns VisitRequest
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.Shipment.VisitRequest;
-
- /**
- * Creates a plain object from a VisitRequest message. Also converts values to other types if specified.
- * @param message VisitRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.Shipment.VisitRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this VisitRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for VisitRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a Load. */
- interface ILoad {
-
- /** Load amount */
- amount?: (number|Long|string|null);
- }
-
- /** Represents a Load. */
- class Load implements ILoad {
-
- /**
- * Constructs a new Load.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.Shipment.ILoad);
-
- /** Load amount. */
- public amount: (number|Long|string);
-
- /**
- * Creates a new Load instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Load instance
- */
- public static create(properties?: google.cloud.optimization.v1.Shipment.ILoad): google.cloud.optimization.v1.Shipment.Load;
-
- /**
- * Encodes the specified Load message. Does not implicitly {@link google.cloud.optimization.v1.Shipment.Load.verify|verify} messages.
- * @param message Load message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.Shipment.ILoad, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Load message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Shipment.Load.verify|verify} messages.
- * @param message Load message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.Shipment.ILoad, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Load message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Load
- * @throws {Error} If the payload is not 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.optimization.v1.Shipment.Load;
-
- /**
- * Decodes a Load message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Load
- * @throws {Error} If the payload 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.optimization.v1.Shipment.Load;
-
- /**
- * Verifies a Load message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Load message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Load
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.Shipment.Load;
-
- /**
- * Creates a plain object from a Load message. Also converts values to other types if specified.
- * @param message Load
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.Shipment.Load, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Load to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Load
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a ShipmentTypeIncompatibility. */
- interface IShipmentTypeIncompatibility {
-
- /** ShipmentTypeIncompatibility types */
- types?: (string[]|null);
-
- /** ShipmentTypeIncompatibility incompatibilityMode */
- incompatibilityMode?: (google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode|keyof typeof google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode|null);
- }
-
- /** Represents a ShipmentTypeIncompatibility. */
- class ShipmentTypeIncompatibility implements IShipmentTypeIncompatibility {
-
- /**
- * Constructs a new ShipmentTypeIncompatibility.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IShipmentTypeIncompatibility);
-
- /** ShipmentTypeIncompatibility types. */
- public types: string[];
-
- /** ShipmentTypeIncompatibility incompatibilityMode. */
- public incompatibilityMode: (google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode|keyof typeof google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode);
-
- /**
- * Creates a new ShipmentTypeIncompatibility instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ShipmentTypeIncompatibility instance
- */
- public static create(properties?: google.cloud.optimization.v1.IShipmentTypeIncompatibility): google.cloud.optimization.v1.ShipmentTypeIncompatibility;
-
- /**
- * Encodes the specified ShipmentTypeIncompatibility message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentTypeIncompatibility.verify|verify} messages.
- * @param message ShipmentTypeIncompatibility message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IShipmentTypeIncompatibility, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ShipmentTypeIncompatibility message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentTypeIncompatibility.verify|verify} messages.
- * @param message ShipmentTypeIncompatibility message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IShipmentTypeIncompatibility, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a ShipmentTypeIncompatibility message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ShipmentTypeIncompatibility
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentTypeIncompatibility;
-
- /**
- * Decodes a ShipmentTypeIncompatibility message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ShipmentTypeIncompatibility
- * @throws {Error} If the payload 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.optimization.v1.ShipmentTypeIncompatibility;
-
- /**
- * Verifies a ShipmentTypeIncompatibility message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a ShipmentTypeIncompatibility message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ShipmentTypeIncompatibility
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentTypeIncompatibility;
-
- /**
- * Creates a plain object from a ShipmentTypeIncompatibility message. Also converts values to other types if specified.
- * @param message ShipmentTypeIncompatibility
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentTypeIncompatibility, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ShipmentTypeIncompatibility to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ShipmentTypeIncompatibility
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace ShipmentTypeIncompatibility {
-
- /** IncompatibilityMode enum. */
- enum IncompatibilityMode {
- INCOMPATIBILITY_MODE_UNSPECIFIED = 0,
- NOT_PERFORMED_BY_SAME_VEHICLE = 1,
- NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2
- }
- }
-
- /** Properties of a ShipmentTypeRequirement. */
- interface IShipmentTypeRequirement {
-
- /** ShipmentTypeRequirement requiredShipmentTypeAlternatives */
- requiredShipmentTypeAlternatives?: (string[]|null);
-
- /** ShipmentTypeRequirement dependentShipmentTypes */
- dependentShipmentTypes?: (string[]|null);
-
- /** ShipmentTypeRequirement requirementMode */
- requirementMode?: (google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode|keyof typeof google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode|null);
- }
-
- /** Represents a ShipmentTypeRequirement. */
- class ShipmentTypeRequirement implements IShipmentTypeRequirement {
-
- /**
- * Constructs a new ShipmentTypeRequirement.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IShipmentTypeRequirement);
-
- /** ShipmentTypeRequirement requiredShipmentTypeAlternatives. */
- public requiredShipmentTypeAlternatives: string[];
-
- /** ShipmentTypeRequirement dependentShipmentTypes. */
- public dependentShipmentTypes: string[];
-
- /** ShipmentTypeRequirement requirementMode. */
- public requirementMode: (google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode|keyof typeof google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode);
-
- /**
- * Creates a new ShipmentTypeRequirement instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ShipmentTypeRequirement instance
- */
- public static create(properties?: google.cloud.optimization.v1.IShipmentTypeRequirement): google.cloud.optimization.v1.ShipmentTypeRequirement;
-
- /**
- * Encodes the specified ShipmentTypeRequirement message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentTypeRequirement.verify|verify} messages.
- * @param message ShipmentTypeRequirement message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IShipmentTypeRequirement, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ShipmentTypeRequirement message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentTypeRequirement.verify|verify} messages.
- * @param message ShipmentTypeRequirement message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IShipmentTypeRequirement, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a ShipmentTypeRequirement message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ShipmentTypeRequirement
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentTypeRequirement;
-
- /**
- * Decodes a ShipmentTypeRequirement message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ShipmentTypeRequirement
- * @throws {Error} If the payload 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.optimization.v1.ShipmentTypeRequirement;
-
- /**
- * Verifies a ShipmentTypeRequirement message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a ShipmentTypeRequirement message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ShipmentTypeRequirement
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentTypeRequirement;
-
- /**
- * Creates a plain object from a ShipmentTypeRequirement message. Also converts values to other types if specified.
- * @param message ShipmentTypeRequirement
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentTypeRequirement, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ShipmentTypeRequirement to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ShipmentTypeRequirement
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace ShipmentTypeRequirement {
-
- /** RequirementMode enum. */
- enum RequirementMode {
- REQUIREMENT_MODE_UNSPECIFIED = 0,
- PERFORMED_BY_SAME_VEHICLE = 1,
- IN_SAME_VEHICLE_AT_PICKUP_TIME = 2,
- IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3
- }
- }
-
- /** Properties of a RouteModifiers. */
- interface IRouteModifiers {
-
- /** RouteModifiers avoidTolls */
- avoidTolls?: (boolean|null);
-
- /** RouteModifiers avoidHighways */
- avoidHighways?: (boolean|null);
-
- /** RouteModifiers avoidFerries */
- avoidFerries?: (boolean|null);
-
- /** RouteModifiers avoidIndoor */
- avoidIndoor?: (boolean|null);
- }
-
- /** Represents a RouteModifiers. */
- class RouteModifiers implements IRouteModifiers {
-
- /**
- * Constructs a new RouteModifiers.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IRouteModifiers);
-
- /** RouteModifiers avoidTolls. */
- public avoidTolls: boolean;
-
- /** RouteModifiers avoidHighways. */
- public avoidHighways: boolean;
-
- /** RouteModifiers avoidFerries. */
- public avoidFerries: boolean;
-
- /** RouteModifiers avoidIndoor. */
- public avoidIndoor: boolean;
-
- /**
- * Creates a new RouteModifiers instance using the specified properties.
- * @param [properties] Properties to set
- * @returns RouteModifiers instance
- */
- public static create(properties?: google.cloud.optimization.v1.IRouteModifiers): google.cloud.optimization.v1.RouteModifiers;
-
- /**
- * Encodes the specified RouteModifiers message. Does not implicitly {@link google.cloud.optimization.v1.RouteModifiers.verify|verify} messages.
- * @param message RouteModifiers message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IRouteModifiers, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified RouteModifiers message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.RouteModifiers.verify|verify} messages.
- * @param message RouteModifiers message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IRouteModifiers, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a RouteModifiers message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns RouteModifiers
- * @throws {Error} If the payload is not 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.optimization.v1.RouteModifiers;
-
- /**
- * Decodes a RouteModifiers message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns RouteModifiers
- * @throws {Error} If the payload 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.optimization.v1.RouteModifiers;
-
- /**
- * Verifies a RouteModifiers message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a RouteModifiers message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns RouteModifiers
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.RouteModifiers;
-
- /**
- * Creates a plain object from a RouteModifiers message. Also converts values to other types if specified.
- * @param message RouteModifiers
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.RouteModifiers, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this RouteModifiers to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for RouteModifiers
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a Vehicle. */
- interface IVehicle {
-
- /** Vehicle travelMode */
- travelMode?: (google.cloud.optimization.v1.Vehicle.TravelMode|keyof typeof google.cloud.optimization.v1.Vehicle.TravelMode|null);
-
- /** Vehicle routeModifiers */
- routeModifiers?: (google.cloud.optimization.v1.IRouteModifiers|null);
-
- /** Vehicle startLocation */
- startLocation?: (google.type.ILatLng|null);
-
- /** Vehicle startWaypoint */
- startWaypoint?: (google.cloud.optimization.v1.IWaypoint|null);
-
- /** Vehicle endLocation */
- endLocation?: (google.type.ILatLng|null);
-
- /** Vehicle endWaypoint */
- endWaypoint?: (google.cloud.optimization.v1.IWaypoint|null);
-
- /** Vehicle startTags */
- startTags?: (string[]|null);
-
- /** Vehicle endTags */
- endTags?: (string[]|null);
-
- /** Vehicle startTimeWindows */
- startTimeWindows?: (google.cloud.optimization.v1.ITimeWindow[]|null);
-
- /** Vehicle endTimeWindows */
- endTimeWindows?: (google.cloud.optimization.v1.ITimeWindow[]|null);
-
- /** Vehicle travelDurationMultiple */
- travelDurationMultiple?: (number|null);
-
- /** Vehicle unloadingPolicy */
- unloadingPolicy?: (google.cloud.optimization.v1.Vehicle.UnloadingPolicy|keyof typeof google.cloud.optimization.v1.Vehicle.UnloadingPolicy|null);
-
- /** Vehicle loadLimits */
- loadLimits?: ({ [k: string]: google.cloud.optimization.v1.Vehicle.ILoadLimit }|null);
-
- /** Vehicle costPerHour */
- costPerHour?: (number|null);
-
- /** Vehicle costPerTraveledHour */
- costPerTraveledHour?: (number|null);
-
- /** Vehicle costPerKilometer */
- costPerKilometer?: (number|null);
-
- /** Vehicle fixedCost */
- fixedCost?: (number|null);
-
- /** Vehicle usedIfRouteIsEmpty */
- usedIfRouteIsEmpty?: (boolean|null);
-
- /** Vehicle routeDurationLimit */
- routeDurationLimit?: (google.cloud.optimization.v1.Vehicle.IDurationLimit|null);
-
- /** Vehicle travelDurationLimit */
- travelDurationLimit?: (google.cloud.optimization.v1.Vehicle.IDurationLimit|null);
-
- /** Vehicle routeDistanceLimit */
- routeDistanceLimit?: (google.cloud.optimization.v1.IDistanceLimit|null);
-
- /** Vehicle extraVisitDurationForVisitType */
- extraVisitDurationForVisitType?: ({ [k: string]: google.protobuf.IDuration }|null);
-
- /** Vehicle breakRule */
- breakRule?: (google.cloud.optimization.v1.IBreakRule|null);
-
- /** Vehicle label */
- label?: (string|null);
-
- /** Vehicle ignore */
- ignore?: (boolean|null);
-
- /** Vehicle breakRuleIndices */
- breakRuleIndices?: (number[]|null);
-
- /** Vehicle capacities */
- capacities?: (google.cloud.optimization.v1.ICapacityQuantity[]|null);
-
- /** Vehicle startLoadIntervals */
- startLoadIntervals?: (google.cloud.optimization.v1.ICapacityQuantityInterval[]|null);
-
- /** Vehicle endLoadIntervals */
- endLoadIntervals?: (google.cloud.optimization.v1.ICapacityQuantityInterval[]|null);
- }
-
- /** Represents a Vehicle. */
- class Vehicle implements IVehicle {
-
- /**
- * Constructs a new Vehicle.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IVehicle);
-
- /** Vehicle travelMode. */
- public travelMode: (google.cloud.optimization.v1.Vehicle.TravelMode|keyof typeof google.cloud.optimization.v1.Vehicle.TravelMode);
-
- /** Vehicle routeModifiers. */
- public routeModifiers?: (google.cloud.optimization.v1.IRouteModifiers|null);
-
- /** Vehicle startLocation. */
- public startLocation?: (google.type.ILatLng|null);
-
- /** Vehicle startWaypoint. */
- public startWaypoint?: (google.cloud.optimization.v1.IWaypoint|null);
-
- /** Vehicle endLocation. */
- public endLocation?: (google.type.ILatLng|null);
-
- /** Vehicle endWaypoint. */
- public endWaypoint?: (google.cloud.optimization.v1.IWaypoint|null);
-
- /** Vehicle startTags. */
- public startTags: string[];
-
- /** Vehicle endTags. */
- public endTags: string[];
-
- /** Vehicle startTimeWindows. */
- public startTimeWindows: google.cloud.optimization.v1.ITimeWindow[];
-
- /** Vehicle endTimeWindows. */
- public endTimeWindows: google.cloud.optimization.v1.ITimeWindow[];
-
- /** Vehicle travelDurationMultiple. */
- public travelDurationMultiple?: (number|null);
-
- /** Vehicle unloadingPolicy. */
- public unloadingPolicy: (google.cloud.optimization.v1.Vehicle.UnloadingPolicy|keyof typeof google.cloud.optimization.v1.Vehicle.UnloadingPolicy);
-
- /** Vehicle loadLimits. */
- public loadLimits: { [k: string]: google.cloud.optimization.v1.Vehicle.ILoadLimit };
-
- /** Vehicle costPerHour. */
- public costPerHour: number;
-
- /** Vehicle costPerTraveledHour. */
- public costPerTraveledHour: number;
-
- /** Vehicle costPerKilometer. */
- public costPerKilometer: number;
-
- /** Vehicle fixedCost. */
- public fixedCost: number;
-
- /** Vehicle usedIfRouteIsEmpty. */
- public usedIfRouteIsEmpty: boolean;
-
- /** Vehicle routeDurationLimit. */
- public routeDurationLimit?: (google.cloud.optimization.v1.Vehicle.IDurationLimit|null);
-
- /** Vehicle travelDurationLimit. */
- public travelDurationLimit?: (google.cloud.optimization.v1.Vehicle.IDurationLimit|null);
-
- /** Vehicle routeDistanceLimit. */
- public routeDistanceLimit?: (google.cloud.optimization.v1.IDistanceLimit|null);
-
- /** Vehicle extraVisitDurationForVisitType. */
- public extraVisitDurationForVisitType: { [k: string]: google.protobuf.IDuration };
-
- /** Vehicle breakRule. */
- public breakRule?: (google.cloud.optimization.v1.IBreakRule|null);
-
- /** Vehicle label. */
- public label: string;
-
- /** Vehicle ignore. */
- public ignore: boolean;
-
- /** Vehicle breakRuleIndices. */
- public breakRuleIndices: number[];
-
- /** Vehicle capacities. */
- public capacities: google.cloud.optimization.v1.ICapacityQuantity[];
-
- /** Vehicle startLoadIntervals. */
- public startLoadIntervals: google.cloud.optimization.v1.ICapacityQuantityInterval[];
-
- /** Vehicle endLoadIntervals. */
- public endLoadIntervals: google.cloud.optimization.v1.ICapacityQuantityInterval[];
-
- /** Vehicle _travelDurationMultiple. */
- public _travelDurationMultiple?: "travelDurationMultiple";
-
- /**
- * Creates a new Vehicle instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Vehicle instance
- */
- public static create(properties?: google.cloud.optimization.v1.IVehicle): google.cloud.optimization.v1.Vehicle;
-
- /**
- * Encodes the specified Vehicle message. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.verify|verify} messages.
- * @param message Vehicle message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IVehicle, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Vehicle message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.verify|verify} messages.
- * @param message Vehicle message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IVehicle, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Vehicle message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Vehicle
- * @throws {Error} If the payload is not 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.optimization.v1.Vehicle;
-
- /**
- * Decodes a Vehicle message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Vehicle
- * @throws {Error} If the payload 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.optimization.v1.Vehicle;
-
- /**
- * Verifies a Vehicle message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Vehicle message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Vehicle
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.Vehicle;
-
- /**
- * Creates a plain object from a Vehicle message. Also converts values to other types if specified.
- * @param message Vehicle
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.Vehicle, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Vehicle to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Vehicle
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace Vehicle {
-
- /** TravelMode enum. */
- enum TravelMode {
- TRAVEL_MODE_UNSPECIFIED = 0,
- DRIVING = 1,
- WALKING = 2
- }
-
- /** UnloadingPolicy enum. */
- enum UnloadingPolicy {
- UNLOADING_POLICY_UNSPECIFIED = 0,
- LAST_IN_FIRST_OUT = 1,
- FIRST_IN_FIRST_OUT = 2
- }
-
- /** Properties of a LoadLimit. */
- interface ILoadLimit {
-
- /** LoadLimit maxLoad */
- maxLoad?: (number|Long|string|null);
-
- /** LoadLimit softMaxLoad */
- softMaxLoad?: (number|Long|string|null);
-
- /** LoadLimit costPerUnitAboveSoftMax */
- costPerUnitAboveSoftMax?: (number|null);
-
- /** LoadLimit startLoadInterval */
- startLoadInterval?: (google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval|null);
-
- /** LoadLimit endLoadInterval */
- endLoadInterval?: (google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval|null);
- }
-
- /** Represents a LoadLimit. */
- class LoadLimit implements ILoadLimit {
-
- /**
- * Constructs a new LoadLimit.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.Vehicle.ILoadLimit);
-
- /** LoadLimit maxLoad. */
- public maxLoad?: (number|Long|string|null);
-
- /** LoadLimit softMaxLoad. */
- public softMaxLoad: (number|Long|string);
-
- /** LoadLimit costPerUnitAboveSoftMax. */
- public costPerUnitAboveSoftMax: number;
-
- /** LoadLimit startLoadInterval. */
- public startLoadInterval?: (google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval|null);
-
- /** LoadLimit endLoadInterval. */
- public endLoadInterval?: (google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval|null);
-
- /** LoadLimit _maxLoad. */
- public _maxLoad?: "maxLoad";
-
- /**
- * Creates a new LoadLimit instance using the specified properties.
- * @param [properties] Properties to set
- * @returns LoadLimit instance
- */
- public static create(properties?: google.cloud.optimization.v1.Vehicle.ILoadLimit): google.cloud.optimization.v1.Vehicle.LoadLimit;
-
- /**
- * Encodes the specified LoadLimit message. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.LoadLimit.verify|verify} messages.
- * @param message LoadLimit message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.Vehicle.ILoadLimit, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified LoadLimit message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.LoadLimit.verify|verify} messages.
- * @param message LoadLimit message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.Vehicle.ILoadLimit, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a LoadLimit message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns LoadLimit
- * @throws {Error} If the payload is not 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.optimization.v1.Vehicle.LoadLimit;
-
- /**
- * Decodes a LoadLimit message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns LoadLimit
- * @throws {Error} If the payload 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.optimization.v1.Vehicle.LoadLimit;
-
- /**
- * Verifies a LoadLimit message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a LoadLimit message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns LoadLimit
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.Vehicle.LoadLimit;
-
- /**
- * Creates a plain object from a LoadLimit message. Also converts values to other types if specified.
- * @param message LoadLimit
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.Vehicle.LoadLimit, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this LoadLimit to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for LoadLimit
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace LoadLimit {
-
- /** Properties of an Interval. */
- interface IInterval {
-
- /** Interval min */
- min?: (number|Long|string|null);
-
- /** Interval max */
- max?: (number|Long|string|null);
- }
-
- /** Represents an Interval. */
- class Interval implements IInterval {
-
- /**
- * Constructs a new Interval.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval);
-
- /** Interval min. */
- public min: (number|Long|string);
-
- /** Interval max. */
- public max?: (number|Long|string|null);
-
- /** Interval _max. */
- public _max?: "max";
-
- /**
- * Creates a new Interval instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Interval instance
- */
- public static create(properties?: google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval): google.cloud.optimization.v1.Vehicle.LoadLimit.Interval;
-
- /**
- * Encodes the specified Interval message. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.verify|verify} messages.
- * @param message Interval message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.verify|verify} messages.
- * @param message Interval message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an Interval message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Interval
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.optimization.v1.Vehicle.LoadLimit.Interval;
-
- /**
- * Decodes an Interval message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Interval
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.optimization.v1.Vehicle.LoadLimit.Interval;
-
- /**
- * Verifies an Interval message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an Interval message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Interval
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.Vehicle.LoadLimit.Interval;
-
- /**
- * Creates a plain object from an Interval message. Also converts values to other types if specified.
- * @param message Interval
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.Vehicle.LoadLimit.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Interval to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Interval
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a DurationLimit. */
- interface IDurationLimit {
-
- /** DurationLimit maxDuration */
- maxDuration?: (google.protobuf.IDuration|null);
-
- /** DurationLimit softMaxDuration */
- softMaxDuration?: (google.protobuf.IDuration|null);
-
- /** DurationLimit costPerHourAfterSoftMax */
- costPerHourAfterSoftMax?: (number|null);
-
- /** DurationLimit quadraticSoftMaxDuration */
- quadraticSoftMaxDuration?: (google.protobuf.IDuration|null);
-
- /** DurationLimit costPerSquareHourAfterQuadraticSoftMax */
- costPerSquareHourAfterQuadraticSoftMax?: (number|null);
- }
-
- /** Represents a DurationLimit. */
- class DurationLimit implements IDurationLimit {
-
- /**
- * Constructs a new DurationLimit.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.Vehicle.IDurationLimit);
-
- /** DurationLimit maxDuration. */
- public maxDuration?: (google.protobuf.IDuration|null);
-
- /** DurationLimit softMaxDuration. */
- public softMaxDuration?: (google.protobuf.IDuration|null);
-
- /** DurationLimit costPerHourAfterSoftMax. */
- public costPerHourAfterSoftMax?: (number|null);
-
- /** DurationLimit quadraticSoftMaxDuration. */
- public quadraticSoftMaxDuration?: (google.protobuf.IDuration|null);
-
- /** DurationLimit costPerSquareHourAfterQuadraticSoftMax. */
- public costPerSquareHourAfterQuadraticSoftMax?: (number|null);
-
- /** DurationLimit _costPerHourAfterSoftMax. */
- public _costPerHourAfterSoftMax?: "costPerHourAfterSoftMax";
-
- /** DurationLimit _costPerSquareHourAfterQuadraticSoftMax. */
- public _costPerSquareHourAfterQuadraticSoftMax?: "costPerSquareHourAfterQuadraticSoftMax";
-
- /**
- * Creates a new DurationLimit instance using the specified properties.
- * @param [properties] Properties to set
- * @returns DurationLimit instance
- */
- public static create(properties?: google.cloud.optimization.v1.Vehicle.IDurationLimit): google.cloud.optimization.v1.Vehicle.DurationLimit;
-
- /**
- * Encodes the specified DurationLimit message. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.DurationLimit.verify|verify} messages.
- * @param message DurationLimit message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.Vehicle.IDurationLimit, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified DurationLimit message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.DurationLimit.verify|verify} messages.
- * @param message DurationLimit message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.Vehicle.IDurationLimit, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a DurationLimit message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns DurationLimit
- * @throws {Error} If the payload is not 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.optimization.v1.Vehicle.DurationLimit;
-
- /**
- * Decodes a DurationLimit message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns DurationLimit
- * @throws {Error} If the payload 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.optimization.v1.Vehicle.DurationLimit;
-
- /**
- * Verifies a DurationLimit message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a DurationLimit message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns DurationLimit
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.Vehicle.DurationLimit;
-
- /**
- * Creates a plain object from a DurationLimit message. Also converts values to other types if specified.
- * @param message DurationLimit
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.Vehicle.DurationLimit, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this DurationLimit to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for DurationLimit
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a TimeWindow. */
- interface ITimeWindow {
-
- /** TimeWindow startTime */
- startTime?: (google.protobuf.ITimestamp|null);
-
- /** TimeWindow endTime */
- endTime?: (google.protobuf.ITimestamp|null);
-
- /** TimeWindow softStartTime */
- softStartTime?: (google.protobuf.ITimestamp|null);
-
- /** TimeWindow softEndTime */
- softEndTime?: (google.protobuf.ITimestamp|null);
-
- /** TimeWindow costPerHourBeforeSoftStartTime */
- costPerHourBeforeSoftStartTime?: (number|null);
-
- /** TimeWindow costPerHourAfterSoftEndTime */
- costPerHourAfterSoftEndTime?: (number|null);
- }
-
- /** Represents a TimeWindow. */
- class TimeWindow implements ITimeWindow {
-
- /**
- * Constructs a new TimeWindow.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ITimeWindow);
-
- /** TimeWindow startTime. */
- public startTime?: (google.protobuf.ITimestamp|null);
-
- /** TimeWindow endTime. */
- public endTime?: (google.protobuf.ITimestamp|null);
-
- /** TimeWindow softStartTime. */
- public softStartTime?: (google.protobuf.ITimestamp|null);
-
- /** TimeWindow softEndTime. */
- public softEndTime?: (google.protobuf.ITimestamp|null);
-
- /** TimeWindow costPerHourBeforeSoftStartTime. */
- public costPerHourBeforeSoftStartTime?: (number|null);
-
- /** TimeWindow costPerHourAfterSoftEndTime. */
- public costPerHourAfterSoftEndTime?: (number|null);
-
- /** TimeWindow _costPerHourBeforeSoftStartTime. */
- public _costPerHourBeforeSoftStartTime?: "costPerHourBeforeSoftStartTime";
-
- /** TimeWindow _costPerHourAfterSoftEndTime. */
- public _costPerHourAfterSoftEndTime?: "costPerHourAfterSoftEndTime";
-
- /**
- * Creates a new TimeWindow instance using the specified properties.
- * @param [properties] Properties to set
- * @returns TimeWindow instance
- */
- public static create(properties?: google.cloud.optimization.v1.ITimeWindow): google.cloud.optimization.v1.TimeWindow;
-
- /**
- * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.optimization.v1.TimeWindow.verify|verify} messages.
- * @param message TimeWindow message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.TimeWindow.verify|verify} messages.
- * @param message TimeWindow message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ITimeWindow, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a TimeWindow message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns TimeWindow
- * @throws {Error} If the payload is not 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.optimization.v1.TimeWindow;
-
- /**
- * Decodes a TimeWindow message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns TimeWindow
- * @throws {Error} If the payload 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.optimization.v1.TimeWindow;
-
- /**
- * Verifies a TimeWindow message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns TimeWindow
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.TimeWindow;
-
- /**
- * Creates a plain object from a TimeWindow message. Also converts values to other types if specified.
- * @param message TimeWindow
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.TimeWindow, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this TimeWindow to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for TimeWindow
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a CapacityQuantity. */
- interface ICapacityQuantity {
-
- /** CapacityQuantity type */
- type?: (string|null);
-
- /** CapacityQuantity value */
- value?: (number|Long|string|null);
- }
-
- /** Represents a CapacityQuantity. */
- class CapacityQuantity implements ICapacityQuantity {
-
- /**
- * Constructs a new CapacityQuantity.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ICapacityQuantity);
-
- /** CapacityQuantity type. */
- public type: string;
-
- /** CapacityQuantity value. */
- public value: (number|Long|string);
-
- /**
- * Creates a new CapacityQuantity instance using the specified properties.
- * @param [properties] Properties to set
- * @returns CapacityQuantity instance
- */
- public static create(properties?: google.cloud.optimization.v1.ICapacityQuantity): google.cloud.optimization.v1.CapacityQuantity;
-
- /**
- * Encodes the specified CapacityQuantity message. Does not implicitly {@link google.cloud.optimization.v1.CapacityQuantity.verify|verify} messages.
- * @param message CapacityQuantity message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ICapacityQuantity, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified CapacityQuantity message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.CapacityQuantity.verify|verify} messages.
- * @param message CapacityQuantity message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ICapacityQuantity, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a CapacityQuantity message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns CapacityQuantity
- * @throws {Error} If the payload is not 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.optimization.v1.CapacityQuantity;
-
- /**
- * Decodes a CapacityQuantity message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns CapacityQuantity
- * @throws {Error} If the payload 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.optimization.v1.CapacityQuantity;
-
- /**
- * Verifies a CapacityQuantity message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a CapacityQuantity message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns CapacityQuantity
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.CapacityQuantity;
-
- /**
- * Creates a plain object from a CapacityQuantity message. Also converts values to other types if specified.
- * @param message CapacityQuantity
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.CapacityQuantity, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this CapacityQuantity to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for CapacityQuantity
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a CapacityQuantityInterval. */
- interface ICapacityQuantityInterval {
-
- /** CapacityQuantityInterval type */
- type?: (string|null);
-
- /** CapacityQuantityInterval minValue */
- minValue?: (number|Long|string|null);
-
- /** CapacityQuantityInterval maxValue */
- maxValue?: (number|Long|string|null);
- }
-
- /** Represents a CapacityQuantityInterval. */
- class CapacityQuantityInterval implements ICapacityQuantityInterval {
-
- /**
- * Constructs a new CapacityQuantityInterval.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ICapacityQuantityInterval);
-
- /** CapacityQuantityInterval type. */
- public type: string;
-
- /** CapacityQuantityInterval minValue. */
- public minValue?: (number|Long|string|null);
-
- /** CapacityQuantityInterval maxValue. */
- public maxValue?: (number|Long|string|null);
-
- /** CapacityQuantityInterval _minValue. */
- public _minValue?: "minValue";
-
- /** CapacityQuantityInterval _maxValue. */
- public _maxValue?: "maxValue";
-
- /**
- * Creates a new CapacityQuantityInterval instance using the specified properties.
- * @param [properties] Properties to set
- * @returns CapacityQuantityInterval instance
- */
- public static create(properties?: google.cloud.optimization.v1.ICapacityQuantityInterval): google.cloud.optimization.v1.CapacityQuantityInterval;
-
- /**
- * Encodes the specified CapacityQuantityInterval message. Does not implicitly {@link google.cloud.optimization.v1.CapacityQuantityInterval.verify|verify} messages.
- * @param message CapacityQuantityInterval message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ICapacityQuantityInterval, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified CapacityQuantityInterval message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.CapacityQuantityInterval.verify|verify} messages.
- * @param message CapacityQuantityInterval message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ICapacityQuantityInterval, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a CapacityQuantityInterval message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns CapacityQuantityInterval
- * @throws {Error} If the payload is not 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.optimization.v1.CapacityQuantityInterval;
-
- /**
- * Decodes a CapacityQuantityInterval message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns CapacityQuantityInterval
- * @throws {Error} If the payload 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.optimization.v1.CapacityQuantityInterval;
-
- /**
- * Verifies a CapacityQuantityInterval message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a CapacityQuantityInterval message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns CapacityQuantityInterval
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.CapacityQuantityInterval;
-
- /**
- * Creates a plain object from a CapacityQuantityInterval message. Also converts values to other types if specified.
- * @param message CapacityQuantityInterval
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.CapacityQuantityInterval, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this CapacityQuantityInterval to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for CapacityQuantityInterval
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a DistanceLimit. */
- interface IDistanceLimit {
-
- /** DistanceLimit maxMeters */
- maxMeters?: (number|Long|string|null);
-
- /** DistanceLimit softMaxMeters */
- softMaxMeters?: (number|Long|string|null);
-
- /** DistanceLimit costPerKilometerBelowSoftMax */
- costPerKilometerBelowSoftMax?: (number|null);
-
- /** DistanceLimit costPerKilometerAboveSoftMax */
- costPerKilometerAboveSoftMax?: (number|null);
- }
-
- /** Represents a DistanceLimit. */
- class DistanceLimit implements IDistanceLimit {
-
- /**
- * Constructs a new DistanceLimit.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IDistanceLimit);
-
- /** DistanceLimit maxMeters. */
- public maxMeters?: (number|Long|string|null);
-
- /** DistanceLimit softMaxMeters. */
- public softMaxMeters?: (number|Long|string|null);
-
- /** DistanceLimit costPerKilometerBelowSoftMax. */
- public costPerKilometerBelowSoftMax?: (number|null);
-
- /** DistanceLimit costPerKilometerAboveSoftMax. */
- public costPerKilometerAboveSoftMax?: (number|null);
-
- /** DistanceLimit _maxMeters. */
- public _maxMeters?: "maxMeters";
-
- /** DistanceLimit _softMaxMeters. */
- public _softMaxMeters?: "softMaxMeters";
-
- /** DistanceLimit _costPerKilometerBelowSoftMax. */
- public _costPerKilometerBelowSoftMax?: "costPerKilometerBelowSoftMax";
-
- /** DistanceLimit _costPerKilometerAboveSoftMax. */
- public _costPerKilometerAboveSoftMax?: "costPerKilometerAboveSoftMax";
-
- /**
- * Creates a new DistanceLimit instance using the specified properties.
- * @param [properties] Properties to set
- * @returns DistanceLimit instance
- */
- public static create(properties?: google.cloud.optimization.v1.IDistanceLimit): google.cloud.optimization.v1.DistanceLimit;
-
- /**
- * Encodes the specified DistanceLimit message. Does not implicitly {@link google.cloud.optimization.v1.DistanceLimit.verify|verify} messages.
- * @param message DistanceLimit message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IDistanceLimit, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified DistanceLimit message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.DistanceLimit.verify|verify} messages.
- * @param message DistanceLimit message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IDistanceLimit, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a DistanceLimit message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns DistanceLimit
- * @throws {Error} If the payload is not 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.optimization.v1.DistanceLimit;
-
- /**
- * Decodes a DistanceLimit message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns DistanceLimit
- * @throws {Error} If the payload 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.optimization.v1.DistanceLimit;
-
- /**
- * Verifies a DistanceLimit message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a DistanceLimit message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns DistanceLimit
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.DistanceLimit;
-
- /**
- * Creates a plain object from a DistanceLimit message. Also converts values to other types if specified.
- * @param message DistanceLimit
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.DistanceLimit, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this DistanceLimit to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for DistanceLimit
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a TransitionAttributes. */
- interface ITransitionAttributes {
-
- /** TransitionAttributes srcTag */
- srcTag?: (string|null);
-
- /** TransitionAttributes excludedSrcTag */
- excludedSrcTag?: (string|null);
-
- /** TransitionAttributes dstTag */
- dstTag?: (string|null);
-
- /** TransitionAttributes excludedDstTag */
- excludedDstTag?: (string|null);
-
- /** TransitionAttributes cost */
- cost?: (number|null);
-
- /** TransitionAttributes costPerKilometer */
- costPerKilometer?: (number|null);
-
- /** TransitionAttributes distanceLimit */
- distanceLimit?: (google.cloud.optimization.v1.IDistanceLimit|null);
-
- /** TransitionAttributes delay */
- delay?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a TransitionAttributes. */
- class TransitionAttributes implements ITransitionAttributes {
-
- /**
- * Constructs a new TransitionAttributes.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ITransitionAttributes);
-
- /** TransitionAttributes srcTag. */
- public srcTag: string;
-
- /** TransitionAttributes excludedSrcTag. */
- public excludedSrcTag: string;
-
- /** TransitionAttributes dstTag. */
- public dstTag: string;
-
- /** TransitionAttributes excludedDstTag. */
- public excludedDstTag: string;
-
- /** TransitionAttributes cost. */
- public cost: number;
-
- /** TransitionAttributes costPerKilometer. */
- public costPerKilometer: number;
-
- /** TransitionAttributes distanceLimit. */
- public distanceLimit?: (google.cloud.optimization.v1.IDistanceLimit|null);
-
- /** TransitionAttributes delay. */
- public delay?: (google.protobuf.IDuration|null);
-
- /**
- * Creates a new TransitionAttributes instance using the specified properties.
- * @param [properties] Properties to set
- * @returns TransitionAttributes instance
- */
- public static create(properties?: google.cloud.optimization.v1.ITransitionAttributes): google.cloud.optimization.v1.TransitionAttributes;
-
- /**
- * Encodes the specified TransitionAttributes message. Does not implicitly {@link google.cloud.optimization.v1.TransitionAttributes.verify|verify} messages.
- * @param message TransitionAttributes message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ITransitionAttributes, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified TransitionAttributes message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.TransitionAttributes.verify|verify} messages.
- * @param message TransitionAttributes message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ITransitionAttributes, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a TransitionAttributes message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns TransitionAttributes
- * @throws {Error} If the payload is not 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.optimization.v1.TransitionAttributes;
-
- /**
- * Decodes a TransitionAttributes message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns TransitionAttributes
- * @throws {Error} If the payload 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.optimization.v1.TransitionAttributes;
-
- /**
- * Verifies a TransitionAttributes message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a TransitionAttributes message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns TransitionAttributes
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.TransitionAttributes;
-
- /**
- * Creates a plain object from a TransitionAttributes message. Also converts values to other types if specified.
- * @param message TransitionAttributes
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.TransitionAttributes, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this TransitionAttributes to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for TransitionAttributes
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a Waypoint. */
- interface IWaypoint {
-
- /** Waypoint location */
- location?: (google.cloud.optimization.v1.ILocation|null);
-
- /** Waypoint placeId */
- placeId?: (string|null);
-
- /** Waypoint sideOfRoad */
- sideOfRoad?: (boolean|null);
- }
-
- /** Represents a Waypoint. */
- class Waypoint implements IWaypoint {
-
- /**
- * Constructs a new Waypoint.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IWaypoint);
-
- /** Waypoint location. */
- public location?: (google.cloud.optimization.v1.ILocation|null);
-
- /** Waypoint placeId. */
- public placeId?: (string|null);
-
- /** Waypoint sideOfRoad. */
- public sideOfRoad: boolean;
-
- /** Waypoint locationType. */
- public locationType?: ("location"|"placeId");
-
- /**
- * Creates a new Waypoint instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Waypoint instance
- */
- public static create(properties?: google.cloud.optimization.v1.IWaypoint): google.cloud.optimization.v1.Waypoint;
-
- /**
- * Encodes the specified Waypoint message. Does not implicitly {@link google.cloud.optimization.v1.Waypoint.verify|verify} messages.
- * @param message Waypoint message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IWaypoint, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Waypoint message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Waypoint.verify|verify} messages.
- * @param message Waypoint message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IWaypoint, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Waypoint message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Waypoint
- * @throws {Error} If the payload is not 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.optimization.v1.Waypoint;
-
- /**
- * Decodes a Waypoint message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Waypoint
- * @throws {Error} If the payload 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.optimization.v1.Waypoint;
-
- /**
- * Verifies a Waypoint message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Waypoint message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Waypoint
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.Waypoint;
-
- /**
- * Creates a plain object from a Waypoint message. Also converts values to other types if specified.
- * @param message Waypoint
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.Waypoint, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Waypoint to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Waypoint
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a Location. */
- interface ILocation {
-
- /** Location latLng */
- latLng?: (google.type.ILatLng|null);
-
- /** Location heading */
- heading?: (number|null);
- }
-
- /** Represents a Location. */
- class Location implements ILocation {
-
- /**
- * Constructs a new Location.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ILocation);
-
- /** Location latLng. */
- public latLng?: (google.type.ILatLng|null);
-
- /** Location heading. */
- public heading?: (number|null);
-
- /** Location _heading. */
- public _heading?: "heading";
-
- /**
- * Creates a new Location instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Location instance
- */
- public static create(properties?: google.cloud.optimization.v1.ILocation): google.cloud.optimization.v1.Location;
-
- /**
- * Encodes the specified Location message. Does not implicitly {@link google.cloud.optimization.v1.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.cloud.optimization.v1.ILocation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Location message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.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.cloud.optimization.v1.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.cloud.optimization.v1.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.cloud.optimization.v1.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.cloud.optimization.v1.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.cloud.optimization.v1.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 BreakRule. */
- interface IBreakRule {
-
- /** BreakRule breakRequests */
- breakRequests?: (google.cloud.optimization.v1.BreakRule.IBreakRequest[]|null);
-
- /** BreakRule frequencyConstraints */
- frequencyConstraints?: (google.cloud.optimization.v1.BreakRule.IFrequencyConstraint[]|null);
- }
-
- /** Represents a BreakRule. */
- class BreakRule implements IBreakRule {
-
- /**
- * Constructs a new BreakRule.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IBreakRule);
-
- /** BreakRule breakRequests. */
- public breakRequests: google.cloud.optimization.v1.BreakRule.IBreakRequest[];
-
- /** BreakRule frequencyConstraints. */
- public frequencyConstraints: google.cloud.optimization.v1.BreakRule.IFrequencyConstraint[];
-
- /**
- * Creates a new BreakRule instance using the specified properties.
- * @param [properties] Properties to set
- * @returns BreakRule instance
- */
- public static create(properties?: google.cloud.optimization.v1.IBreakRule): google.cloud.optimization.v1.BreakRule;
-
- /**
- * Encodes the specified BreakRule message. Does not implicitly {@link google.cloud.optimization.v1.BreakRule.verify|verify} messages.
- * @param message BreakRule message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IBreakRule, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified BreakRule message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.BreakRule.verify|verify} messages.
- * @param message BreakRule message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IBreakRule, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a BreakRule message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns BreakRule
- * @throws {Error} If the payload is not 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.optimization.v1.BreakRule;
-
- /**
- * Decodes a BreakRule message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns BreakRule
- * @throws {Error} If the payload 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.optimization.v1.BreakRule;
-
- /**
- * Verifies a BreakRule message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a BreakRule message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns BreakRule
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.BreakRule;
-
- /**
- * Creates a plain object from a BreakRule message. Also converts values to other types if specified.
- * @param message BreakRule
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.BreakRule, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this BreakRule to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for BreakRule
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace BreakRule {
-
- /** Properties of a BreakRequest. */
- interface IBreakRequest {
-
- /** BreakRequest earliestStartTime */
- earliestStartTime?: (google.protobuf.ITimestamp|null);
-
- /** BreakRequest latestStartTime */
- latestStartTime?: (google.protobuf.ITimestamp|null);
-
- /** BreakRequest minDuration */
- minDuration?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a BreakRequest. */
- class BreakRequest implements IBreakRequest {
-
- /**
- * Constructs a new BreakRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.BreakRule.IBreakRequest);
-
- /** BreakRequest earliestStartTime. */
- public earliestStartTime?: (google.protobuf.ITimestamp|null);
-
- /** BreakRequest latestStartTime. */
- public latestStartTime?: (google.protobuf.ITimestamp|null);
-
- /** BreakRequest minDuration. */
- public minDuration?: (google.protobuf.IDuration|null);
-
- /**
- * Creates a new BreakRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns BreakRequest instance
- */
- public static create(properties?: google.cloud.optimization.v1.BreakRule.IBreakRequest): google.cloud.optimization.v1.BreakRule.BreakRequest;
-
- /**
- * Encodes the specified BreakRequest message. Does not implicitly {@link google.cloud.optimization.v1.BreakRule.BreakRequest.verify|verify} messages.
- * @param message BreakRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.BreakRule.IBreakRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified BreakRequest message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.BreakRule.BreakRequest.verify|verify} messages.
- * @param message BreakRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.BreakRule.IBreakRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a BreakRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns BreakRequest
- * @throws {Error} If the payload is not 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.optimization.v1.BreakRule.BreakRequest;
-
- /**
- * Decodes a BreakRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns BreakRequest
- * @throws {Error} If the payload 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.optimization.v1.BreakRule.BreakRequest;
-
- /**
- * Verifies a BreakRequest message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a BreakRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns BreakRequest
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.BreakRule.BreakRequest;
-
- /**
- * Creates a plain object from a BreakRequest message. Also converts values to other types if specified.
- * @param message BreakRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.BreakRule.BreakRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this BreakRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for BreakRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a FrequencyConstraint. */
- interface IFrequencyConstraint {
-
- /** FrequencyConstraint minBreakDuration */
- minBreakDuration?: (google.protobuf.IDuration|null);
-
- /** FrequencyConstraint maxInterBreakDuration */
- maxInterBreakDuration?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a FrequencyConstraint. */
- class FrequencyConstraint implements IFrequencyConstraint {
-
- /**
- * Constructs a new FrequencyConstraint.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.BreakRule.IFrequencyConstraint);
-
- /** FrequencyConstraint minBreakDuration. */
- public minBreakDuration?: (google.protobuf.IDuration|null);
-
- /** FrequencyConstraint maxInterBreakDuration. */
- public maxInterBreakDuration?: (google.protobuf.IDuration|null);
-
- /**
- * Creates a new FrequencyConstraint instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FrequencyConstraint instance
- */
- public static create(properties?: google.cloud.optimization.v1.BreakRule.IFrequencyConstraint): google.cloud.optimization.v1.BreakRule.FrequencyConstraint;
-
- /**
- * Encodes the specified FrequencyConstraint message. Does not implicitly {@link google.cloud.optimization.v1.BreakRule.FrequencyConstraint.verify|verify} messages.
- * @param message FrequencyConstraint message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.BreakRule.IFrequencyConstraint, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FrequencyConstraint message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.BreakRule.FrequencyConstraint.verify|verify} messages.
- * @param message FrequencyConstraint message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.BreakRule.IFrequencyConstraint, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FrequencyConstraint message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FrequencyConstraint
- * @throws {Error} If the payload is not 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.optimization.v1.BreakRule.FrequencyConstraint;
-
- /**
- * Decodes a FrequencyConstraint message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FrequencyConstraint
- * @throws {Error} If the payload 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.optimization.v1.BreakRule.FrequencyConstraint;
-
- /**
- * Verifies a FrequencyConstraint message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FrequencyConstraint message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FrequencyConstraint
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.BreakRule.FrequencyConstraint;
-
- /**
- * Creates a plain object from a FrequencyConstraint message. Also converts values to other types if specified.
- * @param message FrequencyConstraint
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.BreakRule.FrequencyConstraint, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FrequencyConstraint to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FrequencyConstraint
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a ShipmentRoute. */
- interface IShipmentRoute {
-
- /** ShipmentRoute vehicleIndex */
- vehicleIndex?: (number|null);
-
- /** ShipmentRoute vehicleLabel */
- vehicleLabel?: (string|null);
-
- /** ShipmentRoute vehicleStartTime */
- vehicleStartTime?: (google.protobuf.ITimestamp|null);
-
- /** ShipmentRoute vehicleEndTime */
- vehicleEndTime?: (google.protobuf.ITimestamp|null);
-
- /** ShipmentRoute visits */
- visits?: (google.cloud.optimization.v1.ShipmentRoute.IVisit[]|null);
-
- /** ShipmentRoute transitions */
- transitions?: (google.cloud.optimization.v1.ShipmentRoute.ITransition[]|null);
-
- /** ShipmentRoute hasTrafficInfeasibilities */
- hasTrafficInfeasibilities?: (boolean|null);
-
- /** ShipmentRoute routePolyline */
- routePolyline?: (google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline|null);
-
- /** ShipmentRoute breaks */
- breaks?: (google.cloud.optimization.v1.ShipmentRoute.IBreak[]|null);
-
- /** ShipmentRoute metrics */
- metrics?: (google.cloud.optimization.v1.IAggregatedMetrics|null);
-
- /** ShipmentRoute routeCosts */
- routeCosts?: ({ [k: string]: number }|null);
-
- /** ShipmentRoute routeTotalCost */
- routeTotalCost?: (number|null);
-
- /** ShipmentRoute endLoads */
- endLoads?: (google.cloud.optimization.v1.ICapacityQuantity[]|null);
-
- /** ShipmentRoute travelSteps */
- travelSteps?: (google.cloud.optimization.v1.ShipmentRoute.ITravelStep[]|null);
-
- /** ShipmentRoute vehicleDetour */
- vehicleDetour?: (google.protobuf.IDuration|null);
-
- /** ShipmentRoute delayBeforeVehicleEnd */
- delayBeforeVehicleEnd?: (google.cloud.optimization.v1.ShipmentRoute.IDelay|null);
- }
-
- /** Represents a ShipmentRoute. */
- class ShipmentRoute implements IShipmentRoute {
-
- /**
- * Constructs a new ShipmentRoute.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IShipmentRoute);
-
- /** ShipmentRoute vehicleIndex. */
- public vehicleIndex: number;
-
- /** ShipmentRoute vehicleLabel. */
- public vehicleLabel: string;
-
- /** ShipmentRoute vehicleStartTime. */
- public vehicleStartTime?: (google.protobuf.ITimestamp|null);
-
- /** ShipmentRoute vehicleEndTime. */
- public vehicleEndTime?: (google.protobuf.ITimestamp|null);
-
- /** ShipmentRoute visits. */
- public visits: google.cloud.optimization.v1.ShipmentRoute.IVisit[];
-
- /** ShipmentRoute transitions. */
- public transitions: google.cloud.optimization.v1.ShipmentRoute.ITransition[];
-
- /** ShipmentRoute hasTrafficInfeasibilities. */
- public hasTrafficInfeasibilities: boolean;
-
- /** ShipmentRoute routePolyline. */
- public routePolyline?: (google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline|null);
-
- /** ShipmentRoute breaks. */
- public breaks: google.cloud.optimization.v1.ShipmentRoute.IBreak[];
-
- /** ShipmentRoute metrics. */
- public metrics?: (google.cloud.optimization.v1.IAggregatedMetrics|null);
-
- /** ShipmentRoute routeCosts. */
- public routeCosts: { [k: string]: number };
-
- /** ShipmentRoute routeTotalCost. */
- public routeTotalCost: number;
-
- /** ShipmentRoute endLoads. */
- public endLoads: google.cloud.optimization.v1.ICapacityQuantity[];
-
- /** ShipmentRoute travelSteps. */
- public travelSteps: google.cloud.optimization.v1.ShipmentRoute.ITravelStep[];
-
- /** ShipmentRoute vehicleDetour. */
- public vehicleDetour?: (google.protobuf.IDuration|null);
-
- /** ShipmentRoute delayBeforeVehicleEnd. */
- public delayBeforeVehicleEnd?: (google.cloud.optimization.v1.ShipmentRoute.IDelay|null);
-
- /**
- * Creates a new ShipmentRoute instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ShipmentRoute instance
- */
- public static create(properties?: google.cloud.optimization.v1.IShipmentRoute): google.cloud.optimization.v1.ShipmentRoute;
-
- /**
- * Encodes the specified ShipmentRoute message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.verify|verify} messages.
- * @param message ShipmentRoute message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IShipmentRoute, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ShipmentRoute message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.verify|verify} messages.
- * @param message ShipmentRoute message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IShipmentRoute, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a ShipmentRoute message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ShipmentRoute
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentRoute;
-
- /**
- * Decodes a ShipmentRoute message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ShipmentRoute
- * @throws {Error} If the payload 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.optimization.v1.ShipmentRoute;
-
- /**
- * Verifies a ShipmentRoute message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a ShipmentRoute message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ShipmentRoute
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentRoute;
-
- /**
- * Creates a plain object from a ShipmentRoute message. Also converts values to other types if specified.
- * @param message ShipmentRoute
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentRoute, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ShipmentRoute to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ShipmentRoute
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace ShipmentRoute {
-
- /** Properties of a Delay. */
- interface IDelay {
-
- /** Delay startTime */
- startTime?: (google.protobuf.ITimestamp|null);
-
- /** Delay duration */
- duration?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a Delay. */
- class Delay implements IDelay {
-
- /**
- * Constructs a new Delay.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentRoute.IDelay);
-
- /** Delay startTime. */
- public startTime?: (google.protobuf.ITimestamp|null);
-
- /** Delay duration. */
- public duration?: (google.protobuf.IDuration|null);
-
- /**
- * Creates a new Delay instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Delay instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentRoute.IDelay): google.cloud.optimization.v1.ShipmentRoute.Delay;
-
- /**
- * Encodes the specified Delay message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.Delay.verify|verify} messages.
- * @param message Delay message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentRoute.IDelay, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Delay message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.Delay.verify|verify} messages.
- * @param message Delay message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentRoute.IDelay, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Delay message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Delay
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentRoute.Delay;
-
- /**
- * Decodes a Delay message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Delay
- * @throws {Error} If the payload 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.optimization.v1.ShipmentRoute.Delay;
-
- /**
- * Verifies a Delay message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Delay message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Delay
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentRoute.Delay;
-
- /**
- * Creates a plain object from a Delay message. Also converts values to other types if specified.
- * @param message Delay
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentRoute.Delay, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Delay to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Delay
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a Visit. */
- interface IVisit {
-
- /** Visit shipmentIndex */
- shipmentIndex?: (number|null);
-
- /** Visit isPickup */
- isPickup?: (boolean|null);
-
- /** Visit visitRequestIndex */
- visitRequestIndex?: (number|null);
-
- /** Visit startTime */
- startTime?: (google.protobuf.ITimestamp|null);
-
- /** Visit loadDemands */
- loadDemands?: ({ [k: string]: google.cloud.optimization.v1.Shipment.ILoad }|null);
-
- /** Visit detour */
- detour?: (google.protobuf.IDuration|null);
-
- /** Visit shipmentLabel */
- shipmentLabel?: (string|null);
-
- /** Visit visitLabel */
- visitLabel?: (string|null);
-
- /** Visit arrivalLoads */
- arrivalLoads?: (google.cloud.optimization.v1.ICapacityQuantity[]|null);
-
- /** Visit delayBeforeStart */
- delayBeforeStart?: (google.cloud.optimization.v1.ShipmentRoute.IDelay|null);
-
- /** Visit demands */
- demands?: (google.cloud.optimization.v1.ICapacityQuantity[]|null);
- }
-
- /** Represents a Visit. */
- class Visit implements IVisit {
-
- /**
- * Constructs a new Visit.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentRoute.IVisit);
-
- /** Visit shipmentIndex. */
- public shipmentIndex: number;
-
- /** Visit isPickup. */
- public isPickup: boolean;
-
- /** Visit visitRequestIndex. */
- public visitRequestIndex: number;
-
- /** Visit startTime. */
- public startTime?: (google.protobuf.ITimestamp|null);
-
- /** Visit loadDemands. */
- public loadDemands: { [k: string]: google.cloud.optimization.v1.Shipment.ILoad };
-
- /** Visit detour. */
- public detour?: (google.protobuf.IDuration|null);
-
- /** Visit shipmentLabel. */
- public shipmentLabel: string;
-
- /** Visit visitLabel. */
- public visitLabel: string;
-
- /** Visit arrivalLoads. */
- public arrivalLoads: google.cloud.optimization.v1.ICapacityQuantity[];
-
- /** Visit delayBeforeStart. */
- public delayBeforeStart?: (google.cloud.optimization.v1.ShipmentRoute.IDelay|null);
-
- /** Visit demands. */
- public demands: google.cloud.optimization.v1.ICapacityQuantity[];
-
- /**
- * Creates a new Visit instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Visit instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentRoute.IVisit): google.cloud.optimization.v1.ShipmentRoute.Visit;
-
- /**
- * Encodes the specified Visit message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.Visit.verify|verify} messages.
- * @param message Visit message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentRoute.IVisit, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Visit message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.Visit.verify|verify} messages.
- * @param message Visit message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentRoute.IVisit, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Visit message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Visit
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentRoute.Visit;
-
- /**
- * Decodes a Visit message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Visit
- * @throws {Error} If the payload 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.optimization.v1.ShipmentRoute.Visit;
-
- /**
- * Verifies a Visit message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Visit message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Visit
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentRoute.Visit;
-
- /**
- * Creates a plain object from a Visit message. Also converts values to other types if specified.
- * @param message Visit
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentRoute.Visit, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Visit to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Visit
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a Transition. */
- interface ITransition {
-
- /** Transition travelDuration */
- travelDuration?: (google.protobuf.IDuration|null);
-
- /** Transition travelDistanceMeters */
- travelDistanceMeters?: (number|null);
-
- /** Transition trafficInfoUnavailable */
- trafficInfoUnavailable?: (boolean|null);
-
- /** Transition delayDuration */
- delayDuration?: (google.protobuf.IDuration|null);
-
- /** Transition breakDuration */
- breakDuration?: (google.protobuf.IDuration|null);
-
- /** Transition waitDuration */
- waitDuration?: (google.protobuf.IDuration|null);
-
- /** Transition totalDuration */
- totalDuration?: (google.protobuf.IDuration|null);
-
- /** Transition startTime */
- startTime?: (google.protobuf.ITimestamp|null);
-
- /** Transition routePolyline */
- routePolyline?: (google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline|null);
-
- /** Transition vehicleLoads */
- vehicleLoads?: ({ [k: string]: google.cloud.optimization.v1.ShipmentRoute.IVehicleLoad }|null);
-
- /** Transition loads */
- loads?: (google.cloud.optimization.v1.ICapacityQuantity[]|null);
- }
-
- /** Represents a Transition. */
- class Transition implements ITransition {
-
- /**
- * Constructs a new Transition.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentRoute.ITransition);
-
- /** Transition travelDuration. */
- public travelDuration?: (google.protobuf.IDuration|null);
-
- /** Transition travelDistanceMeters. */
- public travelDistanceMeters: number;
-
- /** Transition trafficInfoUnavailable. */
- public trafficInfoUnavailable: boolean;
-
- /** Transition delayDuration. */
- public delayDuration?: (google.protobuf.IDuration|null);
-
- /** Transition breakDuration. */
- public breakDuration?: (google.protobuf.IDuration|null);
-
- /** Transition waitDuration. */
- public waitDuration?: (google.protobuf.IDuration|null);
-
- /** Transition totalDuration. */
- public totalDuration?: (google.protobuf.IDuration|null);
-
- /** Transition startTime. */
- public startTime?: (google.protobuf.ITimestamp|null);
-
- /** Transition routePolyline. */
- public routePolyline?: (google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline|null);
-
- /** Transition vehicleLoads. */
- public vehicleLoads: { [k: string]: google.cloud.optimization.v1.ShipmentRoute.IVehicleLoad };
-
- /** Transition loads. */
- public loads: google.cloud.optimization.v1.ICapacityQuantity[];
-
- /**
- * Creates a new Transition instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Transition instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentRoute.ITransition): google.cloud.optimization.v1.ShipmentRoute.Transition;
-
- /**
- * Encodes the specified Transition message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.Transition.verify|verify} messages.
- * @param message Transition message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentRoute.ITransition, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Transition message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.Transition.verify|verify} messages.
- * @param message Transition message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentRoute.ITransition, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Transition message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Transition
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentRoute.Transition;
-
- /**
- * Decodes a Transition message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Transition
- * @throws {Error} If the payload 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.optimization.v1.ShipmentRoute.Transition;
-
- /**
- * Verifies a Transition message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Transition message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Transition
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentRoute.Transition;
-
- /**
- * Creates a plain object from a Transition message. Also converts values to other types if specified.
- * @param message Transition
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentRoute.Transition, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Transition to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Transition
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a VehicleLoad. */
- interface IVehicleLoad {
-
- /** VehicleLoad amount */
- amount?: (number|Long|string|null);
- }
-
- /** Represents a VehicleLoad. */
- class VehicleLoad implements IVehicleLoad {
-
- /**
- * Constructs a new VehicleLoad.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentRoute.IVehicleLoad);
-
- /** VehicleLoad amount. */
- public amount: (number|Long|string);
-
- /**
- * Creates a new VehicleLoad instance using the specified properties.
- * @param [properties] Properties to set
- * @returns VehicleLoad instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentRoute.IVehicleLoad): google.cloud.optimization.v1.ShipmentRoute.VehicleLoad;
-
- /**
- * Encodes the specified VehicleLoad message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.VehicleLoad.verify|verify} messages.
- * @param message VehicleLoad message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentRoute.IVehicleLoad, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified VehicleLoad message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.VehicleLoad.verify|verify} messages.
- * @param message VehicleLoad message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentRoute.IVehicleLoad, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a VehicleLoad message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns VehicleLoad
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentRoute.VehicleLoad;
-
- /**
- * Decodes a VehicleLoad message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns VehicleLoad
- * @throws {Error} If the payload 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.optimization.v1.ShipmentRoute.VehicleLoad;
-
- /**
- * Verifies a VehicleLoad message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a VehicleLoad message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns VehicleLoad
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentRoute.VehicleLoad;
-
- /**
- * Creates a plain object from a VehicleLoad message. Also converts values to other types if specified.
- * @param message VehicleLoad
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentRoute.VehicleLoad, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this VehicleLoad to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for VehicleLoad
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of an EncodedPolyline. */
- interface IEncodedPolyline {
-
- /** EncodedPolyline points */
- points?: (string|null);
- }
-
- /** Represents an EncodedPolyline. */
- class EncodedPolyline implements IEncodedPolyline {
-
- /**
- * Constructs a new EncodedPolyline.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline);
-
- /** EncodedPolyline points. */
- public points: string;
-
- /**
- * Creates a new EncodedPolyline instance using the specified properties.
- * @param [properties] Properties to set
- * @returns EncodedPolyline instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline): google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline;
-
- /**
- * Encodes the specified EncodedPolyline message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline.verify|verify} messages.
- * @param message EncodedPolyline message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified EncodedPolyline message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline.verify|verify} messages.
- * @param message EncodedPolyline message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an EncodedPolyline message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns EncodedPolyline
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentRoute.EncodedPolyline;
-
- /**
- * Decodes an EncodedPolyline message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns EncodedPolyline
- * @throws {Error} If the payload 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.optimization.v1.ShipmentRoute.EncodedPolyline;
-
- /**
- * Verifies an EncodedPolyline message.
- * @param message Plain 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 EncodedPolyline message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns EncodedPolyline
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline;
-
- /**
- * Creates a plain object from an EncodedPolyline message. Also converts values to other types if specified.
- * @param message EncodedPolyline
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this EncodedPolyline to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for EncodedPolyline
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a Break. */
- interface IBreak {
-
- /** Break startTime */
- startTime?: (google.protobuf.ITimestamp|null);
-
- /** Break duration */
- duration?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a Break. */
- class Break implements IBreak {
-
- /**
- * Constructs a new Break.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentRoute.IBreak);
-
- /** Break startTime. */
- public startTime?: (google.protobuf.ITimestamp|null);
-
- /** Break duration. */
- public duration?: (google.protobuf.IDuration|null);
-
- /**
- * Creates a new Break instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Break instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentRoute.IBreak): google.cloud.optimization.v1.ShipmentRoute.Break;
-
- /**
- * Encodes the specified Break message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.Break.verify|verify} messages.
- * @param message Break message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentRoute.IBreak, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Break message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.Break.verify|verify} messages.
- * @param message Break message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentRoute.IBreak, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Break message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Break
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentRoute.Break;
-
- /**
- * Decodes a Break message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Break
- * @throws {Error} If the payload 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.optimization.v1.ShipmentRoute.Break;
-
- /**
- * Verifies a Break message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Break message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Break
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentRoute.Break;
-
- /**
- * Creates a plain object from a Break message. Also converts values to other types if specified.
- * @param message Break
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentRoute.Break, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Break to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Break
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a TravelStep. */
- interface ITravelStep {
-
- /** TravelStep duration */
- duration?: (google.protobuf.IDuration|null);
-
- /** TravelStep distanceMeters */
- distanceMeters?: (number|null);
-
- /** TravelStep trafficInfoUnavailable */
- trafficInfoUnavailable?: (boolean|null);
-
- /** TravelStep routePolyline */
- routePolyline?: (google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline|null);
- }
-
- /** Represents a TravelStep. */
- class TravelStep implements ITravelStep {
-
- /**
- * Constructs a new TravelStep.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ShipmentRoute.ITravelStep);
-
- /** TravelStep duration. */
- public duration?: (google.protobuf.IDuration|null);
-
- /** TravelStep distanceMeters. */
- public distanceMeters: number;
-
- /** TravelStep trafficInfoUnavailable. */
- public trafficInfoUnavailable: boolean;
-
- /** TravelStep routePolyline. */
- public routePolyline?: (google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline|null);
-
- /**
- * Creates a new TravelStep instance using the specified properties.
- * @param [properties] Properties to set
- * @returns TravelStep instance
- */
- public static create(properties?: google.cloud.optimization.v1.ShipmentRoute.ITravelStep): google.cloud.optimization.v1.ShipmentRoute.TravelStep;
-
- /**
- * Encodes the specified TravelStep message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.TravelStep.verify|verify} messages.
- * @param message TravelStep message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ShipmentRoute.ITravelStep, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified TravelStep message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentRoute.TravelStep.verify|verify} messages.
- * @param message TravelStep message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ShipmentRoute.ITravelStep, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a TravelStep message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns TravelStep
- * @throws {Error} If the payload is not 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.optimization.v1.ShipmentRoute.TravelStep;
-
- /**
- * Decodes a TravelStep message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns TravelStep
- * @throws {Error} If the payload 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.optimization.v1.ShipmentRoute.TravelStep;
-
- /**
- * Verifies a TravelStep message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a TravelStep message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns TravelStep
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.ShipmentRoute.TravelStep;
-
- /**
- * Creates a plain object from a TravelStep message. Also converts values to other types if specified.
- * @param message TravelStep
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.ShipmentRoute.TravelStep, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this TravelStep to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for TravelStep
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a SkippedShipment. */
- interface ISkippedShipment {
-
- /** SkippedShipment index */
- index?: (number|null);
-
- /** SkippedShipment label */
- label?: (string|null);
-
- /** SkippedShipment reasons */
- reasons?: (google.cloud.optimization.v1.SkippedShipment.IReason[]|null);
- }
-
- /** Represents a SkippedShipment. */
- class SkippedShipment implements ISkippedShipment {
-
- /**
- * Constructs a new SkippedShipment.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.ISkippedShipment);
-
- /** SkippedShipment index. */
- public index: number;
-
- /** SkippedShipment label. */
- public label: string;
-
- /** SkippedShipment reasons. */
- public reasons: google.cloud.optimization.v1.SkippedShipment.IReason[];
-
- /**
- * Creates a new SkippedShipment instance using the specified properties.
- * @param [properties] Properties to set
- * @returns SkippedShipment instance
- */
- public static create(properties?: google.cloud.optimization.v1.ISkippedShipment): google.cloud.optimization.v1.SkippedShipment;
-
- /**
- * Encodes the specified SkippedShipment message. Does not implicitly {@link google.cloud.optimization.v1.SkippedShipment.verify|verify} messages.
- * @param message SkippedShipment message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.ISkippedShipment, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified SkippedShipment message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.SkippedShipment.verify|verify} messages.
- * @param message SkippedShipment message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.ISkippedShipment, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a SkippedShipment message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns SkippedShipment
- * @throws {Error} If the payload is not 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.optimization.v1.SkippedShipment;
-
- /**
- * Decodes a SkippedShipment message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns SkippedShipment
- * @throws {Error} If the payload 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.optimization.v1.SkippedShipment;
-
- /**
- * Verifies a SkippedShipment message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a SkippedShipment message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns SkippedShipment
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.SkippedShipment;
-
- /**
- * Creates a plain object from a SkippedShipment message. Also converts values to other types if specified.
- * @param message SkippedShipment
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.SkippedShipment, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this SkippedShipment to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for SkippedShipment
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace SkippedShipment {
-
- /** Properties of a Reason. */
- interface IReason {
-
- /** Reason code */
- code?: (google.cloud.optimization.v1.SkippedShipment.Reason.Code|keyof typeof google.cloud.optimization.v1.SkippedShipment.Reason.Code|null);
-
- /** Reason exampleVehicleIndex */
- exampleVehicleIndex?: (number|null);
-
- /** Reason exampleExceededCapacityType */
- exampleExceededCapacityType?: (string|null);
- }
-
- /** Represents a Reason. */
- class Reason implements IReason {
-
- /**
- * Constructs a new Reason.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.SkippedShipment.IReason);
-
- /** Reason code. */
- public code: (google.cloud.optimization.v1.SkippedShipment.Reason.Code|keyof typeof google.cloud.optimization.v1.SkippedShipment.Reason.Code);
-
- /** Reason exampleVehicleIndex. */
- public exampleVehicleIndex?: (number|null);
-
- /** Reason exampleExceededCapacityType. */
- public exampleExceededCapacityType: string;
-
- /** Reason _exampleVehicleIndex. */
- public _exampleVehicleIndex?: "exampleVehicleIndex";
-
- /**
- * Creates a new Reason instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Reason instance
- */
- public static create(properties?: google.cloud.optimization.v1.SkippedShipment.IReason): google.cloud.optimization.v1.SkippedShipment.Reason;
-
- /**
- * Encodes the specified Reason message. Does not implicitly {@link google.cloud.optimization.v1.SkippedShipment.Reason.verify|verify} messages.
- * @param message Reason message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.SkippedShipment.IReason, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Reason message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.SkippedShipment.Reason.verify|verify} messages.
- * @param message Reason message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.SkippedShipment.IReason, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Reason message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Reason
- * @throws {Error} If the payload is not 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.optimization.v1.SkippedShipment.Reason;
-
- /**
- * Decodes a Reason message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Reason
- * @throws {Error} If the payload 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.optimization.v1.SkippedShipment.Reason;
-
- /**
- * Verifies a Reason message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Reason message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Reason
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.SkippedShipment.Reason;
-
- /**
- * Creates a plain object from a Reason message. Also converts values to other types if specified.
- * @param message Reason
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.SkippedShipment.Reason, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Reason to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Reason
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace Reason {
-
- /** Code enum. */
- enum Code {
- CODE_UNSPECIFIED = 0,
- NO_VEHICLE = 1,
- DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2,
- CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3,
- CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4,
- CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5,
- CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6,
- VEHICLE_NOT_ALLOWED = 7
- }
- }
- }
-
- /** Properties of an AggregatedMetrics. */
- interface IAggregatedMetrics {
-
- /** AggregatedMetrics performedShipmentCount */
- performedShipmentCount?: (number|null);
-
- /** AggregatedMetrics travelDuration */
- travelDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics waitDuration */
- waitDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics delayDuration */
- delayDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics breakDuration */
- breakDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics visitDuration */
- visitDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics totalDuration */
- totalDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics travelDistanceMeters */
- travelDistanceMeters?: (number|null);
-
- /** AggregatedMetrics maxLoads */
- maxLoads?: ({ [k: string]: google.cloud.optimization.v1.ShipmentRoute.IVehicleLoad }|null);
-
- /** AggregatedMetrics costs */
- costs?: ({ [k: string]: number }|null);
-
- /** AggregatedMetrics totalCost */
- totalCost?: (number|null);
- }
-
- /** Represents an AggregatedMetrics. */
- class AggregatedMetrics implements IAggregatedMetrics {
-
- /**
- * Constructs a new AggregatedMetrics.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IAggregatedMetrics);
-
- /** AggregatedMetrics performedShipmentCount. */
- public performedShipmentCount: number;
-
- /** AggregatedMetrics travelDuration. */
- public travelDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics waitDuration. */
- public waitDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics delayDuration. */
- public delayDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics breakDuration. */
- public breakDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics visitDuration. */
- public visitDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics totalDuration. */
- public totalDuration?: (google.protobuf.IDuration|null);
-
- /** AggregatedMetrics travelDistanceMeters. */
- public travelDistanceMeters: number;
-
- /** AggregatedMetrics maxLoads. */
- public maxLoads: { [k: string]: google.cloud.optimization.v1.ShipmentRoute.IVehicleLoad };
-
- /** AggregatedMetrics costs. */
- public costs: { [k: string]: number };
-
- /** AggregatedMetrics totalCost. */
- public totalCost: number;
-
- /**
- * Creates a new AggregatedMetrics instance using the specified properties.
- * @param [properties] Properties to set
- * @returns AggregatedMetrics instance
- */
- public static create(properties?: google.cloud.optimization.v1.IAggregatedMetrics): google.cloud.optimization.v1.AggregatedMetrics;
-
- /**
- * Encodes the specified AggregatedMetrics message. Does not implicitly {@link google.cloud.optimization.v1.AggregatedMetrics.verify|verify} messages.
- * @param message AggregatedMetrics message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IAggregatedMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified AggregatedMetrics message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.AggregatedMetrics.verify|verify} messages.
- * @param message AggregatedMetrics message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IAggregatedMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an AggregatedMetrics message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns AggregatedMetrics
- * @throws {Error} If the payload is not 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.optimization.v1.AggregatedMetrics;
-
- /**
- * Decodes an AggregatedMetrics message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns AggregatedMetrics
- * @throws {Error} If the payload 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.optimization.v1.AggregatedMetrics;
-
- /**
- * Verifies an AggregatedMetrics message.
- * @param message Plain 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 AggregatedMetrics message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns AggregatedMetrics
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.AggregatedMetrics;
-
- /**
- * Creates a plain object from an AggregatedMetrics message. Also converts values to other types if specified.
- * @param message AggregatedMetrics
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.AggregatedMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this AggregatedMetrics to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for AggregatedMetrics
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of an InjectedSolutionConstraint. */
- interface IInjectedSolutionConstraint {
-
- /** InjectedSolutionConstraint routes */
- routes?: (google.cloud.optimization.v1.IShipmentRoute[]|null);
-
- /** InjectedSolutionConstraint skippedShipments */
- skippedShipments?: (google.cloud.optimization.v1.ISkippedShipment[]|null);
-
- /** InjectedSolutionConstraint constraintRelaxations */
- constraintRelaxations?: (google.cloud.optimization.v1.InjectedSolutionConstraint.IConstraintRelaxation[]|null);
- }
-
- /** Represents an InjectedSolutionConstraint. */
- class InjectedSolutionConstraint implements IInjectedSolutionConstraint {
-
- /**
- * Constructs a new InjectedSolutionConstraint.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IInjectedSolutionConstraint);
-
- /** InjectedSolutionConstraint routes. */
- public routes: google.cloud.optimization.v1.IShipmentRoute[];
-
- /** InjectedSolutionConstraint skippedShipments. */
- public skippedShipments: google.cloud.optimization.v1.ISkippedShipment[];
-
- /** InjectedSolutionConstraint constraintRelaxations. */
- public constraintRelaxations: google.cloud.optimization.v1.InjectedSolutionConstraint.IConstraintRelaxation[];
-
- /**
- * Creates a new InjectedSolutionConstraint instance using the specified properties.
- * @param [properties] Properties to set
- * @returns InjectedSolutionConstraint instance
- */
- public static create(properties?: google.cloud.optimization.v1.IInjectedSolutionConstraint): google.cloud.optimization.v1.InjectedSolutionConstraint;
-
- /**
- * Encodes the specified InjectedSolutionConstraint message. Does not implicitly {@link google.cloud.optimization.v1.InjectedSolutionConstraint.verify|verify} messages.
- * @param message InjectedSolutionConstraint message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IInjectedSolutionConstraint, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified InjectedSolutionConstraint message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.InjectedSolutionConstraint.verify|verify} messages.
- * @param message InjectedSolutionConstraint message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IInjectedSolutionConstraint, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an InjectedSolutionConstraint message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns InjectedSolutionConstraint
- * @throws {Error} If the payload is not 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.optimization.v1.InjectedSolutionConstraint;
-
- /**
- * Decodes an InjectedSolutionConstraint message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns InjectedSolutionConstraint
- * @throws {Error} If the payload 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.optimization.v1.InjectedSolutionConstraint;
-
- /**
- * Verifies an InjectedSolutionConstraint message.
- * @param message Plain 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 InjectedSolutionConstraint message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns InjectedSolutionConstraint
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.InjectedSolutionConstraint;
-
- /**
- * Creates a plain object from an InjectedSolutionConstraint message. Also converts values to other types if specified.
- * @param message InjectedSolutionConstraint
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.InjectedSolutionConstraint, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this InjectedSolutionConstraint to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for InjectedSolutionConstraint
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace InjectedSolutionConstraint {
-
- /** Properties of a ConstraintRelaxation. */
- interface IConstraintRelaxation {
-
- /** ConstraintRelaxation relaxations */
- relaxations?: (google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.IRelaxation[]|null);
-
- /** ConstraintRelaxation vehicleIndices */
- vehicleIndices?: (number[]|null);
- }
-
- /** Represents a ConstraintRelaxation. */
- class ConstraintRelaxation implements IConstraintRelaxation {
-
- /**
- * Constructs a new ConstraintRelaxation.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.InjectedSolutionConstraint.IConstraintRelaxation);
-
- /** ConstraintRelaxation relaxations. */
- public relaxations: google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.IRelaxation[];
-
- /** ConstraintRelaxation vehicleIndices. */
- public vehicleIndices: number[];
-
- /**
- * Creates a new ConstraintRelaxation instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ConstraintRelaxation instance
- */
- public static create(properties?: google.cloud.optimization.v1.InjectedSolutionConstraint.IConstraintRelaxation): google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation;
-
- /**
- * Encodes the specified ConstraintRelaxation message. Does not implicitly {@link google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.verify|verify} messages.
- * @param message ConstraintRelaxation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.InjectedSolutionConstraint.IConstraintRelaxation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ConstraintRelaxation message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.verify|verify} messages.
- * @param message ConstraintRelaxation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.InjectedSolutionConstraint.IConstraintRelaxation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a ConstraintRelaxation message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ConstraintRelaxation
- * @throws {Error} If the payload is not 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.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation;
-
- /**
- * Decodes a ConstraintRelaxation message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ConstraintRelaxation
- * @throws {Error} If the payload 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.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation;
-
- /**
- * Verifies a ConstraintRelaxation message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a ConstraintRelaxation message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ConstraintRelaxation
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation;
-
- /**
- * Creates a plain object from a ConstraintRelaxation message. Also converts values to other types if specified.
- * @param message ConstraintRelaxation
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ConstraintRelaxation to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ConstraintRelaxation
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace ConstraintRelaxation {
-
- /** Properties of a Relaxation. */
- interface IRelaxation {
-
- /** Relaxation level */
- level?: (google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level|keyof typeof google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level|null);
-
- /** Relaxation thresholdTime */
- thresholdTime?: (google.protobuf.ITimestamp|null);
-
- /** Relaxation thresholdVisitCount */
- thresholdVisitCount?: (number|null);
- }
-
- /** Represents a Relaxation. */
- class Relaxation implements IRelaxation {
-
- /**
- * Constructs a new Relaxation.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.IRelaxation);
-
- /** Relaxation level. */
- public level: (google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level|keyof typeof google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level);
-
- /** Relaxation thresholdTime. */
- public thresholdTime?: (google.protobuf.ITimestamp|null);
-
- /** Relaxation thresholdVisitCount. */
- public thresholdVisitCount: number;
-
- /**
- * Creates a new Relaxation instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Relaxation instance
- */
- public static create(properties?: google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.IRelaxation): google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation;
-
- /**
- * Encodes the specified Relaxation message. Does not implicitly {@link google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.verify|verify} messages.
- * @param message Relaxation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.IRelaxation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Relaxation message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.verify|verify} messages.
- * @param message Relaxation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.IRelaxation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Relaxation message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Relaxation
- * @throws {Error} If the payload is not 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.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation;
-
- /**
- * Decodes a Relaxation message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Relaxation
- * @throws {Error} If the payload 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.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation;
-
- /**
- * Verifies a Relaxation message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Relaxation message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Relaxation
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation;
-
- /**
- * Creates a plain object from a Relaxation message. Also converts values to other types if specified.
- * @param message Relaxation
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Relaxation to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Relaxation
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace Relaxation {
-
- /** Level enum. */
- enum Level {
- LEVEL_UNSPECIFIED = 0,
- RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1,
- RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2,
- RELAX_ALL_AFTER_THRESHOLD = 3
- }
- }
- }
- }
-
- /** Properties of an OptimizeToursValidationError. */
- interface IOptimizeToursValidationError {
-
- /** OptimizeToursValidationError code */
- code?: (number|null);
-
- /** OptimizeToursValidationError displayName */
- displayName?: (string|null);
-
- /** OptimizeToursValidationError fields */
- fields?: (google.cloud.optimization.v1.OptimizeToursValidationError.IFieldReference[]|null);
-
- /** OptimizeToursValidationError errorMessage */
- errorMessage?: (string|null);
-
- /** OptimizeToursValidationError offendingValues */
- offendingValues?: (string|null);
- }
-
- /** Represents an OptimizeToursValidationError. */
- class OptimizeToursValidationError implements IOptimizeToursValidationError {
-
- /**
- * Constructs a new OptimizeToursValidationError.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.IOptimizeToursValidationError);
-
- /** OptimizeToursValidationError code. */
- public code: number;
-
- /** OptimizeToursValidationError displayName. */
- public displayName: string;
-
- /** OptimizeToursValidationError fields. */
- public fields: google.cloud.optimization.v1.OptimizeToursValidationError.IFieldReference[];
-
- /** OptimizeToursValidationError errorMessage. */
- public errorMessage: string;
-
- /** OptimizeToursValidationError offendingValues. */
- public offendingValues: string;
-
- /**
- * Creates a new OptimizeToursValidationError instance using the specified properties.
- * @param [properties] Properties to set
- * @returns OptimizeToursValidationError instance
- */
- public static create(properties?: google.cloud.optimization.v1.IOptimizeToursValidationError): google.cloud.optimization.v1.OptimizeToursValidationError;
-
- /**
- * Encodes the specified OptimizeToursValidationError message. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursValidationError.verify|verify} messages.
- * @param message OptimizeToursValidationError message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.IOptimizeToursValidationError, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified OptimizeToursValidationError message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursValidationError.verify|verify} messages.
- * @param message OptimizeToursValidationError message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.IOptimizeToursValidationError, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an OptimizeToursValidationError message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns OptimizeToursValidationError
- * @throws {Error} If the payload is not 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.optimization.v1.OptimizeToursValidationError;
-
- /**
- * Decodes an OptimizeToursValidationError message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns OptimizeToursValidationError
- * @throws {Error} If the payload 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.optimization.v1.OptimizeToursValidationError;
-
- /**
- * Verifies an OptimizeToursValidationError message.
- * @param message Plain 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 OptimizeToursValidationError message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns OptimizeToursValidationError
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.OptimizeToursValidationError;
-
- /**
- * Creates a plain object from an OptimizeToursValidationError message. Also converts values to other types if specified.
- * @param message OptimizeToursValidationError
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.OptimizeToursValidationError, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this OptimizeToursValidationError to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for OptimizeToursValidationError
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace OptimizeToursValidationError {
-
- /** Properties of a FieldReference. */
- interface IFieldReference {
-
- /** FieldReference name */
- name?: (string|null);
-
- /** FieldReference index */
- index?: (number|null);
-
- /** FieldReference key */
- key?: (string|null);
-
- /** FieldReference subField */
- subField?: (google.cloud.optimization.v1.OptimizeToursValidationError.IFieldReference|null);
- }
-
- /** Represents a FieldReference. */
- class FieldReference implements IFieldReference {
-
- /**
- * Constructs a new FieldReference.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.cloud.optimization.v1.OptimizeToursValidationError.IFieldReference);
-
- /** FieldReference name. */
- public name: string;
-
- /** FieldReference index. */
- public index?: (number|null);
-
- /** FieldReference key. */
- public key?: (string|null);
-
- /** FieldReference subField. */
- public subField?: (google.cloud.optimization.v1.OptimizeToursValidationError.IFieldReference|null);
-
- /** FieldReference indexOrKey. */
- public indexOrKey?: ("index"|"key");
-
- /**
- * Creates a new FieldReference instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FieldReference instance
- */
- public static create(properties?: google.cloud.optimization.v1.OptimizeToursValidationError.IFieldReference): google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference;
-
- /**
- * Encodes the specified FieldReference message. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference.verify|verify} messages.
- * @param message FieldReference message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.cloud.optimization.v1.OptimizeToursValidationError.IFieldReference, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FieldReference message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference.verify|verify} messages.
- * @param message FieldReference message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.cloud.optimization.v1.OptimizeToursValidationError.IFieldReference, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FieldReference message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FieldReference
- * @throws {Error} If the payload is not 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.optimization.v1.OptimizeToursValidationError.FieldReference;
-
- /**
- * Decodes a FieldReference message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FieldReference
- * @throws {Error} If the payload 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.optimization.v1.OptimizeToursValidationError.FieldReference;
-
- /**
- * Verifies a FieldReference message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FieldReference message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FieldReference
- */
- public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference;
-
- /**
- * Creates a plain object from a FieldReference message. Also converts values to other types if specified.
- * @param message FieldReference
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FieldReference to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FieldReference
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
- }
- }
- }
-
- /** Namespace api. */
- namespace api {
-
- /** FieldBehavior enum. */
- enum FieldBehavior {
- FIELD_BEHAVIOR_UNSPECIFIED = 0,
- OPTIONAL = 1,
- REQUIRED = 2,
- OUTPUT_ONLY = 3,
- INPUT_ONLY = 4,
- IMMUTABLE = 5,
- UNORDERED_LIST = 6,
- NON_EMPTY_DEFAULT = 7,
- IDENTIFIER = 8
- }
-
- /** Properties of a Http. */
- interface IHttp {
-
- /** Http rules */
- rules?: (google.api.IHttpRule[]|null);
-
- /** Http fullyDecodeReservedExpansion */
- fullyDecodeReservedExpansion?: (boolean|null);
- }
-
- /** Represents a Http. */
- class Http implements IHttp {
-
- /**
- * Constructs a new Http.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IHttp);
-
- /** Http rules. */
- public rules: google.api.IHttpRule[];
-
- /** Http fullyDecodeReservedExpansion. */
- public fullyDecodeReservedExpansion: boolean;
-
- /**
- * Creates a new Http instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Http instance
- */
- public static create(properties?: google.api.IHttp): google.api.Http;
-
- /**
- * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
- * @param message Http message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
- * @param message Http message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Http message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Http
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http;
-
- /**
- * Decodes a Http message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Http
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http;
-
- /**
- * Verifies a Http message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Http message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Http
- */
- public static fromObject(object: { [k: string]: any }): google.api.Http;
-
- /**
- * Creates a plain object from a Http message. Also converts values to other types if specified.
- * @param message Http
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Http to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Http
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a HttpRule. */
- interface IHttpRule {
-
- /** HttpRule selector */
- selector?: (string|null);
-
- /** HttpRule get */
- get?: (string|null);
-
- /** HttpRule put */
- put?: (string|null);
-
- /** HttpRule post */
- post?: (string|null);
-
- /** HttpRule delete */
- "delete"?: (string|null);
-
- /** HttpRule patch */
- patch?: (string|null);
-
- /** HttpRule custom */
- custom?: (google.api.ICustomHttpPattern|null);
-
- /** HttpRule body */
- body?: (string|null);
-
- /** HttpRule responseBody */
- responseBody?: (string|null);
-
- /** HttpRule additionalBindings */
- additionalBindings?: (google.api.IHttpRule[]|null);
- }
-
- /** Represents a HttpRule. */
- class HttpRule implements IHttpRule {
-
- /**
- * Constructs a new HttpRule.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IHttpRule);
-
- /** HttpRule selector. */
- public selector: string;
-
- /** HttpRule get. */
- public get?: (string|null);
-
- /** HttpRule put. */
- public put?: (string|null);
-
- /** HttpRule post. */
- public post?: (string|null);
-
- /** HttpRule delete. */
- public delete?: (string|null);
-
- /** HttpRule patch. */
- public patch?: (string|null);
-
- /** HttpRule custom. */
- public custom?: (google.api.ICustomHttpPattern|null);
-
- /** HttpRule body. */
- public body: string;
-
- /** HttpRule responseBody. */
- public responseBody: string;
-
- /** HttpRule additionalBindings. */
- public additionalBindings: google.api.IHttpRule[];
-
- /** HttpRule pattern. */
- public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom");
-
- /**
- * Creates a new HttpRule instance using the specified properties.
- * @param [properties] Properties to set
- * @returns HttpRule instance
- */
- public static create(properties?: google.api.IHttpRule): google.api.HttpRule;
-
- /**
- * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
- * @param message HttpRule message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
- * @param message HttpRule message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a HttpRule message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns HttpRule
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule;
-
- /**
- * Decodes a HttpRule message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns HttpRule
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule;
-
- /**
- * Verifies a HttpRule message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns HttpRule
- */
- public static fromObject(object: { [k: string]: any }): google.api.HttpRule;
-
- /**
- * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
- * @param message HttpRule
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this HttpRule to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for HttpRule
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a CustomHttpPattern. */
- interface ICustomHttpPattern {
-
- /** CustomHttpPattern kind */
- kind?: (string|null);
-
- /** CustomHttpPattern path */
- path?: (string|null);
- }
-
- /** Represents a CustomHttpPattern. */
- class CustomHttpPattern implements ICustomHttpPattern {
-
- /**
- * Constructs a new CustomHttpPattern.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.ICustomHttpPattern);
-
- /** CustomHttpPattern kind. */
- public kind: string;
-
- /** CustomHttpPattern path. */
- public path: string;
-
- /**
- * Creates a new CustomHttpPattern instance using the specified properties.
- * @param [properties] Properties to set
- * @returns CustomHttpPattern instance
- */
- public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern;
-
- /**
- * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
- * @param message CustomHttpPattern message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
- * @param message CustomHttpPattern message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a CustomHttpPattern message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns CustomHttpPattern
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern;
-
- /**
- * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns CustomHttpPattern
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern;
-
- /**
- * Verifies a CustomHttpPattern message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns CustomHttpPattern
- */
- public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern;
-
- /**
- * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
- * @param message CustomHttpPattern
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this CustomHttpPattern to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for CustomHttpPattern
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a CommonLanguageSettings. */
- interface ICommonLanguageSettings {
-
- /** CommonLanguageSettings referenceDocsUri */
- referenceDocsUri?: (string|null);
-
- /** CommonLanguageSettings destinations */
- destinations?: (google.api.ClientLibraryDestination[]|null);
- }
-
- /** Represents a CommonLanguageSettings. */
- class CommonLanguageSettings implements ICommonLanguageSettings {
-
- /**
- * Constructs a new CommonLanguageSettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.ICommonLanguageSettings);
-
- /** CommonLanguageSettings referenceDocsUri. */
- public referenceDocsUri: string;
-
- /** CommonLanguageSettings destinations. */
- public destinations: google.api.ClientLibraryDestination[];
-
- /**
- * Creates a new CommonLanguageSettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns CommonLanguageSettings instance
- */
- public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings;
-
- /**
- * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages.
- * @param message CommonLanguageSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages.
- * @param message CommonLanguageSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a CommonLanguageSettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns CommonLanguageSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings;
-
- /**
- * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns CommonLanguageSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings;
-
- /**
- * Verifies a CommonLanguageSettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns CommonLanguageSettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings;
-
- /**
- * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified.
- * @param message CommonLanguageSettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this CommonLanguageSettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for CommonLanguageSettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a ClientLibrarySettings. */
- interface IClientLibrarySettings {
-
- /** ClientLibrarySettings version */
- version?: (string|null);
-
- /** ClientLibrarySettings launchStage */
- launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null);
-
- /** ClientLibrarySettings restNumericEnums */
- restNumericEnums?: (boolean|null);
-
- /** ClientLibrarySettings javaSettings */
- javaSettings?: (google.api.IJavaSettings|null);
-
- /** ClientLibrarySettings cppSettings */
- cppSettings?: (google.api.ICppSettings|null);
-
- /** ClientLibrarySettings phpSettings */
- phpSettings?: (google.api.IPhpSettings|null);
-
- /** ClientLibrarySettings pythonSettings */
- pythonSettings?: (google.api.IPythonSettings|null);
-
- /** ClientLibrarySettings nodeSettings */
- nodeSettings?: (google.api.INodeSettings|null);
-
- /** ClientLibrarySettings dotnetSettings */
- dotnetSettings?: (google.api.IDotnetSettings|null);
-
- /** ClientLibrarySettings rubySettings */
- rubySettings?: (google.api.IRubySettings|null);
-
- /** ClientLibrarySettings goSettings */
- goSettings?: (google.api.IGoSettings|null);
- }
-
- /** Represents a ClientLibrarySettings. */
- class ClientLibrarySettings implements IClientLibrarySettings {
-
- /**
- * Constructs a new ClientLibrarySettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IClientLibrarySettings);
-
- /** ClientLibrarySettings version. */
- public version: string;
-
- /** ClientLibrarySettings launchStage. */
- public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage);
-
- /** ClientLibrarySettings restNumericEnums. */
- public restNumericEnums: boolean;
-
- /** ClientLibrarySettings javaSettings. */
- public javaSettings?: (google.api.IJavaSettings|null);
-
- /** ClientLibrarySettings cppSettings. */
- public cppSettings?: (google.api.ICppSettings|null);
-
- /** ClientLibrarySettings phpSettings. */
- public phpSettings?: (google.api.IPhpSettings|null);
-
- /** ClientLibrarySettings pythonSettings. */
- public pythonSettings?: (google.api.IPythonSettings|null);
-
- /** ClientLibrarySettings nodeSettings. */
- public nodeSettings?: (google.api.INodeSettings|null);
-
- /** ClientLibrarySettings dotnetSettings. */
- public dotnetSettings?: (google.api.IDotnetSettings|null);
-
- /** ClientLibrarySettings rubySettings. */
- public rubySettings?: (google.api.IRubySettings|null);
-
- /** ClientLibrarySettings goSettings. */
- public goSettings?: (google.api.IGoSettings|null);
-
- /**
- * Creates a new ClientLibrarySettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ClientLibrarySettings instance
- */
- public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings;
-
- /**
- * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages.
- * @param message ClientLibrarySettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages.
- * @param message ClientLibrarySettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a ClientLibrarySettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ClientLibrarySettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings;
-
- /**
- * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ClientLibrarySettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings;
-
- /**
- * Verifies a ClientLibrarySettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ClientLibrarySettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings;
-
- /**
- * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified.
- * @param message ClientLibrarySettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ClientLibrarySettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ClientLibrarySettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a Publishing. */
- interface IPublishing {
-
- /** Publishing methodSettings */
- methodSettings?: (google.api.IMethodSettings[]|null);
-
- /** Publishing newIssueUri */
- newIssueUri?: (string|null);
-
- /** Publishing documentationUri */
- documentationUri?: (string|null);
-
- /** Publishing apiShortName */
- apiShortName?: (string|null);
-
- /** Publishing githubLabel */
- githubLabel?: (string|null);
-
- /** Publishing codeownerGithubTeams */
- codeownerGithubTeams?: (string[]|null);
-
- /** Publishing docTagPrefix */
- docTagPrefix?: (string|null);
-
- /** Publishing organization */
- organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null);
-
- /** Publishing librarySettings */
- librarySettings?: (google.api.IClientLibrarySettings[]|null);
-
- /** Publishing protoReferenceDocumentationUri */
- protoReferenceDocumentationUri?: (string|null);
- }
-
- /** Represents a Publishing. */
- class Publishing implements IPublishing {
-
- /**
- * Constructs a new Publishing.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IPublishing);
-
- /** Publishing methodSettings. */
- public methodSettings: google.api.IMethodSettings[];
-
- /** Publishing newIssueUri. */
- public newIssueUri: string;
-
- /** Publishing documentationUri. */
- public documentationUri: string;
-
- /** Publishing apiShortName. */
- public apiShortName: string;
-
- /** Publishing githubLabel. */
- public githubLabel: string;
-
- /** Publishing codeownerGithubTeams. */
- public codeownerGithubTeams: string[];
-
- /** Publishing docTagPrefix. */
- public docTagPrefix: string;
-
- /** Publishing organization. */
- public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization);
-
- /** Publishing librarySettings. */
- public librarySettings: google.api.IClientLibrarySettings[];
-
- /** Publishing protoReferenceDocumentationUri. */
- public protoReferenceDocumentationUri: string;
-
- /**
- * Creates a new Publishing instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Publishing instance
- */
- public static create(properties?: google.api.IPublishing): google.api.Publishing;
-
- /**
- * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages.
- * @param message Publishing message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages.
- * @param message Publishing message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Publishing message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Publishing
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing;
-
- /**
- * Decodes a Publishing message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Publishing
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing;
-
- /**
- * Verifies a Publishing message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Publishing message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Publishing
- */
- public static fromObject(object: { [k: string]: any }): google.api.Publishing;
-
- /**
- * Creates a plain object from a Publishing message. Also converts values to other types if specified.
- * @param message Publishing
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Publishing to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Publishing
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a JavaSettings. */
- interface IJavaSettings {
-
- /** JavaSettings libraryPackage */
- libraryPackage?: (string|null);
-
- /** JavaSettings serviceClassNames */
- serviceClassNames?: ({ [k: string]: string }|null);
-
- /** JavaSettings common */
- common?: (google.api.ICommonLanguageSettings|null);
- }
-
- /** Represents a JavaSettings. */
- class JavaSettings implements IJavaSettings {
-
- /**
- * Constructs a new JavaSettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IJavaSettings);
-
- /** JavaSettings libraryPackage. */
- public libraryPackage: string;
-
- /** JavaSettings serviceClassNames. */
- public serviceClassNames: { [k: string]: string };
-
- /** JavaSettings common. */
- public common?: (google.api.ICommonLanguageSettings|null);
-
- /**
- * Creates a new JavaSettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns JavaSettings instance
- */
- public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings;
-
- /**
- * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages.
- * @param message JavaSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages.
- * @param message JavaSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a JavaSettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns JavaSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings;
-
- /**
- * Decodes a JavaSettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns JavaSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings;
-
- /**
- * Verifies a JavaSettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns JavaSettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.JavaSettings;
-
- /**
- * Creates a plain object from a JavaSettings message. Also converts values to other types if specified.
- * @param message JavaSettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this JavaSettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for JavaSettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a CppSettings. */
- interface ICppSettings {
-
- /** CppSettings common */
- common?: (google.api.ICommonLanguageSettings|null);
- }
-
- /** Represents a CppSettings. */
- class CppSettings implements ICppSettings {
-
- /**
- * Constructs a new CppSettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.ICppSettings);
-
- /** CppSettings common. */
- public common?: (google.api.ICommonLanguageSettings|null);
-
- /**
- * Creates a new CppSettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns CppSettings instance
- */
- public static create(properties?: google.api.ICppSettings): google.api.CppSettings;
-
- /**
- * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages.
- * @param message CppSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages.
- * @param message CppSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a CppSettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns CppSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings;
-
- /**
- * Decodes a CppSettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns CppSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings;
-
- /**
- * Verifies a CppSettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a CppSettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns CppSettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.CppSettings;
-
- /**
- * Creates a plain object from a CppSettings message. Also converts values to other types if specified.
- * @param message CppSettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this CppSettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for CppSettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a PhpSettings. */
- interface IPhpSettings {
-
- /** PhpSettings common */
- common?: (google.api.ICommonLanguageSettings|null);
- }
-
- /** Represents a PhpSettings. */
- class PhpSettings implements IPhpSettings {
-
- /**
- * Constructs a new PhpSettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IPhpSettings);
-
- /** PhpSettings common. */
- public common?: (google.api.ICommonLanguageSettings|null);
-
- /**
- * Creates a new PhpSettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns PhpSettings instance
- */
- public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings;
-
- /**
- * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages.
- * @param message PhpSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages.
- * @param message PhpSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a PhpSettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns PhpSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings;
-
- /**
- * Decodes a PhpSettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns PhpSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings;
-
- /**
- * Verifies a PhpSettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns PhpSettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.PhpSettings;
-
- /**
- * Creates a plain object from a PhpSettings message. Also converts values to other types if specified.
- * @param message PhpSettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this PhpSettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for PhpSettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a PythonSettings. */
- interface IPythonSettings {
-
- /** PythonSettings common */
- common?: (google.api.ICommonLanguageSettings|null);
- }
-
- /** Represents a PythonSettings. */
- class PythonSettings implements IPythonSettings {
-
- /**
- * Constructs a new PythonSettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IPythonSettings);
-
- /** PythonSettings common. */
- public common?: (google.api.ICommonLanguageSettings|null);
-
- /**
- * Creates a new PythonSettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns PythonSettings instance
- */
- public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings;
-
- /**
- * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages.
- * @param message PythonSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages.
- * @param message PythonSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a PythonSettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns PythonSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings;
-
- /**
- * Decodes a PythonSettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns PythonSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings;
-
- /**
- * Verifies a PythonSettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns PythonSettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.PythonSettings;
-
- /**
- * Creates a plain object from a PythonSettings message. Also converts values to other types if specified.
- * @param message PythonSettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this PythonSettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for PythonSettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a NodeSettings. */
- interface INodeSettings {
-
- /** NodeSettings common */
- common?: (google.api.ICommonLanguageSettings|null);
- }
-
- /** Represents a NodeSettings. */
- class NodeSettings implements INodeSettings {
-
- /**
- * Constructs a new NodeSettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.INodeSettings);
-
- /** NodeSettings common. */
- public common?: (google.api.ICommonLanguageSettings|null);
-
- /**
- * Creates a new NodeSettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns NodeSettings instance
- */
- public static create(properties?: google.api.INodeSettings): google.api.NodeSettings;
-
- /**
- * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages.
- * @param message NodeSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages.
- * @param message NodeSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a NodeSettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns NodeSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings;
-
- /**
- * Decodes a NodeSettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns NodeSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings;
-
- /**
- * Verifies a NodeSettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns NodeSettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.NodeSettings;
-
- /**
- * Creates a plain object from a NodeSettings message. Also converts values to other types if specified.
- * @param message NodeSettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this NodeSettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for NodeSettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a DotnetSettings. */
- interface IDotnetSettings {
-
- /** DotnetSettings common */
- common?: (google.api.ICommonLanguageSettings|null);
-
- /** DotnetSettings renamedServices */
- renamedServices?: ({ [k: string]: string }|null);
-
- /** DotnetSettings renamedResources */
- renamedResources?: ({ [k: string]: string }|null);
-
- /** DotnetSettings ignoredResources */
- ignoredResources?: (string[]|null);
-
- /** DotnetSettings forcedNamespaceAliases */
- forcedNamespaceAliases?: (string[]|null);
-
- /** DotnetSettings handwrittenSignatures */
- handwrittenSignatures?: (string[]|null);
- }
-
- /** Represents a DotnetSettings. */
- class DotnetSettings implements IDotnetSettings {
-
- /**
- * Constructs a new DotnetSettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IDotnetSettings);
-
- /** DotnetSettings common. */
- public common?: (google.api.ICommonLanguageSettings|null);
-
- /** DotnetSettings renamedServices. */
- public renamedServices: { [k: string]: string };
-
- /** DotnetSettings renamedResources. */
- public renamedResources: { [k: string]: string };
-
- /** DotnetSettings ignoredResources. */
- public ignoredResources: string[];
-
- /** DotnetSettings forcedNamespaceAliases. */
- public forcedNamespaceAliases: string[];
-
- /** DotnetSettings handwrittenSignatures. */
- public handwrittenSignatures: string[];
-
- /**
- * Creates a new DotnetSettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns DotnetSettings instance
- */
- public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings;
-
- /**
- * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages.
- * @param message DotnetSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages.
- * @param message DotnetSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a DotnetSettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns DotnetSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings;
-
- /**
- * Decodes a DotnetSettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns DotnetSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings;
-
- /**
- * Verifies a DotnetSettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns DotnetSettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings;
-
- /**
- * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified.
- * @param message DotnetSettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this DotnetSettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for DotnetSettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a RubySettings. */
- interface IRubySettings {
-
- /** RubySettings common */
- common?: (google.api.ICommonLanguageSettings|null);
- }
-
- /** Represents a RubySettings. */
- class RubySettings implements IRubySettings {
-
- /**
- * Constructs a new RubySettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IRubySettings);
-
- /** RubySettings common. */
- public common?: (google.api.ICommonLanguageSettings|null);
-
- /**
- * Creates a new RubySettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns RubySettings instance
- */
- public static create(properties?: google.api.IRubySettings): google.api.RubySettings;
-
- /**
- * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages.
- * @param message RubySettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages.
- * @param message RubySettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a RubySettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns RubySettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings;
-
- /**
- * Decodes a RubySettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns RubySettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings;
-
- /**
- * Verifies a RubySettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a RubySettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns RubySettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.RubySettings;
-
- /**
- * Creates a plain object from a RubySettings message. Also converts values to other types if specified.
- * @param message RubySettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this RubySettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for RubySettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a GoSettings. */
- interface IGoSettings {
-
- /** GoSettings common */
- common?: (google.api.ICommonLanguageSettings|null);
- }
-
- /** Represents a GoSettings. */
- class GoSettings implements IGoSettings {
-
- /**
- * Constructs a new GoSettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IGoSettings);
-
- /** GoSettings common. */
- public common?: (google.api.ICommonLanguageSettings|null);
-
- /**
- * Creates a new GoSettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns GoSettings instance
- */
- public static create(properties?: google.api.IGoSettings): google.api.GoSettings;
-
- /**
- * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages.
- * @param message GoSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages.
- * @param message GoSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a GoSettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns GoSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings;
-
- /**
- * Decodes a GoSettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns GoSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings;
-
- /**
- * Verifies a GoSettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a GoSettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns GoSettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.GoSettings;
-
- /**
- * Creates a plain object from a GoSettings message. Also converts values to other types if specified.
- * @param message GoSettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this GoSettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for GoSettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a MethodSettings. */
- interface IMethodSettings {
-
- /** MethodSettings selector */
- selector?: (string|null);
-
- /** MethodSettings longRunning */
- longRunning?: (google.api.MethodSettings.ILongRunning|null);
-
- /** MethodSettings autoPopulatedFields */
- autoPopulatedFields?: (string[]|null);
- }
-
- /** Represents a MethodSettings. */
- class MethodSettings implements IMethodSettings {
-
- /**
- * Constructs a new MethodSettings.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.IMethodSettings);
-
- /** MethodSettings selector. */
- public selector: string;
-
- /** MethodSettings longRunning. */
- public longRunning?: (google.api.MethodSettings.ILongRunning|null);
-
- /** MethodSettings autoPopulatedFields. */
- public autoPopulatedFields: string[];
-
- /**
- * Creates a new MethodSettings instance using the specified properties.
- * @param [properties] Properties to set
- * @returns MethodSettings instance
- */
- public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings;
-
- /**
- * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages.
- * @param message MethodSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages.
- * @param message MethodSettings message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a MethodSettings message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns MethodSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings;
-
- /**
- * Decodes a MethodSettings message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns MethodSettings
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings;
-
- /**
- * Verifies a MethodSettings message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns MethodSettings
- */
- public static fromObject(object: { [k: string]: any }): google.api.MethodSettings;
-
- /**
- * Creates a plain object from a MethodSettings message. Also converts values to other types if specified.
- * @param message MethodSettings
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this MethodSettings to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for MethodSettings
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace MethodSettings {
-
- /** Properties of a LongRunning. */
- interface ILongRunning {
-
- /** LongRunning initialPollDelay */
- initialPollDelay?: (google.protobuf.IDuration|null);
-
- /** LongRunning pollDelayMultiplier */
- pollDelayMultiplier?: (number|null);
-
- /** LongRunning maxPollDelay */
- maxPollDelay?: (google.protobuf.IDuration|null);
-
- /** LongRunning totalPollTimeout */
- totalPollTimeout?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a LongRunning. */
- class LongRunning implements ILongRunning {
-
- /**
- * Constructs a new LongRunning.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.api.MethodSettings.ILongRunning);
-
- /** LongRunning initialPollDelay. */
- public initialPollDelay?: (google.protobuf.IDuration|null);
-
- /** LongRunning pollDelayMultiplier. */
- public pollDelayMultiplier: number;
-
- /** LongRunning maxPollDelay. */
- public maxPollDelay?: (google.protobuf.IDuration|null);
-
- /** LongRunning totalPollTimeout. */
- public totalPollTimeout?: (google.protobuf.IDuration|null);
-
- /**
- * Creates a new LongRunning instance using the specified properties.
- * @param [properties] Properties to set
- * @returns LongRunning instance
- */
- public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning;
-
- /**
- * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages.
- * @param message LongRunning message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages.
- * @param message LongRunning message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a LongRunning message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns LongRunning
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning;
-
- /**
- * Decodes a LongRunning message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns LongRunning
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning;
-
- /**
- * Verifies a LongRunning message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a LongRunning message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns LongRunning
- */
- public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning;
-
- /**
- * Creates a plain object from a LongRunning message. Also converts values to other types if specified.
- * @param message LongRunning
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this LongRunning to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for LongRunning
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** ClientLibraryOrganization enum. */
- enum ClientLibraryOrganization {
- CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0,
- CLOUD = 1,
- ADS = 2,
- PHOTOS = 3,
- STREET_VIEW = 4,
- SHOPPING = 5,
- GEO = 6,
- GENERATIVE_AI = 7
- }
-
- /** ClientLibraryDestination enum. */
- enum ClientLibraryDestination {
- CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0,
- GITHUB = 10,
- PACKAGE_MANAGER = 20
- }
-
- /** LaunchStage enum. */
- enum LaunchStage {
- LAUNCH_STAGE_UNSPECIFIED = 0,
- UNIMPLEMENTED = 6,
- PRELAUNCH = 7,
- EARLY_ACCESS = 1,
- ALPHA = 2,
- BETA = 3,
- GA = 4,
- DEPRECATED = 5
- }
- }
-
- /** Namespace protobuf. */
- namespace protobuf {
-
- /** Properties of a FileDescriptorSet. */
- interface IFileDescriptorSet {
-
- /** FileDescriptorSet file */
- file?: (google.protobuf.IFileDescriptorProto[]|null);
- }
-
- /** Represents a FileDescriptorSet. */
- class FileDescriptorSet implements IFileDescriptorSet {
-
- /**
- * Constructs a new FileDescriptorSet.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IFileDescriptorSet);
-
- /** FileDescriptorSet file. */
- public file: google.protobuf.IFileDescriptorProto[];
-
- /**
- * Creates a new FileDescriptorSet instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FileDescriptorSet instance
- */
- public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet;
-
- /**
- * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
- * @param message FileDescriptorSet message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
- * @param message FileDescriptorSet message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FileDescriptorSet message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FileDescriptorSet
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet;
-
- /**
- * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FileDescriptorSet
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet;
-
- /**
- * Verifies a FileDescriptorSet message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FileDescriptorSet
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet;
-
- /**
- * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
- * @param message FileDescriptorSet
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FileDescriptorSet to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FileDescriptorSet
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Edition enum. */
- enum Edition {
- EDITION_UNKNOWN = 0,
- EDITION_PROTO2 = 998,
- EDITION_PROTO3 = 999,
- EDITION_2023 = 1000,
- EDITION_2024 = 1001,
- EDITION_1_TEST_ONLY = 1,
- EDITION_2_TEST_ONLY = 2,
- EDITION_99997_TEST_ONLY = 99997,
- EDITION_99998_TEST_ONLY = 99998,
- EDITION_99999_TEST_ONLY = 99999,
- EDITION_MAX = 2147483647
- }
-
- /** Properties of a FileDescriptorProto. */
- interface IFileDescriptorProto {
-
- /** FileDescriptorProto name */
- name?: (string|null);
-
- /** FileDescriptorProto package */
- "package"?: (string|null);
-
- /** FileDescriptorProto dependency */
- dependency?: (string[]|null);
-
- /** FileDescriptorProto publicDependency */
- publicDependency?: (number[]|null);
-
- /** FileDescriptorProto weakDependency */
- weakDependency?: (number[]|null);
-
- /** FileDescriptorProto messageType */
- messageType?: (google.protobuf.IDescriptorProto[]|null);
-
- /** FileDescriptorProto enumType */
- enumType?: (google.protobuf.IEnumDescriptorProto[]|null);
-
- /** FileDescriptorProto service */
- service?: (google.protobuf.IServiceDescriptorProto[]|null);
-
- /** FileDescriptorProto extension */
- extension?: (google.protobuf.IFieldDescriptorProto[]|null);
-
- /** FileDescriptorProto options */
- options?: (google.protobuf.IFileOptions|null);
-
- /** FileDescriptorProto sourceCodeInfo */
- sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null);
-
- /** FileDescriptorProto syntax */
- syntax?: (string|null);
-
- /** FileDescriptorProto edition */
- edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null);
- }
-
- /** Represents a FileDescriptorProto. */
- class FileDescriptorProto implements IFileDescriptorProto {
-
- /**
- * Constructs a new FileDescriptorProto.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IFileDescriptorProto);
-
- /** FileDescriptorProto name. */
- public name: string;
-
- /** FileDescriptorProto package. */
- public package: string;
-
- /** FileDescriptorProto dependency. */
- public dependency: string[];
-
- /** FileDescriptorProto publicDependency. */
- public publicDependency: number[];
-
- /** FileDescriptorProto weakDependency. */
- public weakDependency: number[];
-
- /** FileDescriptorProto messageType. */
- public messageType: google.protobuf.IDescriptorProto[];
-
- /** FileDescriptorProto enumType. */
- public enumType: google.protobuf.IEnumDescriptorProto[];
-
- /** FileDescriptorProto service. */
- public service: google.protobuf.IServiceDescriptorProto[];
-
- /** FileDescriptorProto extension. */
- public extension: google.protobuf.IFieldDescriptorProto[];
-
- /** FileDescriptorProto options. */
- public options?: (google.protobuf.IFileOptions|null);
-
- /** FileDescriptorProto sourceCodeInfo. */
- public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null);
-
- /** FileDescriptorProto syntax. */
- public syntax: string;
-
- /** FileDescriptorProto edition. */
- public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition);
-
- /**
- * Creates a new FileDescriptorProto instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FileDescriptorProto instance
- */
- public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto;
-
- /**
- * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
- * @param message FileDescriptorProto message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
- * @param message FileDescriptorProto message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FileDescriptorProto message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FileDescriptorProto
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto;
-
- /**
- * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FileDescriptorProto
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto;
-
- /**
- * Verifies a FileDescriptorProto message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FileDescriptorProto
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto;
-
- /**
- * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
- * @param message FileDescriptorProto
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FileDescriptorProto to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FileDescriptorProto
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a DescriptorProto. */
- interface IDescriptorProto {
-
- /** DescriptorProto name */
- name?: (string|null);
-
- /** DescriptorProto field */
- field?: (google.protobuf.IFieldDescriptorProto[]|null);
-
- /** DescriptorProto extension */
- extension?: (google.protobuf.IFieldDescriptorProto[]|null);
-
- /** DescriptorProto nestedType */
- nestedType?: (google.protobuf.IDescriptorProto[]|null);
-
- /** DescriptorProto enumType */
- enumType?: (google.protobuf.IEnumDescriptorProto[]|null);
-
- /** DescriptorProto extensionRange */
- extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null);
-
- /** DescriptorProto oneofDecl */
- oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null);
-
- /** DescriptorProto options */
- options?: (google.protobuf.IMessageOptions|null);
-
- /** DescriptorProto reservedRange */
- reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null);
-
- /** DescriptorProto reservedName */
- reservedName?: (string[]|null);
- }
-
- /** 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);
-
- /** ExtensionRangeOptions declaration */
- declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null);
-
- /** ExtensionRangeOptions features */
- features?: (google.protobuf.IFeatureSet|null);
-
- /** ExtensionRangeOptions verification */
- verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null);
- }
-
- /** Represents an ExtensionRangeOptions. */
- class ExtensionRangeOptions implements IExtensionRangeOptions {
-
- /**
- * Constructs a new ExtensionRangeOptions.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IExtensionRangeOptions);
-
- /** ExtensionRangeOptions uninterpretedOption. */
- public uninterpretedOption: google.protobuf.IUninterpretedOption[];
-
- /** ExtensionRangeOptions declaration. */
- public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[];
-
- /** ExtensionRangeOptions features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /** ExtensionRangeOptions verification. */
- public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState);
-
- /**
- * Creates a new ExtensionRangeOptions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ExtensionRangeOptions instance
- */
- public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions;
-
- /**
- * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
- * @param message ExtensionRangeOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
- * @param message ExtensionRangeOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an ExtensionRangeOptions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ExtensionRangeOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions;
-
- /**
- * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ExtensionRangeOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions;
-
- /**
- * Verifies an ExtensionRangeOptions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ExtensionRangeOptions
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions;
-
- /**
- * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified.
- * @param message ExtensionRangeOptions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ExtensionRangeOptions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ExtensionRangeOptions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace ExtensionRangeOptions {
-
- /** Properties of a Declaration. */
- interface IDeclaration {
-
- /** Declaration number */
- number?: (number|null);
-
- /** Declaration fullName */
- fullName?: (string|null);
-
- /** Declaration type */
- type?: (string|null);
-
- /** Declaration reserved */
- reserved?: (boolean|null);
-
- /** Declaration repeated */
- repeated?: (boolean|null);
- }
-
- /** Represents a Declaration. */
- class Declaration implements IDeclaration {
-
- /**
- * Constructs a new Declaration.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration);
-
- /** Declaration number. */
- public number: number;
-
- /** Declaration fullName. */
- public fullName: string;
-
- /** Declaration type. */
- public type: string;
-
- /** Declaration reserved. */
- public reserved: boolean;
-
- /** Declaration repeated. */
- public repeated: boolean;
-
- /**
- * Creates a new Declaration instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Declaration instance
- */
- public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration;
-
- /**
- * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages.
- * @param message Declaration message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages.
- * @param message Declaration message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Declaration message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Declaration
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration;
-
- /**
- * Decodes a Declaration message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Declaration
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration;
-
- /**
- * Verifies a Declaration message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Declaration message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Declaration
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration;
-
- /**
- * Creates a plain object from a Declaration message. Also converts values to other types if specified.
- * @param message Declaration
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Declaration to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Declaration
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** VerificationState enum. */
- enum VerificationState {
- DECLARATION = 0,
- UNVERIFIED = 1
- }
- }
-
- /** Properties of a FieldDescriptorProto. */
- interface IFieldDescriptorProto {
-
- /** FieldDescriptorProto name */
- name?: (string|null);
-
- /** FieldDescriptorProto number */
- number?: (number|null);
-
- /** FieldDescriptorProto label */
- label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null);
-
- /** FieldDescriptorProto type */
- type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null);
-
- /** FieldDescriptorProto typeName */
- typeName?: (string|null);
-
- /** FieldDescriptorProto extendee */
- extendee?: (string|null);
-
- /** FieldDescriptorProto defaultValue */
- defaultValue?: (string|null);
-
- /** FieldDescriptorProto oneofIndex */
- oneofIndex?: (number|null);
-
- /** FieldDescriptorProto jsonName */
- jsonName?: (string|null);
-
- /** FieldDescriptorProto options */
- options?: (google.protobuf.IFieldOptions|null);
-
- /** FieldDescriptorProto proto3Optional */
- proto3Optional?: (boolean|null);
- }
-
- /** Represents a FieldDescriptorProto. */
- class FieldDescriptorProto implements IFieldDescriptorProto {
-
- /**
- * Constructs a new FieldDescriptorProto.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IFieldDescriptorProto);
-
- /** FieldDescriptorProto name. */
- public name: string;
-
- /** FieldDescriptorProto number. */
- public number: number;
-
- /** FieldDescriptorProto label. */
- public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label);
-
- /** FieldDescriptorProto type. */
- public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type);
-
- /** FieldDescriptorProto typeName. */
- public typeName: string;
-
- /** FieldDescriptorProto extendee. */
- public extendee: string;
-
- /** FieldDescriptorProto defaultValue. */
- public defaultValue: string;
-
- /** FieldDescriptorProto oneofIndex. */
- public oneofIndex: number;
-
- /** FieldDescriptorProto jsonName. */
- public jsonName: string;
-
- /** FieldDescriptorProto options. */
- public options?: (google.protobuf.IFieldOptions|null);
-
- /** FieldDescriptorProto proto3Optional. */
- public proto3Optional: boolean;
-
- /**
- * Creates a new FieldDescriptorProto instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FieldDescriptorProto instance
- */
- public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto;
-
- /**
- * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
- * @param message FieldDescriptorProto message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
- * @param message FieldDescriptorProto message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FieldDescriptorProto message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FieldDescriptorProto
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto;
-
- /**
- * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FieldDescriptorProto
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto;
-
- /**
- * Verifies a FieldDescriptorProto message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FieldDescriptorProto
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto;
-
- /**
- * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
- * @param message FieldDescriptorProto
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FieldDescriptorProto to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FieldDescriptorProto
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace FieldDescriptorProto {
-
- /** Type enum. */
- enum Type {
- TYPE_DOUBLE = 1,
- TYPE_FLOAT = 2,
- TYPE_INT64 = 3,
- TYPE_UINT64 = 4,
- TYPE_INT32 = 5,
- TYPE_FIXED64 = 6,
- TYPE_FIXED32 = 7,
- TYPE_BOOL = 8,
- TYPE_STRING = 9,
- TYPE_GROUP = 10,
- TYPE_MESSAGE = 11,
- TYPE_BYTES = 12,
- TYPE_UINT32 = 13,
- TYPE_ENUM = 14,
- TYPE_SFIXED32 = 15,
- TYPE_SFIXED64 = 16,
- TYPE_SINT32 = 17,
- TYPE_SINT64 = 18
- }
-
- /** Label enum. */
- enum Label {
- LABEL_OPTIONAL = 1,
- LABEL_REPEATED = 3,
- LABEL_REQUIRED = 2
- }
- }
-
- /** Properties of an OneofDescriptorProto. */
- interface IOneofDescriptorProto {
-
- /** OneofDescriptorProto name */
- name?: (string|null);
-
- /** OneofDescriptorProto options */
- options?: (google.protobuf.IOneofOptions|null);
- }
-
- /** Represents an OneofDescriptorProto. */
- class OneofDescriptorProto implements IOneofDescriptorProto {
-
- /**
- * Constructs a new OneofDescriptorProto.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IOneofDescriptorProto);
-
- /** OneofDescriptorProto name. */
- public name: string;
-
- /** OneofDescriptorProto options. */
- public options?: (google.protobuf.IOneofOptions|null);
-
- /**
- * Creates a new OneofDescriptorProto instance using the specified properties.
- * @param [properties] Properties to set
- * @returns OneofDescriptorProto instance
- */
- public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto;
-
- /**
- * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
- * @param message OneofDescriptorProto message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
- * @param message OneofDescriptorProto message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an OneofDescriptorProto message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns OneofDescriptorProto
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto;
-
- /**
- * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns OneofDescriptorProto
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto;
-
- /**
- * Verifies an OneofDescriptorProto message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns OneofDescriptorProto
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto;
-
- /**
- * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.
- * @param message OneofDescriptorProto
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this OneofDescriptorProto to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for OneofDescriptorProto
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of an EnumDescriptorProto. */
- interface IEnumDescriptorProto {
-
- /** EnumDescriptorProto name */
- name?: (string|null);
-
- /** EnumDescriptorProto value */
- value?: (google.protobuf.IEnumValueDescriptorProto[]|null);
-
- /** EnumDescriptorProto options */
- options?: (google.protobuf.IEnumOptions|null);
-
- /** EnumDescriptorProto reservedRange */
- reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null);
-
- /** EnumDescriptorProto reservedName */
- reservedName?: (string[]|null);
- }
-
- /** 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 deprecated */
- deprecated?: (boolean|null);
-
- /** FileOptions ccEnableArenas */
- ccEnableArenas?: (boolean|null);
-
- /** FileOptions objcClassPrefix */
- objcClassPrefix?: (string|null);
-
- /** FileOptions csharpNamespace */
- csharpNamespace?: (string|null);
-
- /** FileOptions swiftPrefix */
- swiftPrefix?: (string|null);
-
- /** FileOptions phpClassPrefix */
- phpClassPrefix?: (string|null);
-
- /** FileOptions phpNamespace */
- phpNamespace?: (string|null);
-
- /** FileOptions phpMetadataNamespace */
- phpMetadataNamespace?: (string|null);
-
- /** FileOptions rubyPackage */
- rubyPackage?: (string|null);
-
- /** FileOptions features */
- features?: (google.protobuf.IFeatureSet|null);
-
- /** FileOptions uninterpretedOption */
- uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
- }
-
- /** Represents a FileOptions. */
- class FileOptions implements IFileOptions {
-
- /**
- * Constructs a new FileOptions.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IFileOptions);
-
- /** FileOptions javaPackage. */
- public javaPackage: string;
-
- /** FileOptions javaOuterClassname. */
- public javaOuterClassname: string;
-
- /** FileOptions javaMultipleFiles. */
- public javaMultipleFiles: boolean;
-
- /** FileOptions javaGenerateEqualsAndHash. */
- public javaGenerateEqualsAndHash: boolean;
-
- /** FileOptions javaStringCheckUtf8. */
- public javaStringCheckUtf8: boolean;
-
- /** FileOptions optimizeFor. */
- public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode);
-
- /** FileOptions goPackage. */
- public goPackage: string;
-
- /** FileOptions ccGenericServices. */
- public ccGenericServices: boolean;
-
- /** FileOptions javaGenericServices. */
- public javaGenericServices: boolean;
-
- /** FileOptions pyGenericServices. */
- public pyGenericServices: boolean;
-
- /** FileOptions deprecated. */
- public deprecated: boolean;
-
- /** FileOptions ccEnableArenas. */
- public ccEnableArenas: boolean;
-
- /** FileOptions objcClassPrefix. */
- public objcClassPrefix: string;
-
- /** FileOptions csharpNamespace. */
- public csharpNamespace: string;
-
- /** FileOptions swiftPrefix. */
- public swiftPrefix: string;
-
- /** FileOptions phpClassPrefix. */
- public phpClassPrefix: string;
-
- /** FileOptions phpNamespace. */
- public phpNamespace: string;
-
- /** FileOptions phpMetadataNamespace. */
- public phpMetadataNamespace: string;
-
- /** FileOptions rubyPackage. */
- public rubyPackage: string;
-
- /** FileOptions features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /** FileOptions uninterpretedOption. */
- public uninterpretedOption: google.protobuf.IUninterpretedOption[];
-
- /**
- * Creates a new FileOptions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FileOptions instance
- */
- public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions;
-
- /**
- * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
- * @param message FileOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
- * @param message FileOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FileOptions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FileOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions;
-
- /**
- * Decodes a FileOptions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FileOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions;
-
- /**
- * Verifies a FileOptions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FileOptions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FileOptions
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions;
-
- /**
- * Creates a plain object from a FileOptions message. Also converts values to other types if specified.
- * @param message FileOptions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FileOptions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FileOptions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace FileOptions {
-
- /** OptimizeMode enum. */
- enum OptimizeMode {
- SPEED = 1,
- CODE_SIZE = 2,
- LITE_RUNTIME = 3
- }
- }
-
- /** Properties of a MessageOptions. */
- interface IMessageOptions {
-
- /** MessageOptions messageSetWireFormat */
- messageSetWireFormat?: (boolean|null);
-
- /** MessageOptions noStandardDescriptorAccessor */
- noStandardDescriptorAccessor?: (boolean|null);
-
- /** MessageOptions deprecated */
- deprecated?: (boolean|null);
-
- /** MessageOptions mapEntry */
- mapEntry?: (boolean|null);
-
- /** MessageOptions deprecatedLegacyJsonFieldConflicts */
- deprecatedLegacyJsonFieldConflicts?: (boolean|null);
-
- /** MessageOptions features */
- features?: (google.protobuf.IFeatureSet|null);
-
- /** MessageOptions uninterpretedOption */
- uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
- }
-
- /** Represents a MessageOptions. */
- class MessageOptions implements IMessageOptions {
-
- /**
- * Constructs a new MessageOptions.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IMessageOptions);
-
- /** MessageOptions messageSetWireFormat. */
- public messageSetWireFormat: boolean;
-
- /** MessageOptions noStandardDescriptorAccessor. */
- public noStandardDescriptorAccessor: boolean;
-
- /** MessageOptions deprecated. */
- public deprecated: boolean;
-
- /** MessageOptions mapEntry. */
- public mapEntry: boolean;
-
- /** MessageOptions deprecatedLegacyJsonFieldConflicts. */
- public deprecatedLegacyJsonFieldConflicts: boolean;
-
- /** MessageOptions features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /** MessageOptions uninterpretedOption. */
- public uninterpretedOption: google.protobuf.IUninterpretedOption[];
-
- /**
- * Creates a new MessageOptions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns MessageOptions instance
- */
- public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions;
-
- /**
- * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
- * @param message MessageOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
- * @param message MessageOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a MessageOptions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns MessageOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions;
-
- /**
- * Decodes a MessageOptions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns MessageOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions;
-
- /**
- * Verifies a MessageOptions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns MessageOptions
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions;
-
- /**
- * Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
- * @param message MessageOptions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this MessageOptions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for MessageOptions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a FieldOptions. */
- interface IFieldOptions {
-
- /** FieldOptions ctype */
- ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null);
-
- /** FieldOptions packed */
- packed?: (boolean|null);
-
- /** FieldOptions jstype */
- jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null);
-
- /** FieldOptions lazy */
- lazy?: (boolean|null);
-
- /** FieldOptions unverifiedLazy */
- unverifiedLazy?: (boolean|null);
-
- /** FieldOptions deprecated */
- deprecated?: (boolean|null);
-
- /** FieldOptions weak */
- weak?: (boolean|null);
-
- /** FieldOptions debugRedact */
- debugRedact?: (boolean|null);
-
- /** FieldOptions retention */
- retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null);
-
- /** FieldOptions targets */
- targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null);
-
- /** FieldOptions editionDefaults */
- editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null);
-
- /** FieldOptions features */
- features?: (google.protobuf.IFeatureSet|null);
-
- /** FieldOptions uninterpretedOption */
- uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|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 debugRedact. */
- public debugRedact: boolean;
-
- /** FieldOptions retention. */
- public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention);
-
- /** FieldOptions targets. */
- public targets: google.protobuf.FieldOptions.OptionTargetType[];
-
- /** FieldOptions editionDefaults. */
- public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[];
-
- /** FieldOptions features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /** FieldOptions uninterpretedOption. */
- public uninterpretedOption: google.protobuf.IUninterpretedOption[];
-
- /**
- * Creates a new FieldOptions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FieldOptions instance
- */
- public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions;
-
- /**
- * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
- * @param message FieldOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
- * @param message FieldOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FieldOptions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FieldOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions;
-
- /**
- * Decodes a FieldOptions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FieldOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions;
-
- /**
- * Verifies a FieldOptions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FieldOptions
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions;
-
- /**
- * Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
- * @param message FieldOptions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FieldOptions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FieldOptions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace FieldOptions {
-
- /** CType enum. */
- enum CType {
- STRING = 0,
- CORD = 1,
- STRING_PIECE = 2
- }
-
- /** JSType enum. */
- enum JSType {
- JS_NORMAL = 0,
- JS_STRING = 1,
- JS_NUMBER = 2
- }
-
- /** OptionRetention enum. */
- enum OptionRetention {
- RETENTION_UNKNOWN = 0,
- RETENTION_RUNTIME = 1,
- RETENTION_SOURCE = 2
- }
-
- /** OptionTargetType enum. */
- enum OptionTargetType {
- TARGET_TYPE_UNKNOWN = 0,
- TARGET_TYPE_FILE = 1,
- TARGET_TYPE_EXTENSION_RANGE = 2,
- TARGET_TYPE_MESSAGE = 3,
- TARGET_TYPE_FIELD = 4,
- TARGET_TYPE_ONEOF = 5,
- TARGET_TYPE_ENUM = 6,
- TARGET_TYPE_ENUM_ENTRY = 7,
- TARGET_TYPE_SERVICE = 8,
- TARGET_TYPE_METHOD = 9
- }
-
- /** Properties of an EditionDefault. */
- interface IEditionDefault {
-
- /** EditionDefault edition */
- edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null);
-
- /** EditionDefault value */
- value?: (string|null);
- }
-
- /** Represents an EditionDefault. */
- class EditionDefault implements IEditionDefault {
-
- /**
- * Constructs a new EditionDefault.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.FieldOptions.IEditionDefault);
-
- /** EditionDefault edition. */
- public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition);
-
- /** EditionDefault value. */
- public value: string;
-
- /**
- * Creates a new EditionDefault instance using the specified properties.
- * @param [properties] Properties to set
- * @returns EditionDefault instance
- */
- public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault;
-
- /**
- * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages.
- * @param message EditionDefault message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages.
- * @param message EditionDefault message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an EditionDefault message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns EditionDefault
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault;
-
- /**
- * Decodes an EditionDefault message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns EditionDefault
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault;
-
- /**
- * Verifies an EditionDefault message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns EditionDefault
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault;
-
- /**
- * Creates a plain object from an EditionDefault message. Also converts values to other types if specified.
- * @param message EditionDefault
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this EditionDefault to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for EditionDefault
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of an OneofOptions. */
- interface IOneofOptions {
-
- /** OneofOptions features */
- features?: (google.protobuf.IFeatureSet|null);
-
- /** OneofOptions uninterpretedOption */
- uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
- }
-
- /** Represents an OneofOptions. */
- class OneofOptions implements IOneofOptions {
-
- /**
- * Constructs a new OneofOptions.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IOneofOptions);
-
- /** OneofOptions features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /** OneofOptions uninterpretedOption. */
- public uninterpretedOption: google.protobuf.IUninterpretedOption[];
-
- /**
- * Creates a new OneofOptions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns OneofOptions instance
- */
- public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions;
-
- /**
- * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
- * @param message OneofOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
- * @param message OneofOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an OneofOptions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns OneofOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions;
-
- /**
- * Decodes an OneofOptions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns OneofOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions;
-
- /**
- * Verifies an OneofOptions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns OneofOptions
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions;
-
- /**
- * Creates a plain object from an OneofOptions message. Also converts values to other types if specified.
- * @param message OneofOptions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this OneofOptions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for OneofOptions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of an EnumOptions. */
- interface IEnumOptions {
-
- /** EnumOptions allowAlias */
- allowAlias?: (boolean|null);
-
- /** EnumOptions deprecated */
- deprecated?: (boolean|null);
-
- /** EnumOptions deprecatedLegacyJsonFieldConflicts */
- deprecatedLegacyJsonFieldConflicts?: (boolean|null);
-
- /** EnumOptions features */
- features?: (google.protobuf.IFeatureSet|null);
-
- /** EnumOptions uninterpretedOption */
- uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
- }
-
- /** Represents an EnumOptions. */
- class EnumOptions implements IEnumOptions {
-
- /**
- * Constructs a new EnumOptions.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IEnumOptions);
-
- /** EnumOptions allowAlias. */
- public allowAlias: boolean;
-
- /** EnumOptions deprecated. */
- public deprecated: boolean;
-
- /** EnumOptions deprecatedLegacyJsonFieldConflicts. */
- public deprecatedLegacyJsonFieldConflicts: boolean;
-
- /** EnumOptions features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /** EnumOptions uninterpretedOption. */
- public uninterpretedOption: google.protobuf.IUninterpretedOption[];
-
- /**
- * Creates a new EnumOptions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns EnumOptions instance
- */
- public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions;
-
- /**
- * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
- * @param message EnumOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
- * @param message EnumOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an EnumOptions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns EnumOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions;
-
- /**
- * Decodes an EnumOptions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns EnumOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions;
-
- /**
- * Verifies an EnumOptions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns EnumOptions
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions;
-
- /**
- * Creates a plain object from an EnumOptions message. Also converts values to other types if specified.
- * @param message EnumOptions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this EnumOptions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for EnumOptions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of an EnumValueOptions. */
- interface IEnumValueOptions {
-
- /** EnumValueOptions deprecated */
- deprecated?: (boolean|null);
-
- /** EnumValueOptions features */
- features?: (google.protobuf.IFeatureSet|null);
-
- /** EnumValueOptions debugRedact */
- debugRedact?: (boolean|null);
-
- /** EnumValueOptions uninterpretedOption */
- uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
- }
-
- /** Represents an EnumValueOptions. */
- class EnumValueOptions implements IEnumValueOptions {
-
- /**
- * Constructs a new EnumValueOptions.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IEnumValueOptions);
-
- /** EnumValueOptions deprecated. */
- public deprecated: boolean;
-
- /** EnumValueOptions features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /** EnumValueOptions debugRedact. */
- public debugRedact: boolean;
-
- /** EnumValueOptions uninterpretedOption. */
- public uninterpretedOption: google.protobuf.IUninterpretedOption[];
-
- /**
- * Creates a new EnumValueOptions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns EnumValueOptions instance
- */
- public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions;
-
- /**
- * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
- * @param message EnumValueOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
- * @param message EnumValueOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an EnumValueOptions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns EnumValueOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions;
-
- /**
- * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns EnumValueOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions;
-
- /**
- * Verifies an EnumValueOptions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns EnumValueOptions
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions;
-
- /**
- * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.
- * @param message EnumValueOptions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this EnumValueOptions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for EnumValueOptions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a ServiceOptions. */
- interface IServiceOptions {
-
- /** ServiceOptions features */
- features?: (google.protobuf.IFeatureSet|null);
-
- /** ServiceOptions deprecated */
- deprecated?: (boolean|null);
-
- /** ServiceOptions uninterpretedOption */
- uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
-
- /** ServiceOptions .google.api.defaultHost */
- ".google.api.defaultHost"?: (string|null);
-
- /** ServiceOptions .google.api.oauthScopes */
- ".google.api.oauthScopes"?: (string|null);
- }
-
- /** Represents a ServiceOptions. */
- class ServiceOptions implements IServiceOptions {
-
- /**
- * Constructs a new ServiceOptions.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IServiceOptions);
-
- /** ServiceOptions features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /** ServiceOptions deprecated. */
- public deprecated: boolean;
-
- /** ServiceOptions uninterpretedOption. */
- public uninterpretedOption: google.protobuf.IUninterpretedOption[];
-
- /**
- * Creates a new ServiceOptions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ServiceOptions instance
- */
- public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions;
-
- /**
- * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
- * @param message ServiceOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
- * @param message ServiceOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a ServiceOptions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ServiceOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions;
-
- /**
- * Decodes a ServiceOptions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ServiceOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions;
-
- /**
- * Verifies a ServiceOptions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ServiceOptions
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions;
-
- /**
- * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.
- * @param message ServiceOptions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ServiceOptions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ServiceOptions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a MethodOptions. */
- interface IMethodOptions {
-
- /** MethodOptions deprecated */
- deprecated?: (boolean|null);
-
- /** MethodOptions idempotencyLevel */
- idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null);
-
- /** MethodOptions features */
- features?: (google.protobuf.IFeatureSet|null);
-
- /** MethodOptions uninterpretedOption */
- uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);
-
- /** MethodOptions .google.api.http */
- ".google.api.http"?: (google.api.IHttpRule|null);
-
- /** MethodOptions .google.api.methodSignature */
- ".google.api.methodSignature"?: (string[]|null);
-
- /** 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 features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /** MethodOptions uninterpretedOption. */
- public uninterpretedOption: google.protobuf.IUninterpretedOption[];
-
- /**
- * Creates a new MethodOptions instance using the specified properties.
- * @param [properties] Properties to set
- * @returns MethodOptions instance
- */
- public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions;
-
- /**
- * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
- * @param message MethodOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
- * @param message MethodOptions message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a MethodOptions message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns MethodOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions;
-
- /**
- * Decodes a MethodOptions message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns MethodOptions
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions;
-
- /**
- * Verifies a MethodOptions message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns MethodOptions
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions;
-
- /**
- * Creates a plain object from a MethodOptions message. Also converts values to other types if specified.
- * @param message MethodOptions
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this MethodOptions to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for MethodOptions
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace MethodOptions {
-
- /** IdempotencyLevel enum. */
- enum IdempotencyLevel {
- IDEMPOTENCY_UNKNOWN = 0,
- NO_SIDE_EFFECTS = 1,
- IDEMPOTENT = 2
- }
- }
-
- /** Properties of an UninterpretedOption. */
- interface IUninterpretedOption {
-
- /** UninterpretedOption name */
- name?: (google.protobuf.UninterpretedOption.INamePart[]|null);
-
- /** UninterpretedOption identifierValue */
- identifierValue?: (string|null);
-
- /** UninterpretedOption positiveIntValue */
- positiveIntValue?: (number|Long|string|null);
-
- /** UninterpretedOption negativeIntValue */
- negativeIntValue?: (number|Long|string|null);
-
- /** UninterpretedOption doubleValue */
- doubleValue?: (number|null);
-
- /** UninterpretedOption stringValue */
- stringValue?: (Uint8Array|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 FeatureSet. */
- interface IFeatureSet {
-
- /** FeatureSet fieldPresence */
- fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null);
-
- /** FeatureSet enumType */
- enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null);
-
- /** FeatureSet repeatedFieldEncoding */
- repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null);
-
- /** FeatureSet utf8Validation */
- utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null);
-
- /** FeatureSet messageEncoding */
- messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null);
-
- /** FeatureSet jsonFormat */
- jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null);
- }
-
- /** Represents a FeatureSet. */
- class FeatureSet implements IFeatureSet {
-
- /**
- * Constructs a new FeatureSet.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IFeatureSet);
-
- /** FeatureSet fieldPresence. */
- public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence);
-
- /** FeatureSet enumType. */
- public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType);
-
- /** FeatureSet repeatedFieldEncoding. */
- public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding);
-
- /** FeatureSet utf8Validation. */
- public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation);
-
- /** FeatureSet messageEncoding. */
- public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding);
-
- /** FeatureSet jsonFormat. */
- public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat);
-
- /**
- * Creates a new FeatureSet instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FeatureSet instance
- */
- public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet;
-
- /**
- * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages.
- * @param message FeatureSet message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages.
- * @param message FeatureSet message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FeatureSet message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FeatureSet
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet;
-
- /**
- * Decodes a FeatureSet message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FeatureSet
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet;
-
- /**
- * Verifies a FeatureSet message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FeatureSet
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet;
-
- /**
- * Creates a plain object from a FeatureSet message. Also converts values to other types if specified.
- * @param message FeatureSet
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FeatureSet to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FeatureSet
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace FeatureSet {
-
- /** FieldPresence enum. */
- enum FieldPresence {
- FIELD_PRESENCE_UNKNOWN = 0,
- EXPLICIT = 1,
- IMPLICIT = 2,
- LEGACY_REQUIRED = 3
- }
-
- /** EnumType enum. */
- enum EnumType {
- ENUM_TYPE_UNKNOWN = 0,
- OPEN = 1,
- CLOSED = 2
- }
-
- /** RepeatedFieldEncoding enum. */
- enum RepeatedFieldEncoding {
- REPEATED_FIELD_ENCODING_UNKNOWN = 0,
- PACKED = 1,
- EXPANDED = 2
- }
-
- /** Utf8Validation enum. */
- enum Utf8Validation {
- UTF8_VALIDATION_UNKNOWN = 0,
- VERIFY = 2,
- NONE = 3
- }
-
- /** MessageEncoding enum. */
- enum MessageEncoding {
- MESSAGE_ENCODING_UNKNOWN = 0,
- LENGTH_PREFIXED = 1,
- DELIMITED = 2
- }
-
- /** JsonFormat enum. */
- enum JsonFormat {
- JSON_FORMAT_UNKNOWN = 0,
- ALLOW = 1,
- LEGACY_BEST_EFFORT = 2
- }
- }
-
- /** Properties of a FeatureSetDefaults. */
- interface IFeatureSetDefaults {
-
- /** FeatureSetDefaults defaults */
- defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null);
-
- /** FeatureSetDefaults minimumEdition */
- minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null);
-
- /** FeatureSetDefaults maximumEdition */
- maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null);
- }
-
- /** Represents a FeatureSetDefaults. */
- class FeatureSetDefaults implements IFeatureSetDefaults {
-
- /**
- * Constructs a new FeatureSetDefaults.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IFeatureSetDefaults);
-
- /** FeatureSetDefaults defaults. */
- public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[];
-
- /** FeatureSetDefaults minimumEdition. */
- public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition);
-
- /** FeatureSetDefaults maximumEdition. */
- public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition);
-
- /**
- * Creates a new FeatureSetDefaults instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FeatureSetDefaults instance
- */
- public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults;
-
- /**
- * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages.
- * @param message FeatureSetDefaults message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages.
- * @param message FeatureSetDefaults message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FeatureSetDefaults message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FeatureSetDefaults
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults;
-
- /**
- * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FeatureSetDefaults
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults;
-
- /**
- * Verifies a FeatureSetDefaults message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FeatureSetDefaults
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults;
-
- /**
- * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified.
- * @param message FeatureSetDefaults
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FeatureSetDefaults to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FeatureSetDefaults
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace FeatureSetDefaults {
-
- /** Properties of a FeatureSetEditionDefault. */
- interface IFeatureSetEditionDefault {
-
- /** FeatureSetEditionDefault edition */
- edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null);
-
- /** FeatureSetEditionDefault features */
- features?: (google.protobuf.IFeatureSet|null);
- }
-
- /** Represents a FeatureSetEditionDefault. */
- class FeatureSetEditionDefault implements IFeatureSetEditionDefault {
-
- /**
- * Constructs a new FeatureSetEditionDefault.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault);
-
- /** FeatureSetEditionDefault edition. */
- public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition);
-
- /** FeatureSetEditionDefault features. */
- public features?: (google.protobuf.IFeatureSet|null);
-
- /**
- * Creates a new FeatureSetEditionDefault instance using the specified properties.
- * @param [properties] Properties to set
- * @returns FeatureSetEditionDefault instance
- */
- public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;
-
- /**
- * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages.
- * @param message FeatureSetEditionDefault message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages.
- * @param message FeatureSetEditionDefault message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a FeatureSetEditionDefault message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns FeatureSetEditionDefault
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;
-
- /**
- * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns FeatureSetEditionDefault
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;
-
- /**
- * Verifies a FeatureSetEditionDefault message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns FeatureSetEditionDefault
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;
-
- /**
- * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified.
- * @param message FeatureSetEditionDefault
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this FeatureSetEditionDefault to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for FeatureSetEditionDefault
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a SourceCodeInfo. */
- interface ISourceCodeInfo {
-
- /** SourceCodeInfo location */
- location?: (google.protobuf.SourceCodeInfo.ILocation[]|null);
- }
-
- /** Represents a SourceCodeInfo. */
- class SourceCodeInfo implements ISourceCodeInfo {
-
- /**
- * Constructs a new SourceCodeInfo.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.ISourceCodeInfo);
-
- /** SourceCodeInfo location. */
- public location: google.protobuf.SourceCodeInfo.ILocation[];
-
- /**
- * Creates a new SourceCodeInfo instance using the specified properties.
- * @param [properties] Properties to set
- * @returns SourceCodeInfo instance
- */
- public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo;
-
- /**
- * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
- * @param message SourceCodeInfo message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
- * @param message SourceCodeInfo message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a SourceCodeInfo message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns SourceCodeInfo
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo;
-
- /**
- * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns SourceCodeInfo
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo;
-
- /**
- * Verifies a SourceCodeInfo message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns SourceCodeInfo
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo;
-
- /**
- * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified.
- * @param message SourceCodeInfo
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this SourceCodeInfo to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for SourceCodeInfo
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace SourceCodeInfo {
-
- /** Properties of a Location. */
- interface ILocation {
-
- /** Location path */
- path?: (number[]|null);
-
- /** Location span */
- span?: (number[]|null);
-
- /** Location leadingComments */
- leadingComments?: (string|null);
-
- /** Location trailingComments */
- trailingComments?: (string|null);
-
- /** Location leadingDetachedComments */
- leadingDetachedComments?: (string[]|null);
- }
-
- /** Represents a Location. */
- class Location implements ILocation {
-
- /**
- * Constructs a new Location.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.SourceCodeInfo.ILocation);
-
- /** Location path. */
- public path: number[];
-
- /** Location span. */
- public span: number[];
-
- /** Location leadingComments. */
- public leadingComments: string;
-
- /** Location trailingComments. */
- public trailingComments: string;
-
- /** Location leadingDetachedComments. */
- public leadingDetachedComments: string[];
-
- /**
- * Creates a new Location instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Location instance
- */
- public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location;
-
- /**
- * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
- * @param message Location message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
- * @param message Location message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Location message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Location
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location;
-
- /**
- * Decodes a Location message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Location
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location;
-
- /**
- * Verifies a Location message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Location message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Location
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location;
-
- /**
- * Creates a plain object from a Location message. Also converts values to other types if specified.
- * @param message Location
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Location to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Location
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Properties of a GeneratedCodeInfo. */
- interface IGeneratedCodeInfo {
-
- /** GeneratedCodeInfo annotation */
- annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null);
- }
-
- /** Represents a GeneratedCodeInfo. */
- class GeneratedCodeInfo implements IGeneratedCodeInfo {
-
- /**
- * Constructs a new GeneratedCodeInfo.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.IGeneratedCodeInfo);
-
- /** GeneratedCodeInfo annotation. */
- public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[];
-
- /**
- * Creates a new GeneratedCodeInfo instance using the specified properties.
- * @param [properties] Properties to set
- * @returns GeneratedCodeInfo instance
- */
- public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo;
-
- /**
- * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
- * @param message GeneratedCodeInfo message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
- * @param message GeneratedCodeInfo message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a GeneratedCodeInfo message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns GeneratedCodeInfo
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo;
-
- /**
- * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns GeneratedCodeInfo
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo;
-
- /**
- * Verifies a GeneratedCodeInfo message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns GeneratedCodeInfo
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo;
-
- /**
- * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified.
- * @param message GeneratedCodeInfo
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this GeneratedCodeInfo to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for GeneratedCodeInfo
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace GeneratedCodeInfo {
-
- /** Properties of an Annotation. */
- interface IAnnotation {
-
- /** Annotation path */
- path?: (number[]|null);
-
- /** Annotation sourceFile */
- sourceFile?: (string|null);
-
- /** Annotation begin */
- begin?: (number|null);
-
- /** Annotation end */
- end?: (number|null);
-
- /** Annotation semantic */
- semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null);
- }
-
- /** Represents an Annotation. */
- class Annotation implements IAnnotation {
-
- /**
- * Constructs a new Annotation.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation);
-
- /** Annotation path. */
- public path: number[];
-
- /** Annotation sourceFile. */
- public sourceFile: string;
-
- /** Annotation begin. */
- public begin: number;
-
- /** Annotation end. */
- public end: number;
-
- /** Annotation semantic. */
- public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic);
-
- /**
- * Creates a new Annotation instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Annotation instance
- */
- public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation;
-
- /**
- * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
- * @param message Annotation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
- * @param message Annotation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an Annotation message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Annotation
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation;
-
- /**
- * Decodes an Annotation message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Annotation
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation;
-
- /**
- * Verifies an Annotation message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an Annotation message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Annotation
- */
- public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation;
-
- /**
- * Creates a plain object from an Annotation message. Also converts values to other types if specified.
- * @param message Annotation
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Annotation to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Annotation
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- namespace Annotation {
-
- /** Semantic enum. */
- enum Semantic {
- NONE = 0,
- SET = 1,
- ALIAS = 2
- }
- }
- }
-
- /** 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 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 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 longrunning. */
- namespace longrunning {
-
- /** Represents an Operations */
- class Operations extends $protobuf.rpc.Service {
-
- /**
- * Constructs a new Operations service.
- * @param rpcImpl RPC implementation
- * @param [requestDelimited=false] Whether requests are length-delimited
- * @param [responseDelimited=false] Whether responses are length-delimited
- */
- constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
-
- /**
- * Creates new Operations service using the specified rpc implementation.
- * @param rpcImpl RPC implementation
- * @param [requestDelimited=false] Whether requests are length-delimited
- * @param [responseDelimited=false] Whether responses are length-delimited
- * @returns RPC service. Useful where requests and/or responses are streamed.
- */
- public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations;
-
- /**
- * Calls ListOperations.
- * @param request ListOperationsRequest message or plain object
- * @param callback Node-style callback called with the error, if any, and ListOperationsResponse
- */
- public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void;
-
- /**
- * Calls ListOperations.
- * @param request ListOperationsRequest message or plain object
- * @returns Promise
- */
- public listOperations(request: google.longrunning.IListOperationsRequest): Promise;
-
- /**
- * Calls GetOperation.
- * @param request GetOperationRequest message or plain object
- * @param callback Node-style callback called with the error, if any, and Operation
- */
- public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void;
-
- /**
- * Calls GetOperation.
- * @param request GetOperationRequest message or plain object
- * @returns Promise
- */
- public getOperation(request: google.longrunning.IGetOperationRequest): Promise;
-
- /**
- * Calls DeleteOperation.
- * @param request DeleteOperationRequest message or plain object
- * @param callback Node-style callback called with the error, if any, and Empty
- */
- public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void;
-
- /**
- * Calls DeleteOperation.
- * @param request DeleteOperationRequest message or plain object
- * @returns Promise
- */
- public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise;
-
- /**
- * Calls CancelOperation.
- * @param request CancelOperationRequest message or plain object
- * @param callback Node-style callback called with the error, if any, and Empty
- */
- public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void;
-
- /**
- * Calls CancelOperation.
- * @param request CancelOperationRequest message or plain object
- * @returns Promise
- */
- public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise;
-
- /**
- * Calls WaitOperation.
- * @param request WaitOperationRequest message or plain object
- * @param callback Node-style callback called with the error, if any, and Operation
- */
- public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void;
-
- /**
- * Calls WaitOperation.
- * @param request WaitOperationRequest message or plain object
- * @returns Promise
- */
- public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise;
- }
-
- namespace Operations {
-
- /**
- * Callback as used by {@link google.longrunning.Operations|listOperations}.
- * @param error Error, if any
- * @param [response] ListOperationsResponse
- */
- type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void;
-
- /**
- * Callback as used by {@link google.longrunning.Operations|getOperation}.
- * @param error Error, if any
- * @param [response] Operation
- */
- type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void;
-
- /**
- * Callback as used by {@link google.longrunning.Operations|deleteOperation}.
- * @param error Error, if any
- * @param [response] Empty
- */
- type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;
-
- /**
- * Callback as used by {@link google.longrunning.Operations|cancelOperation}.
- * @param error Error, if any
- * @param [response] Empty
- */
- type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;
-
- /**
- * Callback as used by {@link google.longrunning.Operations|waitOperation}.
- * @param error Error, if any
- * @param [response] Operation
- */
- type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void;
- }
-
- /** Properties of an Operation. */
- interface IOperation {
-
- /** Operation name */
- name?: (string|null);
-
- /** Operation metadata */
- metadata?: (google.protobuf.IAny|null);
-
- /** Operation done */
- done?: (boolean|null);
-
- /** Operation error */
- error?: (google.rpc.IStatus|null);
-
- /** Operation response */
- response?: (google.protobuf.IAny|null);
- }
-
- /** Represents an Operation. */
- class Operation implements IOperation {
-
- /**
- * Constructs a new Operation.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.longrunning.IOperation);
-
- /** Operation name. */
- public name: string;
-
- /** Operation metadata. */
- public metadata?: (google.protobuf.IAny|null);
-
- /** Operation done. */
- public done: boolean;
-
- /** Operation error. */
- public error?: (google.rpc.IStatus|null);
-
- /** Operation response. */
- public response?: (google.protobuf.IAny|null);
-
- /** Operation result. */
- public result?: ("error"|"response");
-
- /**
- * Creates a new Operation instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Operation instance
- */
- public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation;
-
- /**
- * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
- * @param message Operation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
- * @param message Operation message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an Operation message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Operation
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation;
-
- /**
- * Decodes an Operation message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Operation
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation;
-
- /**
- * Verifies an Operation message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an Operation message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Operation
- */
- public static fromObject(object: { [k: string]: any }): google.longrunning.Operation;
-
- /**
- * Creates a plain object from an Operation message. Also converts values to other types if specified.
- * @param message Operation
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Operation to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Operation
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a GetOperationRequest. */
- interface IGetOperationRequest {
-
- /** GetOperationRequest name */
- name?: (string|null);
- }
-
- /** Represents a GetOperationRequest. */
- class GetOperationRequest implements IGetOperationRequest {
-
- /**
- * Constructs a new GetOperationRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.longrunning.IGetOperationRequest);
-
- /** GetOperationRequest name. */
- public name: string;
-
- /**
- * Creates a new GetOperationRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns GetOperationRequest instance
- */
- public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest;
-
- /**
- * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
- * @param message GetOperationRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
- * @param message GetOperationRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a GetOperationRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns GetOperationRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest;
-
- /**
- * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns GetOperationRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest;
-
- /**
- * Verifies a GetOperationRequest message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns GetOperationRequest
- */
- public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest;
-
- /**
- * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified.
- * @param message GetOperationRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this GetOperationRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for GetOperationRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a ListOperationsRequest. */
- interface IListOperationsRequest {
-
- /** ListOperationsRequest name */
- name?: (string|null);
-
- /** ListOperationsRequest filter */
- filter?: (string|null);
-
- /** ListOperationsRequest pageSize */
- pageSize?: (number|null);
-
- /** ListOperationsRequest pageToken */
- pageToken?: (string|null);
- }
-
- /** Represents a ListOperationsRequest. */
- class ListOperationsRequest implements IListOperationsRequest {
-
- /**
- * Constructs a new ListOperationsRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.longrunning.IListOperationsRequest);
-
- /** ListOperationsRequest name. */
- public name: string;
-
- /** ListOperationsRequest filter. */
- public filter: string;
-
- /** ListOperationsRequest pageSize. */
- public pageSize: number;
-
- /** ListOperationsRequest pageToken. */
- public pageToken: string;
-
- /**
- * Creates a new ListOperationsRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ListOperationsRequest instance
- */
- public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest;
-
- /**
- * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
- * @param message ListOperationsRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
- * @param message ListOperationsRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a ListOperationsRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ListOperationsRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest;
-
- /**
- * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ListOperationsRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest;
-
- /**
- * Verifies a ListOperationsRequest message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ListOperationsRequest
- */
- public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest;
-
- /**
- * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified.
- * @param message ListOperationsRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ListOperationsRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ListOperationsRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a ListOperationsResponse. */
- interface IListOperationsResponse {
-
- /** ListOperationsResponse operations */
- operations?: (google.longrunning.IOperation[]|null);
-
- /** ListOperationsResponse nextPageToken */
- nextPageToken?: (string|null);
- }
-
- /** Represents a ListOperationsResponse. */
- class ListOperationsResponse implements IListOperationsResponse {
-
- /**
- * Constructs a new ListOperationsResponse.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.longrunning.IListOperationsResponse);
-
- /** ListOperationsResponse operations. */
- public operations: google.longrunning.IOperation[];
-
- /** ListOperationsResponse nextPageToken. */
- public nextPageToken: string;
-
- /**
- * Creates a new ListOperationsResponse instance using the specified properties.
- * @param [properties] Properties to set
- * @returns ListOperationsResponse instance
- */
- public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse;
-
- /**
- * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
- * @param message ListOperationsResponse message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
- * @param message ListOperationsResponse message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a ListOperationsResponse message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns ListOperationsResponse
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse;
-
- /**
- * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns ListOperationsResponse
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse;
-
- /**
- * Verifies a ListOperationsResponse message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns ListOperationsResponse
- */
- public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse;
-
- /**
- * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified.
- * @param message ListOperationsResponse
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this ListOperationsResponse to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for ListOperationsResponse
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a CancelOperationRequest. */
- interface ICancelOperationRequest {
-
- /** CancelOperationRequest name */
- name?: (string|null);
- }
-
- /** Represents a CancelOperationRequest. */
- class CancelOperationRequest implements ICancelOperationRequest {
-
- /**
- * Constructs a new CancelOperationRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.longrunning.ICancelOperationRequest);
-
- /** CancelOperationRequest name. */
- public name: string;
-
- /**
- * Creates a new CancelOperationRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns CancelOperationRequest instance
- */
- public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest;
-
- /**
- * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
- * @param message CancelOperationRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
- * @param message CancelOperationRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a CancelOperationRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns CancelOperationRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest;
-
- /**
- * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns CancelOperationRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest;
-
- /**
- * Verifies a CancelOperationRequest message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns CancelOperationRequest
- */
- public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest;
-
- /**
- * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified.
- * @param message CancelOperationRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this CancelOperationRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for CancelOperationRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a DeleteOperationRequest. */
- interface IDeleteOperationRequest {
-
- /** DeleteOperationRequest name */
- name?: (string|null);
- }
-
- /** Represents a DeleteOperationRequest. */
- class DeleteOperationRequest implements IDeleteOperationRequest {
-
- /**
- * Constructs a new DeleteOperationRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.longrunning.IDeleteOperationRequest);
-
- /** DeleteOperationRequest name. */
- public name: string;
-
- /**
- * Creates a new DeleteOperationRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns DeleteOperationRequest instance
- */
- public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest;
-
- /**
- * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
- * @param message DeleteOperationRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
- * @param message DeleteOperationRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a DeleteOperationRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns DeleteOperationRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest;
-
- /**
- * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns DeleteOperationRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest;
-
- /**
- * Verifies a DeleteOperationRequest message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns DeleteOperationRequest
- */
- public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest;
-
- /**
- * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified.
- * @param message DeleteOperationRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this DeleteOperationRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for DeleteOperationRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of a WaitOperationRequest. */
- interface IWaitOperationRequest {
-
- /** WaitOperationRequest name */
- name?: (string|null);
-
- /** WaitOperationRequest timeout */
- timeout?: (google.protobuf.IDuration|null);
- }
-
- /** Represents a WaitOperationRequest. */
- class WaitOperationRequest implements IWaitOperationRequest {
-
- /**
- * Constructs a new WaitOperationRequest.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.longrunning.IWaitOperationRequest);
-
- /** WaitOperationRequest name. */
- public name: string;
-
- /** WaitOperationRequest timeout. */
- public timeout?: (google.protobuf.IDuration|null);
-
- /**
- * Creates a new WaitOperationRequest instance using the specified properties.
- * @param [properties] Properties to set
- * @returns WaitOperationRequest instance
- */
- public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest;
-
- /**
- * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
- * @param message WaitOperationRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
- * @param message WaitOperationRequest message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a WaitOperationRequest message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns WaitOperationRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest;
-
- /**
- * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns WaitOperationRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest;
-
- /**
- * Verifies a WaitOperationRequest message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns WaitOperationRequest
- */
- public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest;
-
- /**
- * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified.
- * @param message WaitOperationRequest
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this WaitOperationRequest to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for WaitOperationRequest
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
-
- /** Properties of an OperationInfo. */
- interface IOperationInfo {
-
- /** OperationInfo responseType */
- responseType?: (string|null);
-
- /** OperationInfo metadataType */
- metadataType?: (string|null);
- }
-
- /** Represents an OperationInfo. */
- class OperationInfo implements IOperationInfo {
-
- /**
- * Constructs a new OperationInfo.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.longrunning.IOperationInfo);
-
- /** OperationInfo responseType. */
- public responseType: string;
-
- /** OperationInfo metadataType. */
- public metadataType: string;
-
- /**
- * Creates a new OperationInfo instance using the specified properties.
- * @param [properties] Properties to set
- * @returns OperationInfo instance
- */
- public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo;
-
- /**
- * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
- * @param message OperationInfo message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
- * @param message OperationInfo message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes an OperationInfo message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns OperationInfo
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo;
-
- /**
- * Decodes an OperationInfo message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns OperationInfo
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo;
-
- /**
- * Verifies an OperationInfo message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns OperationInfo
- */
- public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo;
-
- /**
- * Creates a plain object from an OperationInfo message. Also converts values to other types if specified.
- * @param message OperationInfo
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this OperationInfo to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for OperationInfo
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Namespace rpc. */
- namespace rpc {
-
- /** Properties of a Status. */
- interface IStatus {
-
- /** Status code */
- code?: (number|null);
-
- /** Status message */
- message?: (string|null);
-
- /** Status details */
- details?: (google.protobuf.IAny[]|null);
- }
-
- /** Represents a Status. */
- class Status implements IStatus {
-
- /**
- * Constructs a new Status.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.rpc.IStatus);
-
- /** Status code. */
- public code: number;
-
- /** Status message. */
- public message: string;
-
- /** Status details. */
- public details: google.protobuf.IAny[];
-
- /**
- * Creates a new Status instance using the specified properties.
- * @param [properties] Properties to set
- * @returns Status instance
- */
- public static create(properties?: google.rpc.IStatus): google.rpc.Status;
-
- /**
- * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
- * @param message Status message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
- * @param message Status message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a Status message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns Status
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status;
-
- /**
- * Decodes a Status message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns Status
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status;
-
- /**
- * Verifies a Status message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a Status message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns Status
- */
- public static fromObject(object: { [k: string]: any }): google.rpc.Status;
-
- /**
- * Creates a plain object from a Status message. Also converts values to other types if specified.
- * @param message Status
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this Status to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for Status
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns The default type url
- */
- public static getTypeUrl(typeUrlPrefix?: string): string;
- }
- }
-
- /** Namespace type. */
- namespace type {
-
- /** Properties of a LatLng. */
- interface ILatLng {
-
- /** LatLng latitude */
- latitude?: (number|null);
-
- /** LatLng longitude */
- longitude?: (number|null);
- }
-
- /** Represents a LatLng. */
- class LatLng implements ILatLng {
-
- /**
- * Constructs a new LatLng.
- * @param [properties] Properties to set
- */
- constructor(properties?: google.type.ILatLng);
-
- /** LatLng latitude. */
- public latitude: number;
-
- /** LatLng longitude. */
- public longitude: number;
-
- /**
- * Creates a new LatLng instance using the specified properties.
- * @param [properties] Properties to set
- * @returns LatLng instance
- */
- public static create(properties?: google.type.ILatLng): google.type.LatLng;
-
- /**
- * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
- * @param message LatLng message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encode(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
- * @param message LatLng message or plain object to encode
- * @param [writer] Writer to encode to
- * @returns Writer
- */
- public static encodeDelimited(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer;
-
- /**
- * Decodes a LatLng message from the specified reader or buffer.
- * @param reader Reader or buffer to decode from
- * @param [length] Message length if known beforehand
- * @returns LatLng
- * @throws {Error} If the payload is not 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.LatLng;
-
- /**
- * Decodes a LatLng message from the specified reader or buffer, length delimited.
- * @param reader Reader or buffer to decode from
- * @returns LatLng
- * @throws {Error} If the payload 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.LatLng;
-
- /**
- * Verifies a LatLng message.
- * @param message Plain object to verify
- * @returns `null` if valid, otherwise the reason why it is not
- */
- public static verify(message: { [k: string]: any }): (string|null);
-
- /**
- * Creates a LatLng message from a plain object. Also converts values to their respective internal types.
- * @param object Plain object
- * @returns LatLng
- */
- public static fromObject(object: { [k: string]: any }): google.type.LatLng;
-
- /**
- * Creates a plain object from a LatLng message. Also converts values to other types if specified.
- * @param message LatLng
- * @param [options] Conversion options
- * @returns Plain object
- */
- public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any };
-
- /**
- * Converts this LatLng to JSON.
- * @returns JSON object
- */
- public toJSON(): { [k: string]: any };
-
- /**
- * Gets the default type url for LatLng
- * @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-optimization/protos/protos.js b/packages/google-cloud-optimization/protos/protos.js
deleted file mode 100644
index d4bbbb7c737..00000000000
--- a/packages/google-cloud-optimization/protos/protos.js
+++ /dev/null
@@ -1,39739 +0,0 @@
-// Copyright 2025 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/*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_optimization_protos || ($protobuf.roots._google_cloud_optimization_protos = {});
-
- $root.google = (function() {
-
- /**
- * Namespace google.
- * @exports google
- * @namespace
- */
- var google = {};
-
- google.cloud = (function() {
-
- /**
- * Namespace cloud.
- * @memberof google
- * @namespace
- */
- var cloud = {};
-
- cloud.optimization = (function() {
-
- /**
- * Namespace optimization.
- * @memberof google.cloud
- * @namespace
- */
- var optimization = {};
-
- optimization.v1 = (function() {
-
- /**
- * Namespace v1.
- * @memberof google.cloud.optimization
- * @namespace
- */
- var v1 = {};
-
- v1.InputConfig = (function() {
-
- /**
- * Properties of an InputConfig.
- * @memberof google.cloud.optimization.v1
- * @interface IInputConfig
- * @property {google.cloud.optimization.v1.IGcsSource|null} [gcsSource] InputConfig gcsSource
- * @property {google.cloud.optimization.v1.DataFormat|null} [dataFormat] InputConfig dataFormat
- */
-
- /**
- * Constructs a new InputConfig.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents an InputConfig.
- * @implements IInputConfig
- * @constructor
- * @param {google.cloud.optimization.v1.IInputConfig=} [properties] Properties to set
- */
- function InputConfig(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]];
- }
-
- /**
- * InputConfig gcsSource.
- * @member {google.cloud.optimization.v1.IGcsSource|null|undefined} gcsSource
- * @memberof google.cloud.optimization.v1.InputConfig
- * @instance
- */
- InputConfig.prototype.gcsSource = null;
-
- /**
- * InputConfig dataFormat.
- * @member {google.cloud.optimization.v1.DataFormat} dataFormat
- * @memberof google.cloud.optimization.v1.InputConfig
- * @instance
- */
- InputConfig.prototype.dataFormat = 0;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * InputConfig source.
- * @member {"gcsSource"|undefined} source
- * @memberof google.cloud.optimization.v1.InputConfig
- * @instance
- */
- Object.defineProperty(InputConfig.prototype, "source", {
- get: $util.oneOfGetter($oneOfFields = ["gcsSource"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new InputConfig instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.InputConfig
- * @static
- * @param {google.cloud.optimization.v1.IInputConfig=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.InputConfig} InputConfig instance
- */
- InputConfig.create = function create(properties) {
- return new InputConfig(properties);
- };
-
- /**
- * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.optimization.v1.InputConfig.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.InputConfig
- * @static
- * @param {google.cloud.optimization.v1.IInputConfig} message InputConfig message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- InputConfig.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
- $root.google.cloud.optimization.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dataFormat);
- return writer;
- };
-
- /**
- * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.InputConfig.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.InputConfig
- * @static
- * @param {google.cloud.optimization.v1.IInputConfig} message InputConfig message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- InputConfig.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes an InputConfig message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.InputConfig
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.InputConfig} InputConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- InputConfig.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.optimization.v1.InputConfig();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.gcsSource = $root.google.cloud.optimization.v1.GcsSource.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.dataFormat = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes an InputConfig message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.InputConfig
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.InputConfig} InputConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- InputConfig.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies an InputConfig message.
- * @function verify
- * @memberof google.cloud.optimization.v1.InputConfig
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- InputConfig.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
- properties.source = 1;
- {
- var error = $root.google.cloud.optimization.v1.GcsSource.verify(message.gcsSource);
- if (error)
- return "gcsSource." + error;
- }
- }
- if (message.dataFormat != null && message.hasOwnProperty("dataFormat"))
- switch (message.dataFormat) {
- default:
- return "dataFormat: enum value expected";
- case 0:
- case 1:
- case 2:
- break;
- }
- return null;
- };
-
- /**
- * Creates an InputConfig message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.InputConfig
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.InputConfig} InputConfig
- */
- InputConfig.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.InputConfig)
- return object;
- var message = new $root.google.cloud.optimization.v1.InputConfig();
- if (object.gcsSource != null) {
- if (typeof object.gcsSource !== "object")
- throw TypeError(".google.cloud.optimization.v1.InputConfig.gcsSource: object expected");
- message.gcsSource = $root.google.cloud.optimization.v1.GcsSource.fromObject(object.gcsSource);
- }
- switch (object.dataFormat) {
- default:
- if (typeof object.dataFormat === "number") {
- message.dataFormat = object.dataFormat;
- break;
- }
- break;
- case "DATA_FORMAT_UNSPECIFIED":
- case 0:
- message.dataFormat = 0;
- break;
- case "JSON":
- case 1:
- message.dataFormat = 1;
- break;
- case "STRING":
- case 2:
- message.dataFormat = 2;
- break;
- }
- return message;
- };
-
- /**
- * Creates a plain object from an InputConfig message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.InputConfig
- * @static
- * @param {google.cloud.optimization.v1.InputConfig} message InputConfig
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- InputConfig.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0;
- if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
- object.gcsSource = $root.google.cloud.optimization.v1.GcsSource.toObject(message.gcsSource, options);
- if (options.oneofs)
- object.source = "gcsSource";
- }
- if (message.dataFormat != null && message.hasOwnProperty("dataFormat"))
- object.dataFormat = options.enums === String ? $root.google.cloud.optimization.v1.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.optimization.v1.DataFormat[message.dataFormat] : message.dataFormat;
- return object;
- };
-
- /**
- * Converts this InputConfig to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.InputConfig
- * @instance
- * @returns {Object.} JSON object
- */
- InputConfig.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for InputConfig
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.InputConfig
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- InputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.InputConfig";
- };
-
- return InputConfig;
- })();
-
- v1.OutputConfig = (function() {
-
- /**
- * Properties of an OutputConfig.
- * @memberof google.cloud.optimization.v1
- * @interface IOutputConfig
- * @property {google.cloud.optimization.v1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination
- * @property {google.cloud.optimization.v1.DataFormat|null} [dataFormat] OutputConfig dataFormat
- */
-
- /**
- * Constructs a new OutputConfig.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents an OutputConfig.
- * @implements IOutputConfig
- * @constructor
- * @param {google.cloud.optimization.v1.IOutputConfig=} [properties] Properties to set
- */
- function OutputConfig(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]];
- }
-
- /**
- * OutputConfig gcsDestination.
- * @member {google.cloud.optimization.v1.IGcsDestination|null|undefined} gcsDestination
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @instance
- */
- OutputConfig.prototype.gcsDestination = null;
-
- /**
- * OutputConfig dataFormat.
- * @member {google.cloud.optimization.v1.DataFormat} dataFormat
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @instance
- */
- OutputConfig.prototype.dataFormat = 0;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * OutputConfig destination.
- * @member {"gcsDestination"|undefined} destination
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @instance
- */
- Object.defineProperty(OutputConfig.prototype, "destination", {
- get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new OutputConfig instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @static
- * @param {google.cloud.optimization.v1.IOutputConfig=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.OutputConfig} OutputConfig instance
- */
- OutputConfig.create = function create(properties) {
- return new OutputConfig(properties);
- };
-
- /**
- * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.optimization.v1.OutputConfig.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @static
- * @param {google.cloud.optimization.v1.IOutputConfig} message OutputConfig message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- OutputConfig.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination"))
- $root.google.cloud.optimization.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dataFormat);
- return writer;
- };
-
- /**
- * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OutputConfig.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @static
- * @param {google.cloud.optimization.v1.IOutputConfig} message OutputConfig message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- OutputConfig.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes an OutputConfig message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.OutputConfig} OutputConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- OutputConfig.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.optimization.v1.OutputConfig();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.gcsDestination = $root.google.cloud.optimization.v1.GcsDestination.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.dataFormat = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes an OutputConfig message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.OutputConfig} OutputConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- OutputConfig.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies an OutputConfig message.
- * @function verify
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- OutputConfig.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) {
- properties.destination = 1;
- {
- var error = $root.google.cloud.optimization.v1.GcsDestination.verify(message.gcsDestination);
- if (error)
- return "gcsDestination." + error;
- }
- }
- if (message.dataFormat != null && message.hasOwnProperty("dataFormat"))
- switch (message.dataFormat) {
- default:
- return "dataFormat: enum value expected";
- case 0:
- case 1:
- case 2:
- break;
- }
- return null;
- };
-
- /**
- * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.OutputConfig} OutputConfig
- */
- OutputConfig.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.OutputConfig)
- return object;
- var message = new $root.google.cloud.optimization.v1.OutputConfig();
- if (object.gcsDestination != null) {
- if (typeof object.gcsDestination !== "object")
- throw TypeError(".google.cloud.optimization.v1.OutputConfig.gcsDestination: object expected");
- message.gcsDestination = $root.google.cloud.optimization.v1.GcsDestination.fromObject(object.gcsDestination);
- }
- switch (object.dataFormat) {
- default:
- if (typeof object.dataFormat === "number") {
- message.dataFormat = object.dataFormat;
- break;
- }
- break;
- case "DATA_FORMAT_UNSPECIFIED":
- case 0:
- message.dataFormat = 0;
- break;
- case "JSON":
- case 1:
- message.dataFormat = 1;
- break;
- case "STRING":
- case 2:
- message.dataFormat = 2;
- break;
- }
- return message;
- };
-
- /**
- * Creates a plain object from an OutputConfig message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @static
- * @param {google.cloud.optimization.v1.OutputConfig} message OutputConfig
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- OutputConfig.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0;
- if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) {
- object.gcsDestination = $root.google.cloud.optimization.v1.GcsDestination.toObject(message.gcsDestination, options);
- if (options.oneofs)
- object.destination = "gcsDestination";
- }
- if (message.dataFormat != null && message.hasOwnProperty("dataFormat"))
- object.dataFormat = options.enums === String ? $root.google.cloud.optimization.v1.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.optimization.v1.DataFormat[message.dataFormat] : message.dataFormat;
- return object;
- };
-
- /**
- * Converts this OutputConfig to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @instance
- * @returns {Object.} JSON object
- */
- OutputConfig.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for OutputConfig
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.OutputConfig
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- OutputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.OutputConfig";
- };
-
- return OutputConfig;
- })();
-
- v1.GcsSource = (function() {
-
- /**
- * Properties of a GcsSource.
- * @memberof google.cloud.optimization.v1
- * @interface IGcsSource
- * @property {string|null} [uri] GcsSource uri
- */
-
- /**
- * Constructs a new GcsSource.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a GcsSource.
- * @implements IGcsSource
- * @constructor
- * @param {google.cloud.optimization.v1.IGcsSource=} [properties] Properties to set
- */
- function GcsSource(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- /**
- * GcsSource uri.
- * @member {string} uri
- * @memberof google.cloud.optimization.v1.GcsSource
- * @instance
- */
- GcsSource.prototype.uri = "";
-
- /**
- * Creates a new GcsSource instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.GcsSource
- * @static
- * @param {google.cloud.optimization.v1.IGcsSource=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.GcsSource} GcsSource instance
- */
- GcsSource.create = function create(properties) {
- return new GcsSource(properties);
- };
-
- /**
- * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.optimization.v1.GcsSource.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.GcsSource
- * @static
- * @param {google.cloud.optimization.v1.IGcsSource} message GcsSource message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- GcsSource.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
- return writer;
- };
-
- /**
- * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.GcsSource.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.GcsSource
- * @static
- * @param {google.cloud.optimization.v1.IGcsSource} message GcsSource message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- GcsSource.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a GcsSource message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.GcsSource
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.GcsSource} GcsSource
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- GcsSource.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.optimization.v1.GcsSource();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.uri = 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.optimization.v1.GcsSource
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.GcsSource} GcsSource
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- GcsSource.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a GcsSource message.
- * @function verify
- * @memberof google.cloud.optimization.v1.GcsSource
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- GcsSource.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.uri != null && message.hasOwnProperty("uri"))
- if (!$util.isString(message.uri))
- return "uri: 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.optimization.v1.GcsSource
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.GcsSource} GcsSource
- */
- GcsSource.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.GcsSource)
- return object;
- var message = new $root.google.cloud.optimization.v1.GcsSource();
- if (object.uri != null)
- message.uri = String(object.uri);
- return message;
- };
-
- /**
- * Creates a plain object from a GcsSource message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.GcsSource
- * @static
- * @param {google.cloud.optimization.v1.GcsSource} message GcsSource
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- GcsSource.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.uri = "";
- if (message.uri != null && message.hasOwnProperty("uri"))
- object.uri = message.uri;
- return object;
- };
-
- /**
- * Converts this GcsSource to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.GcsSource
- * @instance
- * @returns {Object.} JSON object
- */
- GcsSource.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for GcsSource
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.GcsSource
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.GcsSource";
- };
-
- return GcsSource;
- })();
-
- v1.GcsDestination = (function() {
-
- /**
- * Properties of a GcsDestination.
- * @memberof google.cloud.optimization.v1
- * @interface IGcsDestination
- * @property {string|null} [uri] GcsDestination uri
- */
-
- /**
- * Constructs a new GcsDestination.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a GcsDestination.
- * @implements IGcsDestination
- * @constructor
- * @param {google.cloud.optimization.v1.IGcsDestination=} [properties] Properties to set
- */
- function GcsDestination(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]];
- }
-
- /**
- * GcsDestination uri.
- * @member {string} uri
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @instance
- */
- GcsDestination.prototype.uri = "";
-
- /**
- * Creates a new GcsDestination instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @static
- * @param {google.cloud.optimization.v1.IGcsDestination=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.GcsDestination} GcsDestination instance
- */
- GcsDestination.create = function create(properties) {
- return new GcsDestination(properties);
- };
-
- /**
- * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.optimization.v1.GcsDestination.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @static
- * @param {google.cloud.optimization.v1.IGcsDestination} message GcsDestination message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- GcsDestination.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
- return writer;
- };
-
- /**
- * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.GcsDestination.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @static
- * @param {google.cloud.optimization.v1.IGcsDestination} message GcsDestination message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- GcsDestination.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a GcsDestination message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.GcsDestination} GcsDestination
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- GcsDestination.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.optimization.v1.GcsDestination();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.uri = reader.string();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a GcsDestination message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.GcsDestination} GcsDestination
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- GcsDestination.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a GcsDestination message.
- * @function verify
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- GcsDestination.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.uri != null && message.hasOwnProperty("uri"))
- if (!$util.isString(message.uri))
- return "uri: string expected";
- return null;
- };
-
- /**
- * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.GcsDestination} GcsDestination
- */
- GcsDestination.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.GcsDestination)
- return object;
- var message = new $root.google.cloud.optimization.v1.GcsDestination();
- if (object.uri != null)
- message.uri = String(object.uri);
- return message;
- };
-
- /**
- * Creates a plain object from a GcsDestination message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @static
- * @param {google.cloud.optimization.v1.GcsDestination} message GcsDestination
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- GcsDestination.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.uri = "";
- if (message.uri != null && message.hasOwnProperty("uri"))
- object.uri = message.uri;
- return object;
- };
-
- /**
- * Converts this GcsDestination to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @instance
- * @returns {Object.} JSON object
- */
- GcsDestination.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for GcsDestination
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.GcsDestination
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.GcsDestination";
- };
-
- return GcsDestination;
- })();
-
- v1.AsyncModelMetadata = (function() {
-
- /**
- * Properties of an AsyncModelMetadata.
- * @memberof google.cloud.optimization.v1
- * @interface IAsyncModelMetadata
- * @property {google.cloud.optimization.v1.AsyncModelMetadata.State|null} [state] AsyncModelMetadata state
- * @property {string|null} [stateMessage] AsyncModelMetadata stateMessage
- * @property {google.protobuf.ITimestamp|null} [createTime] AsyncModelMetadata createTime
- * @property {google.protobuf.ITimestamp|null} [updateTime] AsyncModelMetadata updateTime
- */
-
- /**
- * Constructs a new AsyncModelMetadata.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents an AsyncModelMetadata.
- * @implements IAsyncModelMetadata
- * @constructor
- * @param {google.cloud.optimization.v1.IAsyncModelMetadata=} [properties] Properties to set
- */
- function AsyncModelMetadata(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]];
- }
-
- /**
- * AsyncModelMetadata state.
- * @member {google.cloud.optimization.v1.AsyncModelMetadata.State} state
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @instance
- */
- AsyncModelMetadata.prototype.state = 0;
-
- /**
- * AsyncModelMetadata stateMessage.
- * @member {string} stateMessage
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @instance
- */
- AsyncModelMetadata.prototype.stateMessage = "";
-
- /**
- * AsyncModelMetadata createTime.
- * @member {google.protobuf.ITimestamp|null|undefined} createTime
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @instance
- */
- AsyncModelMetadata.prototype.createTime = null;
-
- /**
- * AsyncModelMetadata updateTime.
- * @member {google.protobuf.ITimestamp|null|undefined} updateTime
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @instance
- */
- AsyncModelMetadata.prototype.updateTime = null;
-
- /**
- * Creates a new AsyncModelMetadata instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @static
- * @param {google.cloud.optimization.v1.IAsyncModelMetadata=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.AsyncModelMetadata} AsyncModelMetadata instance
- */
- AsyncModelMetadata.create = function create(properties) {
- return new AsyncModelMetadata(properties);
- };
-
- /**
- * Encodes the specified AsyncModelMetadata message. Does not implicitly {@link google.cloud.optimization.v1.AsyncModelMetadata.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @static
- * @param {google.cloud.optimization.v1.IAsyncModelMetadata} message AsyncModelMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- AsyncModelMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.state != null && Object.hasOwnProperty.call(message, "state"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
- if (message.stateMessage != null && Object.hasOwnProperty.call(message, "stateMessage"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.stateMessage);
- if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
- $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
- $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified AsyncModelMetadata message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.AsyncModelMetadata.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @static
- * @param {google.cloud.optimization.v1.IAsyncModelMetadata} message AsyncModelMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- AsyncModelMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes an AsyncModelMetadata message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.AsyncModelMetadata} AsyncModelMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- AsyncModelMetadata.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.optimization.v1.AsyncModelMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.state = reader.int32();
- break;
- }
- case 2: {
- message.stateMessage = reader.string();
- break;
- }
- case 3: {
- message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes an AsyncModelMetadata message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.AsyncModelMetadata} AsyncModelMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- AsyncModelMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies an AsyncModelMetadata message.
- * @function verify
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- AsyncModelMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.state != null && message.hasOwnProperty("state"))
- switch (message.state) {
- default:
- return "state: enum value expected";
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- break;
- }
- if (message.stateMessage != null && message.hasOwnProperty("stateMessage"))
- if (!$util.isString(message.stateMessage))
- return "stateMessage: string expected";
- if (message.createTime != null && message.hasOwnProperty("createTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.createTime);
- if (error)
- return "createTime." + error;
- }
- if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
- if (error)
- return "updateTime." + error;
- }
- return null;
- };
-
- /**
- * Creates an AsyncModelMetadata message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.AsyncModelMetadata} AsyncModelMetadata
- */
- AsyncModelMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.AsyncModelMetadata)
- return object;
- var message = new $root.google.cloud.optimization.v1.AsyncModelMetadata();
- switch (object.state) {
- default:
- if (typeof object.state === "number") {
- message.state = object.state;
- break;
- }
- break;
- case "STATE_UNSPECIFIED":
- case 0:
- message.state = 0;
- break;
- case "RUNNING":
- case 1:
- message.state = 1;
- break;
- case "SUCCEEDED":
- case 2:
- message.state = 2;
- break;
- case "CANCELLED":
- case 3:
- message.state = 3;
- break;
- case "FAILED":
- case 4:
- message.state = 4;
- break;
- }
- if (object.stateMessage != null)
- message.stateMessage = String(object.stateMessage);
- if (object.createTime != null) {
- if (typeof object.createTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.AsyncModelMetadata.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.optimization.v1.AsyncModelMetadata.updateTime: object expected");
- message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
- }
- return message;
- };
-
- /**
- * Creates a plain object from an AsyncModelMetadata message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @static
- * @param {google.cloud.optimization.v1.AsyncModelMetadata} message AsyncModelMetadata
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- AsyncModelMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
- object.stateMessage = "";
- object.createTime = null;
- object.updateTime = null;
- }
- if (message.state != null && message.hasOwnProperty("state"))
- object.state = options.enums === String ? $root.google.cloud.optimization.v1.AsyncModelMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.optimization.v1.AsyncModelMetadata.State[message.state] : message.state;
- if (message.stateMessage != null && message.hasOwnProperty("stateMessage"))
- object.stateMessage = message.stateMessage;
- if (message.createTime != null && message.hasOwnProperty("createTime"))
- object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
- if (message.updateTime != null && message.hasOwnProperty("updateTime"))
- object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
- return object;
- };
-
- /**
- * Converts this AsyncModelMetadata to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @instance
- * @returns {Object.} JSON object
- */
- AsyncModelMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for AsyncModelMetadata
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.AsyncModelMetadata
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- AsyncModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.AsyncModelMetadata";
- };
-
- /**
- * State enum.
- * @name google.cloud.optimization.v1.AsyncModelMetadata.State
- * @enum {number}
- * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
- * @property {number} RUNNING=1 RUNNING value
- * @property {number} SUCCEEDED=2 SUCCEEDED value
- * @property {number} CANCELLED=3 CANCELLED value
- * @property {number} FAILED=4 FAILED value
- */
- AsyncModelMetadata.State = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
- values[valuesById[1] = "RUNNING"] = 1;
- values[valuesById[2] = "SUCCEEDED"] = 2;
- values[valuesById[3] = "CANCELLED"] = 3;
- values[valuesById[4] = "FAILED"] = 4;
- return values;
- })();
-
- return AsyncModelMetadata;
- })();
-
- /**
- * DataFormat enum.
- * @name google.cloud.optimization.v1.DataFormat
- * @enum {number}
- * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value
- * @property {number} JSON=1 JSON value
- * @property {number} STRING=2 STRING value
- */
- v1.DataFormat = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0;
- values[valuesById[1] = "JSON"] = 1;
- values[valuesById[2] = "STRING"] = 2;
- return values;
- })();
-
- v1.FleetRouting = (function() {
-
- /**
- * Constructs a new FleetRouting service.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a FleetRouting
- * @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 FleetRouting(rpcImpl, requestDelimited, responseDelimited) {
- $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
- }
-
- (FleetRouting.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = FleetRouting;
-
- /**
- * Creates new FleetRouting service using the specified rpc implementation.
- * @function create
- * @memberof google.cloud.optimization.v1.FleetRouting
- * @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 {FleetRouting} RPC service. Useful where requests and/or responses are streamed.
- */
- FleetRouting.create = function create(rpcImpl, requestDelimited, responseDelimited) {
- return new this(rpcImpl, requestDelimited, responseDelimited);
- };
-
- /**
- * Callback as used by {@link google.cloud.optimization.v1.FleetRouting|optimizeTours}.
- * @memberof google.cloud.optimization.v1.FleetRouting
- * @typedef OptimizeToursCallback
- * @type {function}
- * @param {Error|null} error Error, if any
- * @param {google.cloud.optimization.v1.OptimizeToursResponse} [response] OptimizeToursResponse
- */
-
- /**
- * Calls OptimizeTours.
- * @function optimizeTours
- * @memberof google.cloud.optimization.v1.FleetRouting
- * @instance
- * @param {google.cloud.optimization.v1.IOptimizeToursRequest} request OptimizeToursRequest message or plain object
- * @param {google.cloud.optimization.v1.FleetRouting.OptimizeToursCallback} callback Node-style callback called with the error, if any, and OptimizeToursResponse
- * @returns {undefined}
- * @variation 1
- */
- Object.defineProperty(FleetRouting.prototype.optimizeTours = function optimizeTours(request, callback) {
- return this.rpcCall(optimizeTours, $root.google.cloud.optimization.v1.OptimizeToursRequest, $root.google.cloud.optimization.v1.OptimizeToursResponse, request, callback);
- }, "name", { value: "OptimizeTours" });
-
- /**
- * Calls OptimizeTours.
- * @function optimizeTours
- * @memberof google.cloud.optimization.v1.FleetRouting
- * @instance
- * @param {google.cloud.optimization.v1.IOptimizeToursRequest} request OptimizeToursRequest message or plain object
- * @returns {Promise} Promise
- * @variation 2
- */
-
- /**
- * Callback as used by {@link google.cloud.optimization.v1.FleetRouting|batchOptimizeTours}.
- * @memberof google.cloud.optimization.v1.FleetRouting
- * @typedef BatchOptimizeToursCallback
- * @type {function}
- * @param {Error|null} error Error, if any
- * @param {google.longrunning.Operation} [response] Operation
- */
-
- /**
- * Calls BatchOptimizeTours.
- * @function batchOptimizeTours
- * @memberof google.cloud.optimization.v1.FleetRouting
- * @instance
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursRequest} request BatchOptimizeToursRequest message or plain object
- * @param {google.cloud.optimization.v1.FleetRouting.BatchOptimizeToursCallback} callback Node-style callback called with the error, if any, and Operation
- * @returns {undefined}
- * @variation 1
- */
- Object.defineProperty(FleetRouting.prototype.batchOptimizeTours = function batchOptimizeTours(request, callback) {
- return this.rpcCall(batchOptimizeTours, $root.google.cloud.optimization.v1.BatchOptimizeToursRequest, $root.google.longrunning.Operation, request, callback);
- }, "name", { value: "BatchOptimizeTours" });
-
- /**
- * Calls BatchOptimizeTours.
- * @function batchOptimizeTours
- * @memberof google.cloud.optimization.v1.FleetRouting
- * @instance
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursRequest} request BatchOptimizeToursRequest message or plain object
- * @returns {Promise} Promise
- * @variation 2
- */
-
- return FleetRouting;
- })();
-
- v1.OptimizeToursRequest = (function() {
-
- /**
- * Properties of an OptimizeToursRequest.
- * @memberof google.cloud.optimization.v1
- * @interface IOptimizeToursRequest
- * @property {string|null} [parent] OptimizeToursRequest parent
- * @property {google.protobuf.IDuration|null} [timeout] OptimizeToursRequest timeout
- * @property {google.cloud.optimization.v1.IShipmentModel|null} [model] OptimizeToursRequest model
- * @property {google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode|null} [solvingMode] OptimizeToursRequest solvingMode
- * @property {google.cloud.optimization.v1.OptimizeToursRequest.SearchMode|null} [searchMode] OptimizeToursRequest searchMode
- * @property {Array.|null} [injectedFirstSolutionRoutes] OptimizeToursRequest injectedFirstSolutionRoutes
- * @property {google.cloud.optimization.v1.IInjectedSolutionConstraint|null} [injectedSolutionConstraint] OptimizeToursRequest injectedSolutionConstraint
- * @property {Array.|null} [refreshDetailsRoutes] OptimizeToursRequest refreshDetailsRoutes
- * @property {boolean|null} [interpretInjectedSolutionsUsingLabels] OptimizeToursRequest interpretInjectedSolutionsUsingLabels
- * @property {boolean|null} [considerRoadTraffic] OptimizeToursRequest considerRoadTraffic
- * @property {boolean|null} [populatePolylines] OptimizeToursRequest populatePolylines
- * @property {boolean|null} [populateTransitionPolylines] OptimizeToursRequest populateTransitionPolylines
- * @property {boolean|null} [allowLargeDeadlineDespiteInterruptionRisk] OptimizeToursRequest allowLargeDeadlineDespiteInterruptionRisk
- * @property {boolean|null} [useGeodesicDistances] OptimizeToursRequest useGeodesicDistances
- * @property {number|null} [geodesicMetersPerSecond] OptimizeToursRequest geodesicMetersPerSecond
- * @property {number|null} [maxValidationErrors] OptimizeToursRequest maxValidationErrors
- * @property {string|null} [label] OptimizeToursRequest label
- * @property {boolean|null} [populateTravelStepPolylines] OptimizeToursRequest populateTravelStepPolylines
- */
-
- /**
- * Constructs a new OptimizeToursRequest.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents an OptimizeToursRequest.
- * @implements IOptimizeToursRequest
- * @constructor
- * @param {google.cloud.optimization.v1.IOptimizeToursRequest=} [properties] Properties to set
- */
- function OptimizeToursRequest(properties) {
- this.injectedFirstSolutionRoutes = [];
- this.refreshDetailsRoutes = [];
- 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]];
- }
-
- /**
- * OptimizeToursRequest parent.
- * @member {string} parent
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.parent = "";
-
- /**
- * OptimizeToursRequest timeout.
- * @member {google.protobuf.IDuration|null|undefined} timeout
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.timeout = null;
-
- /**
- * OptimizeToursRequest model.
- * @member {google.cloud.optimization.v1.IShipmentModel|null|undefined} model
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.model = null;
-
- /**
- * OptimizeToursRequest solvingMode.
- * @member {google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode} solvingMode
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.solvingMode = 0;
-
- /**
- * OptimizeToursRequest searchMode.
- * @member {google.cloud.optimization.v1.OptimizeToursRequest.SearchMode} searchMode
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.searchMode = 0;
-
- /**
- * OptimizeToursRequest injectedFirstSolutionRoutes.
- * @member {Array.} injectedFirstSolutionRoutes
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.injectedFirstSolutionRoutes = $util.emptyArray;
-
- /**
- * OptimizeToursRequest injectedSolutionConstraint.
- * @member {google.cloud.optimization.v1.IInjectedSolutionConstraint|null|undefined} injectedSolutionConstraint
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.injectedSolutionConstraint = null;
-
- /**
- * OptimizeToursRequest refreshDetailsRoutes.
- * @member {Array.} refreshDetailsRoutes
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.refreshDetailsRoutes = $util.emptyArray;
-
- /**
- * OptimizeToursRequest interpretInjectedSolutionsUsingLabels.
- * @member {boolean} interpretInjectedSolutionsUsingLabels
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.interpretInjectedSolutionsUsingLabels = false;
-
- /**
- * OptimizeToursRequest considerRoadTraffic.
- * @member {boolean} considerRoadTraffic
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.considerRoadTraffic = false;
-
- /**
- * OptimizeToursRequest populatePolylines.
- * @member {boolean} populatePolylines
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.populatePolylines = false;
-
- /**
- * OptimizeToursRequest populateTransitionPolylines.
- * @member {boolean} populateTransitionPolylines
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.populateTransitionPolylines = false;
-
- /**
- * OptimizeToursRequest allowLargeDeadlineDespiteInterruptionRisk.
- * @member {boolean} allowLargeDeadlineDespiteInterruptionRisk
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.allowLargeDeadlineDespiteInterruptionRisk = false;
-
- /**
- * OptimizeToursRequest useGeodesicDistances.
- * @member {boolean} useGeodesicDistances
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.useGeodesicDistances = false;
-
- /**
- * OptimizeToursRequest geodesicMetersPerSecond.
- * @member {number|null|undefined} geodesicMetersPerSecond
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.geodesicMetersPerSecond = null;
-
- /**
- * OptimizeToursRequest maxValidationErrors.
- * @member {number|null|undefined} maxValidationErrors
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.maxValidationErrors = null;
-
- /**
- * OptimizeToursRequest label.
- * @member {string} label
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.label = "";
-
- /**
- * OptimizeToursRequest populateTravelStepPolylines.
- * @member {boolean} populateTravelStepPolylines
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- OptimizeToursRequest.prototype.populateTravelStepPolylines = false;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * OptimizeToursRequest _geodesicMetersPerSecond.
- * @member {"geodesicMetersPerSecond"|undefined} _geodesicMetersPerSecond
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- Object.defineProperty(OptimizeToursRequest.prototype, "_geodesicMetersPerSecond", {
- get: $util.oneOfGetter($oneOfFields = ["geodesicMetersPerSecond"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * OptimizeToursRequest _maxValidationErrors.
- * @member {"maxValidationErrors"|undefined} _maxValidationErrors
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- */
- Object.defineProperty(OptimizeToursRequest.prototype, "_maxValidationErrors", {
- get: $util.oneOfGetter($oneOfFields = ["maxValidationErrors"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new OptimizeToursRequest instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @static
- * @param {google.cloud.optimization.v1.IOptimizeToursRequest=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.OptimizeToursRequest} OptimizeToursRequest instance
- */
- OptimizeToursRequest.create = function create(properties) {
- return new OptimizeToursRequest(properties);
- };
-
- /**
- * Encodes the specified OptimizeToursRequest message. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursRequest.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @static
- * @param {google.cloud.optimization.v1.IOptimizeToursRequest} message OptimizeToursRequest message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- OptimizeToursRequest.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.timeout != null && Object.hasOwnProperty.call(message, "timeout"))
- $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.model != null && Object.hasOwnProperty.call(message, "model"))
- $root.google.cloud.optimization.v1.ShipmentModel.encode(message.model, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.solvingMode != null && Object.hasOwnProperty.call(message, "solvingMode"))
- writer.uint32(/* id 4, wireType 0 =*/32).int32(message.solvingMode);
- if (message.maxValidationErrors != null && Object.hasOwnProperty.call(message, "maxValidationErrors"))
- writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxValidationErrors);
- if (message.searchMode != null && Object.hasOwnProperty.call(message, "searchMode"))
- writer.uint32(/* id 6, wireType 0 =*/48).int32(message.searchMode);
- if (message.injectedFirstSolutionRoutes != null && message.injectedFirstSolutionRoutes.length)
- for (var i = 0; i < message.injectedFirstSolutionRoutes.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentRoute.encode(message.injectedFirstSolutionRoutes[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
- if (message.injectedSolutionConstraint != null && Object.hasOwnProperty.call(message, "injectedSolutionConstraint"))
- $root.google.cloud.optimization.v1.InjectedSolutionConstraint.encode(message.injectedSolutionConstraint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
- if (message.refreshDetailsRoutes != null && message.refreshDetailsRoutes.length)
- for (var i = 0; i < message.refreshDetailsRoutes.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentRoute.encode(message.refreshDetailsRoutes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
- if (message.interpretInjectedSolutionsUsingLabels != null && Object.hasOwnProperty.call(message, "interpretInjectedSolutionsUsingLabels"))
- writer.uint32(/* id 10, wireType 0 =*/80).bool(message.interpretInjectedSolutionsUsingLabels);
- if (message.considerRoadTraffic != null && Object.hasOwnProperty.call(message, "considerRoadTraffic"))
- writer.uint32(/* id 11, wireType 0 =*/88).bool(message.considerRoadTraffic);
- if (message.populatePolylines != null && Object.hasOwnProperty.call(message, "populatePolylines"))
- writer.uint32(/* id 12, wireType 0 =*/96).bool(message.populatePolylines);
- if (message.populateTransitionPolylines != null && Object.hasOwnProperty.call(message, "populateTransitionPolylines"))
- writer.uint32(/* id 13, wireType 0 =*/104).bool(message.populateTransitionPolylines);
- if (message.allowLargeDeadlineDespiteInterruptionRisk != null && Object.hasOwnProperty.call(message, "allowLargeDeadlineDespiteInterruptionRisk"))
- writer.uint32(/* id 14, wireType 0 =*/112).bool(message.allowLargeDeadlineDespiteInterruptionRisk);
- if (message.useGeodesicDistances != null && Object.hasOwnProperty.call(message, "useGeodesicDistances"))
- writer.uint32(/* id 15, wireType 0 =*/120).bool(message.useGeodesicDistances);
- if (message.geodesicMetersPerSecond != null && Object.hasOwnProperty.call(message, "geodesicMetersPerSecond"))
- writer.uint32(/* id 16, wireType 1 =*/129).double(message.geodesicMetersPerSecond);
- if (message.label != null && Object.hasOwnProperty.call(message, "label"))
- writer.uint32(/* id 17, wireType 2 =*/138).string(message.label);
- if (message.populateTravelStepPolylines != null && Object.hasOwnProperty.call(message, "populateTravelStepPolylines"))
- writer.uint32(/* id 20, wireType 0 =*/160).bool(message.populateTravelStepPolylines);
- return writer;
- };
-
- /**
- * Encodes the specified OptimizeToursRequest message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursRequest.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @static
- * @param {google.cloud.optimization.v1.IOptimizeToursRequest} message OptimizeToursRequest message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- OptimizeToursRequest.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes an OptimizeToursRequest message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.OptimizeToursRequest} OptimizeToursRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- OptimizeToursRequest.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.optimization.v1.OptimizeToursRequest();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.parent = reader.string();
- break;
- }
- case 2: {
- message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.model = $root.google.cloud.optimization.v1.ShipmentModel.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- message.solvingMode = reader.int32();
- break;
- }
- case 6: {
- message.searchMode = reader.int32();
- break;
- }
- case 7: {
- if (!(message.injectedFirstSolutionRoutes && message.injectedFirstSolutionRoutes.length))
- message.injectedFirstSolutionRoutes = [];
- message.injectedFirstSolutionRoutes.push($root.google.cloud.optimization.v1.ShipmentRoute.decode(reader, reader.uint32()));
- break;
- }
- case 8: {
- message.injectedSolutionConstraint = $root.google.cloud.optimization.v1.InjectedSolutionConstraint.decode(reader, reader.uint32());
- break;
- }
- case 9: {
- if (!(message.refreshDetailsRoutes && message.refreshDetailsRoutes.length))
- message.refreshDetailsRoutes = [];
- message.refreshDetailsRoutes.push($root.google.cloud.optimization.v1.ShipmentRoute.decode(reader, reader.uint32()));
- break;
- }
- case 10: {
- message.interpretInjectedSolutionsUsingLabels = reader.bool();
- break;
- }
- case 11: {
- message.considerRoadTraffic = reader.bool();
- break;
- }
- case 12: {
- message.populatePolylines = reader.bool();
- break;
- }
- case 13: {
- message.populateTransitionPolylines = reader.bool();
- break;
- }
- case 14: {
- message.allowLargeDeadlineDespiteInterruptionRisk = reader.bool();
- break;
- }
- case 15: {
- message.useGeodesicDistances = reader.bool();
- break;
- }
- case 16: {
- message.geodesicMetersPerSecond = reader.double();
- break;
- }
- case 5: {
- message.maxValidationErrors = reader.int32();
- break;
- }
- case 17: {
- message.label = reader.string();
- break;
- }
- case 20: {
- message.populateTravelStepPolylines = reader.bool();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes an OptimizeToursRequest message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.OptimizeToursRequest} OptimizeToursRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- OptimizeToursRequest.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies an OptimizeToursRequest message.
- * @function verify
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- OptimizeToursRequest.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.timeout != null && message.hasOwnProperty("timeout")) {
- var error = $root.google.protobuf.Duration.verify(message.timeout);
- if (error)
- return "timeout." + error;
- }
- if (message.model != null && message.hasOwnProperty("model")) {
- var error = $root.google.cloud.optimization.v1.ShipmentModel.verify(message.model);
- if (error)
- return "model." + error;
- }
- if (message.solvingMode != null && message.hasOwnProperty("solvingMode"))
- switch (message.solvingMode) {
- default:
- return "solvingMode: enum value expected";
- case 0:
- case 1:
- case 2:
- break;
- }
- if (message.searchMode != null && message.hasOwnProperty("searchMode"))
- switch (message.searchMode) {
- default:
- return "searchMode: enum value expected";
- case 0:
- case 1:
- case 2:
- break;
- }
- if (message.injectedFirstSolutionRoutes != null && message.hasOwnProperty("injectedFirstSolutionRoutes")) {
- if (!Array.isArray(message.injectedFirstSolutionRoutes))
- return "injectedFirstSolutionRoutes: array expected";
- for (var i = 0; i < message.injectedFirstSolutionRoutes.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentRoute.verify(message.injectedFirstSolutionRoutes[i]);
- if (error)
- return "injectedFirstSolutionRoutes." + error;
- }
- }
- if (message.injectedSolutionConstraint != null && message.hasOwnProperty("injectedSolutionConstraint")) {
- var error = $root.google.cloud.optimization.v1.InjectedSolutionConstraint.verify(message.injectedSolutionConstraint);
- if (error)
- return "injectedSolutionConstraint." + error;
- }
- if (message.refreshDetailsRoutes != null && message.hasOwnProperty("refreshDetailsRoutes")) {
- if (!Array.isArray(message.refreshDetailsRoutes))
- return "refreshDetailsRoutes: array expected";
- for (var i = 0; i < message.refreshDetailsRoutes.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentRoute.verify(message.refreshDetailsRoutes[i]);
- if (error)
- return "refreshDetailsRoutes." + error;
- }
- }
- if (message.interpretInjectedSolutionsUsingLabels != null && message.hasOwnProperty("interpretInjectedSolutionsUsingLabels"))
- if (typeof message.interpretInjectedSolutionsUsingLabels !== "boolean")
- return "interpretInjectedSolutionsUsingLabels: boolean expected";
- if (message.considerRoadTraffic != null && message.hasOwnProperty("considerRoadTraffic"))
- if (typeof message.considerRoadTraffic !== "boolean")
- return "considerRoadTraffic: boolean expected";
- if (message.populatePolylines != null && message.hasOwnProperty("populatePolylines"))
- if (typeof message.populatePolylines !== "boolean")
- return "populatePolylines: boolean expected";
- if (message.populateTransitionPolylines != null && message.hasOwnProperty("populateTransitionPolylines"))
- if (typeof message.populateTransitionPolylines !== "boolean")
- return "populateTransitionPolylines: boolean expected";
- if (message.allowLargeDeadlineDespiteInterruptionRisk != null && message.hasOwnProperty("allowLargeDeadlineDespiteInterruptionRisk"))
- if (typeof message.allowLargeDeadlineDespiteInterruptionRisk !== "boolean")
- return "allowLargeDeadlineDespiteInterruptionRisk: boolean expected";
- if (message.useGeodesicDistances != null && message.hasOwnProperty("useGeodesicDistances"))
- if (typeof message.useGeodesicDistances !== "boolean")
- return "useGeodesicDistances: boolean expected";
- if (message.geodesicMetersPerSecond != null && message.hasOwnProperty("geodesicMetersPerSecond")) {
- properties._geodesicMetersPerSecond = 1;
- if (typeof message.geodesicMetersPerSecond !== "number")
- return "geodesicMetersPerSecond: number expected";
- }
- if (message.maxValidationErrors != null && message.hasOwnProperty("maxValidationErrors")) {
- properties._maxValidationErrors = 1;
- if (!$util.isInteger(message.maxValidationErrors))
- return "maxValidationErrors: integer expected";
- }
- if (message.label != null && message.hasOwnProperty("label"))
- if (!$util.isString(message.label))
- return "label: string expected";
- if (message.populateTravelStepPolylines != null && message.hasOwnProperty("populateTravelStepPolylines"))
- if (typeof message.populateTravelStepPolylines !== "boolean")
- return "populateTravelStepPolylines: boolean expected";
- return null;
- };
-
- /**
- * Creates an OptimizeToursRequest message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.OptimizeToursRequest} OptimizeToursRequest
- */
- OptimizeToursRequest.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.OptimizeToursRequest)
- return object;
- var message = new $root.google.cloud.optimization.v1.OptimizeToursRequest();
- if (object.parent != null)
- message.parent = String(object.parent);
- if (object.timeout != null) {
- if (typeof object.timeout !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursRequest.timeout: object expected");
- message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout);
- }
- if (object.model != null) {
- if (typeof object.model !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursRequest.model: object expected");
- message.model = $root.google.cloud.optimization.v1.ShipmentModel.fromObject(object.model);
- }
- switch (object.solvingMode) {
- default:
- if (typeof object.solvingMode === "number") {
- message.solvingMode = object.solvingMode;
- break;
- }
- break;
- case "DEFAULT_SOLVE":
- case 0:
- message.solvingMode = 0;
- break;
- case "VALIDATE_ONLY":
- case 1:
- message.solvingMode = 1;
- break;
- case "DETECT_SOME_INFEASIBLE_SHIPMENTS":
- case 2:
- message.solvingMode = 2;
- break;
- }
- switch (object.searchMode) {
- default:
- if (typeof object.searchMode === "number") {
- message.searchMode = object.searchMode;
- break;
- }
- break;
- case "SEARCH_MODE_UNSPECIFIED":
- case 0:
- message.searchMode = 0;
- break;
- case "RETURN_FAST":
- case 1:
- message.searchMode = 1;
- break;
- case "CONSUME_ALL_AVAILABLE_TIME":
- case 2:
- message.searchMode = 2;
- break;
- }
- if (object.injectedFirstSolutionRoutes) {
- if (!Array.isArray(object.injectedFirstSolutionRoutes))
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursRequest.injectedFirstSolutionRoutes: array expected");
- message.injectedFirstSolutionRoutes = [];
- for (var i = 0; i < object.injectedFirstSolutionRoutes.length; ++i) {
- if (typeof object.injectedFirstSolutionRoutes[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursRequest.injectedFirstSolutionRoutes: object expected");
- message.injectedFirstSolutionRoutes[i] = $root.google.cloud.optimization.v1.ShipmentRoute.fromObject(object.injectedFirstSolutionRoutes[i]);
- }
- }
- if (object.injectedSolutionConstraint != null) {
- if (typeof object.injectedSolutionConstraint !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursRequest.injectedSolutionConstraint: object expected");
- message.injectedSolutionConstraint = $root.google.cloud.optimization.v1.InjectedSolutionConstraint.fromObject(object.injectedSolutionConstraint);
- }
- if (object.refreshDetailsRoutes) {
- if (!Array.isArray(object.refreshDetailsRoutes))
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursRequest.refreshDetailsRoutes: array expected");
- message.refreshDetailsRoutes = [];
- for (var i = 0; i < object.refreshDetailsRoutes.length; ++i) {
- if (typeof object.refreshDetailsRoutes[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursRequest.refreshDetailsRoutes: object expected");
- message.refreshDetailsRoutes[i] = $root.google.cloud.optimization.v1.ShipmentRoute.fromObject(object.refreshDetailsRoutes[i]);
- }
- }
- if (object.interpretInjectedSolutionsUsingLabels != null)
- message.interpretInjectedSolutionsUsingLabels = Boolean(object.interpretInjectedSolutionsUsingLabels);
- if (object.considerRoadTraffic != null)
- message.considerRoadTraffic = Boolean(object.considerRoadTraffic);
- if (object.populatePolylines != null)
- message.populatePolylines = Boolean(object.populatePolylines);
- if (object.populateTransitionPolylines != null)
- message.populateTransitionPolylines = Boolean(object.populateTransitionPolylines);
- if (object.allowLargeDeadlineDespiteInterruptionRisk != null)
- message.allowLargeDeadlineDespiteInterruptionRisk = Boolean(object.allowLargeDeadlineDespiteInterruptionRisk);
- if (object.useGeodesicDistances != null)
- message.useGeodesicDistances = Boolean(object.useGeodesicDistances);
- if (object.geodesicMetersPerSecond != null)
- message.geodesicMetersPerSecond = Number(object.geodesicMetersPerSecond);
- if (object.maxValidationErrors != null)
- message.maxValidationErrors = object.maxValidationErrors | 0;
- if (object.label != null)
- message.label = String(object.label);
- if (object.populateTravelStepPolylines != null)
- message.populateTravelStepPolylines = Boolean(object.populateTravelStepPolylines);
- return message;
- };
-
- /**
- * Creates a plain object from an OptimizeToursRequest message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @static
- * @param {google.cloud.optimization.v1.OptimizeToursRequest} message OptimizeToursRequest
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- OptimizeToursRequest.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.injectedFirstSolutionRoutes = [];
- object.refreshDetailsRoutes = [];
- }
- if (options.defaults) {
- object.parent = "";
- object.timeout = null;
- object.model = null;
- object.solvingMode = options.enums === String ? "DEFAULT_SOLVE" : 0;
- object.searchMode = options.enums === String ? "SEARCH_MODE_UNSPECIFIED" : 0;
- object.injectedSolutionConstraint = null;
- object.interpretInjectedSolutionsUsingLabels = false;
- object.considerRoadTraffic = false;
- object.populatePolylines = false;
- object.populateTransitionPolylines = false;
- object.allowLargeDeadlineDespiteInterruptionRisk = false;
- object.useGeodesicDistances = false;
- object.label = "";
- object.populateTravelStepPolylines = false;
- }
- if (message.parent != null && message.hasOwnProperty("parent"))
- object.parent = message.parent;
- if (message.timeout != null && message.hasOwnProperty("timeout"))
- object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options);
- if (message.model != null && message.hasOwnProperty("model"))
- object.model = $root.google.cloud.optimization.v1.ShipmentModel.toObject(message.model, options);
- if (message.solvingMode != null && message.hasOwnProperty("solvingMode"))
- object.solvingMode = options.enums === String ? $root.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode[message.solvingMode] === undefined ? message.solvingMode : $root.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode[message.solvingMode] : message.solvingMode;
- if (message.maxValidationErrors != null && message.hasOwnProperty("maxValidationErrors")) {
- object.maxValidationErrors = message.maxValidationErrors;
- if (options.oneofs)
- object._maxValidationErrors = "maxValidationErrors";
- }
- if (message.searchMode != null && message.hasOwnProperty("searchMode"))
- object.searchMode = options.enums === String ? $root.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode[message.searchMode] === undefined ? message.searchMode : $root.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode[message.searchMode] : message.searchMode;
- if (message.injectedFirstSolutionRoutes && message.injectedFirstSolutionRoutes.length) {
- object.injectedFirstSolutionRoutes = [];
- for (var j = 0; j < message.injectedFirstSolutionRoutes.length; ++j)
- object.injectedFirstSolutionRoutes[j] = $root.google.cloud.optimization.v1.ShipmentRoute.toObject(message.injectedFirstSolutionRoutes[j], options);
- }
- if (message.injectedSolutionConstraint != null && message.hasOwnProperty("injectedSolutionConstraint"))
- object.injectedSolutionConstraint = $root.google.cloud.optimization.v1.InjectedSolutionConstraint.toObject(message.injectedSolutionConstraint, options);
- if (message.refreshDetailsRoutes && message.refreshDetailsRoutes.length) {
- object.refreshDetailsRoutes = [];
- for (var j = 0; j < message.refreshDetailsRoutes.length; ++j)
- object.refreshDetailsRoutes[j] = $root.google.cloud.optimization.v1.ShipmentRoute.toObject(message.refreshDetailsRoutes[j], options);
- }
- if (message.interpretInjectedSolutionsUsingLabels != null && message.hasOwnProperty("interpretInjectedSolutionsUsingLabels"))
- object.interpretInjectedSolutionsUsingLabels = message.interpretInjectedSolutionsUsingLabels;
- if (message.considerRoadTraffic != null && message.hasOwnProperty("considerRoadTraffic"))
- object.considerRoadTraffic = message.considerRoadTraffic;
- if (message.populatePolylines != null && message.hasOwnProperty("populatePolylines"))
- object.populatePolylines = message.populatePolylines;
- if (message.populateTransitionPolylines != null && message.hasOwnProperty("populateTransitionPolylines"))
- object.populateTransitionPolylines = message.populateTransitionPolylines;
- if (message.allowLargeDeadlineDespiteInterruptionRisk != null && message.hasOwnProperty("allowLargeDeadlineDespiteInterruptionRisk"))
- object.allowLargeDeadlineDespiteInterruptionRisk = message.allowLargeDeadlineDespiteInterruptionRisk;
- if (message.useGeodesicDistances != null && message.hasOwnProperty("useGeodesicDistances"))
- object.useGeodesicDistances = message.useGeodesicDistances;
- if (message.geodesicMetersPerSecond != null && message.hasOwnProperty("geodesicMetersPerSecond")) {
- object.geodesicMetersPerSecond = options.json && !isFinite(message.geodesicMetersPerSecond) ? String(message.geodesicMetersPerSecond) : message.geodesicMetersPerSecond;
- if (options.oneofs)
- object._geodesicMetersPerSecond = "geodesicMetersPerSecond";
- }
- if (message.label != null && message.hasOwnProperty("label"))
- object.label = message.label;
- if (message.populateTravelStepPolylines != null && message.hasOwnProperty("populateTravelStepPolylines"))
- object.populateTravelStepPolylines = message.populateTravelStepPolylines;
- return object;
- };
-
- /**
- * Converts this OptimizeToursRequest to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @instance
- * @returns {Object.} JSON object
- */
- OptimizeToursRequest.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for OptimizeToursRequest
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.OptimizeToursRequest
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- OptimizeToursRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.OptimizeToursRequest";
- };
-
- /**
- * SolvingMode enum.
- * @name google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode
- * @enum {number}
- * @property {number} DEFAULT_SOLVE=0 DEFAULT_SOLVE value
- * @property {number} VALIDATE_ONLY=1 VALIDATE_ONLY value
- * @property {number} DETECT_SOME_INFEASIBLE_SHIPMENTS=2 DETECT_SOME_INFEASIBLE_SHIPMENTS value
- */
- OptimizeToursRequest.SolvingMode = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "DEFAULT_SOLVE"] = 0;
- values[valuesById[1] = "VALIDATE_ONLY"] = 1;
- values[valuesById[2] = "DETECT_SOME_INFEASIBLE_SHIPMENTS"] = 2;
- return values;
- })();
-
- /**
- * SearchMode enum.
- * @name google.cloud.optimization.v1.OptimizeToursRequest.SearchMode
- * @enum {number}
- * @property {number} SEARCH_MODE_UNSPECIFIED=0 SEARCH_MODE_UNSPECIFIED value
- * @property {number} RETURN_FAST=1 RETURN_FAST value
- * @property {number} CONSUME_ALL_AVAILABLE_TIME=2 CONSUME_ALL_AVAILABLE_TIME value
- */
- OptimizeToursRequest.SearchMode = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "SEARCH_MODE_UNSPECIFIED"] = 0;
- values[valuesById[1] = "RETURN_FAST"] = 1;
- values[valuesById[2] = "CONSUME_ALL_AVAILABLE_TIME"] = 2;
- return values;
- })();
-
- return OptimizeToursRequest;
- })();
-
- v1.OptimizeToursResponse = (function() {
-
- /**
- * Properties of an OptimizeToursResponse.
- * @memberof google.cloud.optimization.v1
- * @interface IOptimizeToursResponse
- * @property {Array.|null} [routes] OptimizeToursResponse routes
- * @property {string|null} [requestLabel] OptimizeToursResponse requestLabel
- * @property {Array.|null} [skippedShipments] OptimizeToursResponse skippedShipments
- * @property {Array.|null} [validationErrors] OptimizeToursResponse validationErrors
- * @property {google.cloud.optimization.v1.OptimizeToursResponse.IMetrics|null} [metrics] OptimizeToursResponse metrics
- * @property {number|null} [totalCost] OptimizeToursResponse totalCost
- */
-
- /**
- * Constructs a new OptimizeToursResponse.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents an OptimizeToursResponse.
- * @implements IOptimizeToursResponse
- * @constructor
- * @param {google.cloud.optimization.v1.IOptimizeToursResponse=} [properties] Properties to set
- */
- function OptimizeToursResponse(properties) {
- this.routes = [];
- this.skippedShipments = [];
- this.validationErrors = [];
- 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]];
- }
-
- /**
- * OptimizeToursResponse routes.
- * @member {Array.} routes
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @instance
- */
- OptimizeToursResponse.prototype.routes = $util.emptyArray;
-
- /**
- * OptimizeToursResponse requestLabel.
- * @member {string} requestLabel
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @instance
- */
- OptimizeToursResponse.prototype.requestLabel = "";
-
- /**
- * OptimizeToursResponse skippedShipments.
- * @member {Array.} skippedShipments
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @instance
- */
- OptimizeToursResponse.prototype.skippedShipments = $util.emptyArray;
-
- /**
- * OptimizeToursResponse validationErrors.
- * @member {Array.} validationErrors
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @instance
- */
- OptimizeToursResponse.prototype.validationErrors = $util.emptyArray;
-
- /**
- * OptimizeToursResponse metrics.
- * @member {google.cloud.optimization.v1.OptimizeToursResponse.IMetrics|null|undefined} metrics
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @instance
- */
- OptimizeToursResponse.prototype.metrics = null;
-
- /**
- * OptimizeToursResponse totalCost.
- * @member {number} totalCost
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @instance
- */
- OptimizeToursResponse.prototype.totalCost = 0;
-
- /**
- * Creates a new OptimizeToursResponse instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @static
- * @param {google.cloud.optimization.v1.IOptimizeToursResponse=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.OptimizeToursResponse} OptimizeToursResponse instance
- */
- OptimizeToursResponse.create = function create(properties) {
- return new OptimizeToursResponse(properties);
- };
-
- /**
- * Encodes the specified OptimizeToursResponse message. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursResponse.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @static
- * @param {google.cloud.optimization.v1.IOptimizeToursResponse} message OptimizeToursResponse message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- OptimizeToursResponse.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.routes != null && message.routes.length)
- for (var i = 0; i < message.routes.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentRoute.encode(message.routes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.totalCost != null && Object.hasOwnProperty.call(message, "totalCost"))
- writer.uint32(/* id 2, wireType 1 =*/17).double(message.totalCost);
- if (message.requestLabel != null && Object.hasOwnProperty.call(message, "requestLabel"))
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestLabel);
- if (message.skippedShipments != null && message.skippedShipments.length)
- for (var i = 0; i < message.skippedShipments.length; ++i)
- $root.google.cloud.optimization.v1.SkippedShipment.encode(message.skippedShipments[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.validationErrors != null && message.validationErrors.length)
- for (var i = 0; i < message.validationErrors.length; ++i)
- $root.google.cloud.optimization.v1.OptimizeToursValidationError.encode(message.validationErrors[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics"))
- $root.google.cloud.optimization.v1.OptimizeToursResponse.Metrics.encode(message.metrics, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified OptimizeToursResponse message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursResponse.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @static
- * @param {google.cloud.optimization.v1.IOptimizeToursResponse} message OptimizeToursResponse message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- OptimizeToursResponse.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes an OptimizeToursResponse message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.OptimizeToursResponse} OptimizeToursResponse
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- OptimizeToursResponse.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.optimization.v1.OptimizeToursResponse();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (!(message.routes && message.routes.length))
- message.routes = [];
- message.routes.push($root.google.cloud.optimization.v1.ShipmentRoute.decode(reader, reader.uint32()));
- break;
- }
- case 3: {
- message.requestLabel = reader.string();
- break;
- }
- case 4: {
- if (!(message.skippedShipments && message.skippedShipments.length))
- message.skippedShipments = [];
- message.skippedShipments.push($root.google.cloud.optimization.v1.SkippedShipment.decode(reader, reader.uint32()));
- break;
- }
- case 5: {
- if (!(message.validationErrors && message.validationErrors.length))
- message.validationErrors = [];
- message.validationErrors.push($root.google.cloud.optimization.v1.OptimizeToursValidationError.decode(reader, reader.uint32()));
- break;
- }
- case 6: {
- message.metrics = $root.google.cloud.optimization.v1.OptimizeToursResponse.Metrics.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.totalCost = reader.double();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes an OptimizeToursResponse message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.OptimizeToursResponse} OptimizeToursResponse
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- OptimizeToursResponse.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies an OptimizeToursResponse message.
- * @function verify
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- OptimizeToursResponse.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.routes != null && message.hasOwnProperty("routes")) {
- if (!Array.isArray(message.routes))
- return "routes: array expected";
- for (var i = 0; i < message.routes.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentRoute.verify(message.routes[i]);
- if (error)
- return "routes." + error;
- }
- }
- if (message.requestLabel != null && message.hasOwnProperty("requestLabel"))
- if (!$util.isString(message.requestLabel))
- return "requestLabel: string expected";
- if (message.skippedShipments != null && message.hasOwnProperty("skippedShipments")) {
- if (!Array.isArray(message.skippedShipments))
- return "skippedShipments: array expected";
- for (var i = 0; i < message.skippedShipments.length; ++i) {
- var error = $root.google.cloud.optimization.v1.SkippedShipment.verify(message.skippedShipments[i]);
- if (error)
- return "skippedShipments." + error;
- }
- }
- if (message.validationErrors != null && message.hasOwnProperty("validationErrors")) {
- if (!Array.isArray(message.validationErrors))
- return "validationErrors: array expected";
- for (var i = 0; i < message.validationErrors.length; ++i) {
- var error = $root.google.cloud.optimization.v1.OptimizeToursValidationError.verify(message.validationErrors[i]);
- if (error)
- return "validationErrors." + error;
- }
- }
- if (message.metrics != null && message.hasOwnProperty("metrics")) {
- var error = $root.google.cloud.optimization.v1.OptimizeToursResponse.Metrics.verify(message.metrics);
- if (error)
- return "metrics." + error;
- }
- if (message.totalCost != null && message.hasOwnProperty("totalCost"))
- if (typeof message.totalCost !== "number")
- return "totalCost: number expected";
- return null;
- };
-
- /**
- * Creates an OptimizeToursResponse message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.OptimizeToursResponse} OptimizeToursResponse
- */
- OptimizeToursResponse.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.OptimizeToursResponse)
- return object;
- var message = new $root.google.cloud.optimization.v1.OptimizeToursResponse();
- if (object.routes) {
- if (!Array.isArray(object.routes))
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.routes: array expected");
- message.routes = [];
- for (var i = 0; i < object.routes.length; ++i) {
- if (typeof object.routes[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.routes: object expected");
- message.routes[i] = $root.google.cloud.optimization.v1.ShipmentRoute.fromObject(object.routes[i]);
- }
- }
- if (object.requestLabel != null)
- message.requestLabel = String(object.requestLabel);
- if (object.skippedShipments) {
- if (!Array.isArray(object.skippedShipments))
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.skippedShipments: array expected");
- message.skippedShipments = [];
- for (var i = 0; i < object.skippedShipments.length; ++i) {
- if (typeof object.skippedShipments[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.skippedShipments: object expected");
- message.skippedShipments[i] = $root.google.cloud.optimization.v1.SkippedShipment.fromObject(object.skippedShipments[i]);
- }
- }
- if (object.validationErrors) {
- if (!Array.isArray(object.validationErrors))
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.validationErrors: array expected");
- message.validationErrors = [];
- for (var i = 0; i < object.validationErrors.length; ++i) {
- if (typeof object.validationErrors[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.validationErrors: object expected");
- message.validationErrors[i] = $root.google.cloud.optimization.v1.OptimizeToursValidationError.fromObject(object.validationErrors[i]);
- }
- }
- if (object.metrics != null) {
- if (typeof object.metrics !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.metrics: object expected");
- message.metrics = $root.google.cloud.optimization.v1.OptimizeToursResponse.Metrics.fromObject(object.metrics);
- }
- if (object.totalCost != null)
- message.totalCost = Number(object.totalCost);
- return message;
- };
-
- /**
- * Creates a plain object from an OptimizeToursResponse message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @static
- * @param {google.cloud.optimization.v1.OptimizeToursResponse} message OptimizeToursResponse
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- OptimizeToursResponse.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.routes = [];
- object.skippedShipments = [];
- object.validationErrors = [];
- }
- if (options.defaults) {
- object.totalCost = 0;
- object.requestLabel = "";
- object.metrics = null;
- }
- if (message.routes && message.routes.length) {
- object.routes = [];
- for (var j = 0; j < message.routes.length; ++j)
- object.routes[j] = $root.google.cloud.optimization.v1.ShipmentRoute.toObject(message.routes[j], options);
- }
- if (message.totalCost != null && message.hasOwnProperty("totalCost"))
- object.totalCost = options.json && !isFinite(message.totalCost) ? String(message.totalCost) : message.totalCost;
- if (message.requestLabel != null && message.hasOwnProperty("requestLabel"))
- object.requestLabel = message.requestLabel;
- if (message.skippedShipments && message.skippedShipments.length) {
- object.skippedShipments = [];
- for (var j = 0; j < message.skippedShipments.length; ++j)
- object.skippedShipments[j] = $root.google.cloud.optimization.v1.SkippedShipment.toObject(message.skippedShipments[j], options);
- }
- if (message.validationErrors && message.validationErrors.length) {
- object.validationErrors = [];
- for (var j = 0; j < message.validationErrors.length; ++j)
- object.validationErrors[j] = $root.google.cloud.optimization.v1.OptimizeToursValidationError.toObject(message.validationErrors[j], options);
- }
- if (message.metrics != null && message.hasOwnProperty("metrics"))
- object.metrics = $root.google.cloud.optimization.v1.OptimizeToursResponse.Metrics.toObject(message.metrics, options);
- return object;
- };
-
- /**
- * Converts this OptimizeToursResponse to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @instance
- * @returns {Object.} JSON object
- */
- OptimizeToursResponse.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for OptimizeToursResponse
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- OptimizeToursResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.OptimizeToursResponse";
- };
-
- OptimizeToursResponse.Metrics = (function() {
-
- /**
- * Properties of a Metrics.
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @interface IMetrics
- * @property {google.cloud.optimization.v1.IAggregatedMetrics|null} [aggregatedRouteMetrics] Metrics aggregatedRouteMetrics
- * @property {number|null} [skippedMandatoryShipmentCount] Metrics skippedMandatoryShipmentCount
- * @property {number|null} [usedVehicleCount] Metrics usedVehicleCount
- * @property {google.protobuf.ITimestamp|null} [earliestVehicleStartTime] Metrics earliestVehicleStartTime
- * @property {google.protobuf.ITimestamp|null} [latestVehicleEndTime] Metrics latestVehicleEndTime
- * @property {Object.|null} [costs] Metrics costs
- * @property {number|null} [totalCost] Metrics totalCost
- */
-
- /**
- * Constructs a new Metrics.
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse
- * @classdesc Represents a Metrics.
- * @implements IMetrics
- * @constructor
- * @param {google.cloud.optimization.v1.OptimizeToursResponse.IMetrics=} [properties] Properties to set
- */
- function Metrics(properties) {
- this.costs = {};
- 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]];
- }
-
- /**
- * Metrics aggregatedRouteMetrics.
- * @member {google.cloud.optimization.v1.IAggregatedMetrics|null|undefined} aggregatedRouteMetrics
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @instance
- */
- Metrics.prototype.aggregatedRouteMetrics = null;
-
- /**
- * Metrics skippedMandatoryShipmentCount.
- * @member {number} skippedMandatoryShipmentCount
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @instance
- */
- Metrics.prototype.skippedMandatoryShipmentCount = 0;
-
- /**
- * Metrics usedVehicleCount.
- * @member {number} usedVehicleCount
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @instance
- */
- Metrics.prototype.usedVehicleCount = 0;
-
- /**
- * Metrics earliestVehicleStartTime.
- * @member {google.protobuf.ITimestamp|null|undefined} earliestVehicleStartTime
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @instance
- */
- Metrics.prototype.earliestVehicleStartTime = null;
-
- /**
- * Metrics latestVehicleEndTime.
- * @member {google.protobuf.ITimestamp|null|undefined} latestVehicleEndTime
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @instance
- */
- Metrics.prototype.latestVehicleEndTime = null;
-
- /**
- * Metrics costs.
- * @member {Object.} costs
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @instance
- */
- Metrics.prototype.costs = $util.emptyObject;
-
- /**
- * Metrics totalCost.
- * @member {number} totalCost
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @instance
- */
- Metrics.prototype.totalCost = 0;
-
- /**
- * Creates a new Metrics instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @static
- * @param {google.cloud.optimization.v1.OptimizeToursResponse.IMetrics=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.OptimizeToursResponse.Metrics} Metrics instance
- */
- Metrics.create = function create(properties) {
- return new Metrics(properties);
- };
-
- /**
- * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursResponse.Metrics.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @static
- * @param {google.cloud.optimization.v1.OptimizeToursResponse.IMetrics} message Metrics message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Metrics.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.aggregatedRouteMetrics != null && Object.hasOwnProperty.call(message, "aggregatedRouteMetrics"))
- $root.google.cloud.optimization.v1.AggregatedMetrics.encode(message.aggregatedRouteMetrics, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.skippedMandatoryShipmentCount != null && Object.hasOwnProperty.call(message, "skippedMandatoryShipmentCount"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.skippedMandatoryShipmentCount);
- if (message.usedVehicleCount != null && Object.hasOwnProperty.call(message, "usedVehicleCount"))
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.usedVehicleCount);
- if (message.earliestVehicleStartTime != null && Object.hasOwnProperty.call(message, "earliestVehicleStartTime"))
- $root.google.protobuf.Timestamp.encode(message.earliestVehicleStartTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.latestVehicleEndTime != null && Object.hasOwnProperty.call(message, "latestVehicleEndTime"))
- $root.google.protobuf.Timestamp.encode(message.latestVehicleEndTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- if (message.totalCost != null && Object.hasOwnProperty.call(message, "totalCost"))
- writer.uint32(/* id 6, wireType 1 =*/49).double(message.totalCost);
- if (message.costs != null && Object.hasOwnProperty.call(message, "costs"))
- for (var keys = Object.keys(message.costs), i = 0; i < keys.length; ++i)
- writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 1 =*/17).double(message.costs[keys[i]]).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.OptimizeToursResponse.Metrics.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @static
- * @param {google.cloud.optimization.v1.OptimizeToursResponse.IMetrics} message Metrics message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Metrics.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a Metrics message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.OptimizeToursResponse.Metrics} Metrics
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Metrics.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.optimization.v1.OptimizeToursResponse.Metrics(), key, value;
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.aggregatedRouteMetrics = $root.google.cloud.optimization.v1.AggregatedMetrics.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.skippedMandatoryShipmentCount = reader.int32();
- break;
- }
- case 3: {
- message.usedVehicleCount = reader.int32();
- break;
- }
- case 4: {
- message.earliestVehicleStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 5: {
- message.latestVehicleEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 10: {
- if (message.costs === $util.emptyObject)
- message.costs = {};
- var end2 = reader.uint32() + reader.pos;
- key = "";
- value = 0;
- while (reader.pos < end2) {
- var tag2 = reader.uint32();
- switch (tag2 >>> 3) {
- case 1:
- key = reader.string();
- break;
- case 2:
- value = reader.double();
- break;
- default:
- reader.skipType(tag2 & 7);
- break;
- }
- }
- message.costs[key] = value;
- break;
- }
- case 6: {
- message.totalCost = reader.double();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a Metrics message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.OptimizeToursResponse.Metrics} Metrics
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Metrics.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a Metrics message.
- * @function verify
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Metrics.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.aggregatedRouteMetrics != null && message.hasOwnProperty("aggregatedRouteMetrics")) {
- var error = $root.google.cloud.optimization.v1.AggregatedMetrics.verify(message.aggregatedRouteMetrics);
- if (error)
- return "aggregatedRouteMetrics." + error;
- }
- if (message.skippedMandatoryShipmentCount != null && message.hasOwnProperty("skippedMandatoryShipmentCount"))
- if (!$util.isInteger(message.skippedMandatoryShipmentCount))
- return "skippedMandatoryShipmentCount: integer expected";
- if (message.usedVehicleCount != null && message.hasOwnProperty("usedVehicleCount"))
- if (!$util.isInteger(message.usedVehicleCount))
- return "usedVehicleCount: integer expected";
- if (message.earliestVehicleStartTime != null && message.hasOwnProperty("earliestVehicleStartTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.earliestVehicleStartTime);
- if (error)
- return "earliestVehicleStartTime." + error;
- }
- if (message.latestVehicleEndTime != null && message.hasOwnProperty("latestVehicleEndTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.latestVehicleEndTime);
- if (error)
- return "latestVehicleEndTime." + error;
- }
- if (message.costs != null && message.hasOwnProperty("costs")) {
- if (!$util.isObject(message.costs))
- return "costs: object expected";
- var key = Object.keys(message.costs);
- for (var i = 0; i < key.length; ++i)
- if (typeof message.costs[key[i]] !== "number")
- return "costs: number{k:string} expected";
- }
- if (message.totalCost != null && message.hasOwnProperty("totalCost"))
- if (typeof message.totalCost !== "number")
- return "totalCost: number expected";
- return null;
- };
-
- /**
- * Creates a Metrics message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.OptimizeToursResponse.Metrics} Metrics
- */
- Metrics.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.OptimizeToursResponse.Metrics)
- return object;
- var message = new $root.google.cloud.optimization.v1.OptimizeToursResponse.Metrics();
- if (object.aggregatedRouteMetrics != null) {
- if (typeof object.aggregatedRouteMetrics !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.Metrics.aggregatedRouteMetrics: object expected");
- message.aggregatedRouteMetrics = $root.google.cloud.optimization.v1.AggregatedMetrics.fromObject(object.aggregatedRouteMetrics);
- }
- if (object.skippedMandatoryShipmentCount != null)
- message.skippedMandatoryShipmentCount = object.skippedMandatoryShipmentCount | 0;
- if (object.usedVehicleCount != null)
- message.usedVehicleCount = object.usedVehicleCount | 0;
- if (object.earliestVehicleStartTime != null) {
- if (typeof object.earliestVehicleStartTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.Metrics.earliestVehicleStartTime: object expected");
- message.earliestVehicleStartTime = $root.google.protobuf.Timestamp.fromObject(object.earliestVehicleStartTime);
- }
- if (object.latestVehicleEndTime != null) {
- if (typeof object.latestVehicleEndTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.Metrics.latestVehicleEndTime: object expected");
- message.latestVehicleEndTime = $root.google.protobuf.Timestamp.fromObject(object.latestVehicleEndTime);
- }
- if (object.costs) {
- if (typeof object.costs !== "object")
- throw TypeError(".google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs: object expected");
- message.costs = {};
- for (var keys = Object.keys(object.costs), i = 0; i < keys.length; ++i)
- message.costs[keys[i]] = Number(object.costs[keys[i]]);
- }
- if (object.totalCost != null)
- message.totalCost = Number(object.totalCost);
- return message;
- };
-
- /**
- * Creates a plain object from a Metrics message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @static
- * @param {google.cloud.optimization.v1.OptimizeToursResponse.Metrics} message Metrics
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Metrics.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.objects || options.defaults)
- object.costs = {};
- if (options.defaults) {
- object.aggregatedRouteMetrics = null;
- object.skippedMandatoryShipmentCount = 0;
- object.usedVehicleCount = 0;
- object.earliestVehicleStartTime = null;
- object.latestVehicleEndTime = null;
- object.totalCost = 0;
- }
- if (message.aggregatedRouteMetrics != null && message.hasOwnProperty("aggregatedRouteMetrics"))
- object.aggregatedRouteMetrics = $root.google.cloud.optimization.v1.AggregatedMetrics.toObject(message.aggregatedRouteMetrics, options);
- if (message.skippedMandatoryShipmentCount != null && message.hasOwnProperty("skippedMandatoryShipmentCount"))
- object.skippedMandatoryShipmentCount = message.skippedMandatoryShipmentCount;
- if (message.usedVehicleCount != null && message.hasOwnProperty("usedVehicleCount"))
- object.usedVehicleCount = message.usedVehicleCount;
- if (message.earliestVehicleStartTime != null && message.hasOwnProperty("earliestVehicleStartTime"))
- object.earliestVehicleStartTime = $root.google.protobuf.Timestamp.toObject(message.earliestVehicleStartTime, options);
- if (message.latestVehicleEndTime != null && message.hasOwnProperty("latestVehicleEndTime"))
- object.latestVehicleEndTime = $root.google.protobuf.Timestamp.toObject(message.latestVehicleEndTime, options);
- if (message.totalCost != null && message.hasOwnProperty("totalCost"))
- object.totalCost = options.json && !isFinite(message.totalCost) ? String(message.totalCost) : message.totalCost;
- var keys2;
- if (message.costs && (keys2 = Object.keys(message.costs)).length) {
- object.costs = {};
- for (var j = 0; j < keys2.length; ++j)
- object.costs[keys2[j]] = options.json && !isFinite(message.costs[keys2[j]]) ? String(message.costs[keys2[j]]) : message.costs[keys2[j]];
- }
- return object;
- };
-
- /**
- * Converts this Metrics to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @instance
- * @returns {Object.} JSON object
- */
- Metrics.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for Metrics
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.OptimizeToursResponse.Metrics
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Metrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.OptimizeToursResponse.Metrics";
- };
-
- return Metrics;
- })();
-
- return OptimizeToursResponse;
- })();
-
- v1.BatchOptimizeToursRequest = (function() {
-
- /**
- * Properties of a BatchOptimizeToursRequest.
- * @memberof google.cloud.optimization.v1
- * @interface IBatchOptimizeToursRequest
- * @property {string|null} [parent] BatchOptimizeToursRequest parent
- * @property {Array.|null} [modelConfigs] BatchOptimizeToursRequest modelConfigs
- */
-
- /**
- * Constructs a new BatchOptimizeToursRequest.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a BatchOptimizeToursRequest.
- * @implements IBatchOptimizeToursRequest
- * @constructor
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursRequest=} [properties] Properties to set
- */
- function BatchOptimizeToursRequest(properties) {
- this.modelConfigs = [];
- 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]];
- }
-
- /**
- * BatchOptimizeToursRequest parent.
- * @member {string} parent
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @instance
- */
- BatchOptimizeToursRequest.prototype.parent = "";
-
- /**
- * BatchOptimizeToursRequest modelConfigs.
- * @member {Array.} modelConfigs
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @instance
- */
- BatchOptimizeToursRequest.prototype.modelConfigs = $util.emptyArray;
-
- /**
- * Creates a new BatchOptimizeToursRequest instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @static
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursRequest=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursRequest} BatchOptimizeToursRequest instance
- */
- BatchOptimizeToursRequest.create = function create(properties) {
- return new BatchOptimizeToursRequest(properties);
- };
-
- /**
- * Encodes the specified BatchOptimizeToursRequest message. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursRequest.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @static
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursRequest} message BatchOptimizeToursRequest message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- BatchOptimizeToursRequest.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.modelConfigs != null && message.modelConfigs.length)
- for (var i = 0; i < message.modelConfigs.length; ++i)
- $root.google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.encode(message.modelConfigs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified BatchOptimizeToursRequest message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursRequest.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @static
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursRequest} message BatchOptimizeToursRequest message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- BatchOptimizeToursRequest.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a BatchOptimizeToursRequest message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursRequest} BatchOptimizeToursRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- BatchOptimizeToursRequest.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.optimization.v1.BatchOptimizeToursRequest();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.parent = reader.string();
- break;
- }
- case 2: {
- if (!(message.modelConfigs && message.modelConfigs.length))
- message.modelConfigs = [];
- message.modelConfigs.push($root.google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a BatchOptimizeToursRequest message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursRequest} BatchOptimizeToursRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- BatchOptimizeToursRequest.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a BatchOptimizeToursRequest message.
- * @function verify
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- BatchOptimizeToursRequest.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.modelConfigs != null && message.hasOwnProperty("modelConfigs")) {
- if (!Array.isArray(message.modelConfigs))
- return "modelConfigs: array expected";
- for (var i = 0; i < message.modelConfigs.length; ++i) {
- var error = $root.google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.verify(message.modelConfigs[i]);
- if (error)
- return "modelConfigs." + error;
- }
- }
- return null;
- };
-
- /**
- * Creates a BatchOptimizeToursRequest message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursRequest} BatchOptimizeToursRequest
- */
- BatchOptimizeToursRequest.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.BatchOptimizeToursRequest)
- return object;
- var message = new $root.google.cloud.optimization.v1.BatchOptimizeToursRequest();
- if (object.parent != null)
- message.parent = String(object.parent);
- if (object.modelConfigs) {
- if (!Array.isArray(object.modelConfigs))
- throw TypeError(".google.cloud.optimization.v1.BatchOptimizeToursRequest.modelConfigs: array expected");
- message.modelConfigs = [];
- for (var i = 0; i < object.modelConfigs.length; ++i) {
- if (typeof object.modelConfigs[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.BatchOptimizeToursRequest.modelConfigs: object expected");
- message.modelConfigs[i] = $root.google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.fromObject(object.modelConfigs[i]);
- }
- }
- return message;
- };
-
- /**
- * Creates a plain object from a BatchOptimizeToursRequest message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @static
- * @param {google.cloud.optimization.v1.BatchOptimizeToursRequest} message BatchOptimizeToursRequest
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- BatchOptimizeToursRequest.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.modelConfigs = [];
- if (options.defaults)
- object.parent = "";
- if (message.parent != null && message.hasOwnProperty("parent"))
- object.parent = message.parent;
- if (message.modelConfigs && message.modelConfigs.length) {
- object.modelConfigs = [];
- for (var j = 0; j < message.modelConfigs.length; ++j)
- object.modelConfigs[j] = $root.google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.toObject(message.modelConfigs[j], options);
- }
- return object;
- };
-
- /**
- * Converts this BatchOptimizeToursRequest to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @instance
- * @returns {Object.} JSON object
- */
- BatchOptimizeToursRequest.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for BatchOptimizeToursRequest
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- BatchOptimizeToursRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.BatchOptimizeToursRequest";
- };
-
- BatchOptimizeToursRequest.AsyncModelConfig = (function() {
-
- /**
- * Properties of an AsyncModelConfig.
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @interface IAsyncModelConfig
- * @property {string|null} [displayName] AsyncModelConfig displayName
- * @property {google.cloud.optimization.v1.IInputConfig|null} [inputConfig] AsyncModelConfig inputConfig
- * @property {google.cloud.optimization.v1.IOutputConfig|null} [outputConfig] AsyncModelConfig outputConfig
- * @property {boolean|null} [enableCheckpoints] AsyncModelConfig enableCheckpoints
- */
-
- /**
- * Constructs a new AsyncModelConfig.
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest
- * @classdesc Represents an AsyncModelConfig.
- * @implements IAsyncModelConfig
- * @constructor
- * @param {google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig=} [properties] Properties to set
- */
- function AsyncModelConfig(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]];
- }
-
- /**
- * AsyncModelConfig displayName.
- * @member {string} displayName
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @instance
- */
- AsyncModelConfig.prototype.displayName = "";
-
- /**
- * AsyncModelConfig inputConfig.
- * @member {google.cloud.optimization.v1.IInputConfig|null|undefined} inputConfig
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @instance
- */
- AsyncModelConfig.prototype.inputConfig = null;
-
- /**
- * AsyncModelConfig outputConfig.
- * @member {google.cloud.optimization.v1.IOutputConfig|null|undefined} outputConfig
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @instance
- */
- AsyncModelConfig.prototype.outputConfig = null;
-
- /**
- * AsyncModelConfig enableCheckpoints.
- * @member {boolean} enableCheckpoints
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @instance
- */
- AsyncModelConfig.prototype.enableCheckpoints = false;
-
- /**
- * Creates a new AsyncModelConfig instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @static
- * @param {google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig} AsyncModelConfig instance
- */
- AsyncModelConfig.create = function create(properties) {
- return new AsyncModelConfig(properties);
- };
-
- /**
- * Encodes the specified AsyncModelConfig message. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @static
- * @param {google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig} message AsyncModelConfig message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- AsyncModelConfig.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName);
- if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
- $root.google.cloud.optimization.v1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
- $root.google.cloud.optimization.v1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.enableCheckpoints != null && Object.hasOwnProperty.call(message, "enableCheckpoints"))
- writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableCheckpoints);
- return writer;
- };
-
- /**
- * Encodes the specified AsyncModelConfig message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @static
- * @param {google.cloud.optimization.v1.BatchOptimizeToursRequest.IAsyncModelConfig} message AsyncModelConfig message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- AsyncModelConfig.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes an AsyncModelConfig message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig} AsyncModelConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- AsyncModelConfig.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.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.displayName = reader.string();
- break;
- }
- case 2: {
- message.inputConfig = $root.google.cloud.optimization.v1.InputConfig.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.outputConfig = $root.google.cloud.optimization.v1.OutputConfig.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- message.enableCheckpoints = reader.bool();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes an AsyncModelConfig message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig} AsyncModelConfig
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- AsyncModelConfig.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies an AsyncModelConfig message.
- * @function verify
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- AsyncModelConfig.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.displayName != null && message.hasOwnProperty("displayName"))
- if (!$util.isString(message.displayName))
- return "displayName: string expected";
- if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
- var error = $root.google.cloud.optimization.v1.InputConfig.verify(message.inputConfig);
- if (error)
- return "inputConfig." + error;
- }
- if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
- var error = $root.google.cloud.optimization.v1.OutputConfig.verify(message.outputConfig);
- if (error)
- return "outputConfig." + error;
- }
- if (message.enableCheckpoints != null && message.hasOwnProperty("enableCheckpoints"))
- if (typeof message.enableCheckpoints !== "boolean")
- return "enableCheckpoints: boolean expected";
- return null;
- };
-
- /**
- * Creates an AsyncModelConfig message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig} AsyncModelConfig
- */
- AsyncModelConfig.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig)
- return object;
- var message = new $root.google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig();
- if (object.displayName != null)
- message.displayName = String(object.displayName);
- if (object.inputConfig != null) {
- if (typeof object.inputConfig !== "object")
- throw TypeError(".google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.inputConfig: object expected");
- message.inputConfig = $root.google.cloud.optimization.v1.InputConfig.fromObject(object.inputConfig);
- }
- if (object.outputConfig != null) {
- if (typeof object.outputConfig !== "object")
- throw TypeError(".google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig.outputConfig: object expected");
- message.outputConfig = $root.google.cloud.optimization.v1.OutputConfig.fromObject(object.outputConfig);
- }
- if (object.enableCheckpoints != null)
- message.enableCheckpoints = Boolean(object.enableCheckpoints);
- return message;
- };
-
- /**
- * Creates a plain object from an AsyncModelConfig message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @static
- * @param {google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig} message AsyncModelConfig
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- AsyncModelConfig.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.displayName = "";
- object.inputConfig = null;
- object.outputConfig = null;
- object.enableCheckpoints = false;
- }
- if (message.displayName != null && message.hasOwnProperty("displayName"))
- object.displayName = message.displayName;
- if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
- object.inputConfig = $root.google.cloud.optimization.v1.InputConfig.toObject(message.inputConfig, options);
- if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
- object.outputConfig = $root.google.cloud.optimization.v1.OutputConfig.toObject(message.outputConfig, options);
- if (message.enableCheckpoints != null && message.hasOwnProperty("enableCheckpoints"))
- object.enableCheckpoints = message.enableCheckpoints;
- return object;
- };
-
- /**
- * Converts this AsyncModelConfig to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @instance
- * @returns {Object.} JSON object
- */
- AsyncModelConfig.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for AsyncModelConfig
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- AsyncModelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig";
- };
-
- return AsyncModelConfig;
- })();
-
- return BatchOptimizeToursRequest;
- })();
-
- v1.BatchOptimizeToursResponse = (function() {
-
- /**
- * Properties of a BatchOptimizeToursResponse.
- * @memberof google.cloud.optimization.v1
- * @interface IBatchOptimizeToursResponse
- */
-
- /**
- * Constructs a new BatchOptimizeToursResponse.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a BatchOptimizeToursResponse.
- * @implements IBatchOptimizeToursResponse
- * @constructor
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursResponse=} [properties] Properties to set
- */
- function BatchOptimizeToursResponse(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- /**
- * Creates a new BatchOptimizeToursResponse instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @static
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursResponse=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursResponse} BatchOptimizeToursResponse instance
- */
- BatchOptimizeToursResponse.create = function create(properties) {
- return new BatchOptimizeToursResponse(properties);
- };
-
- /**
- * Encodes the specified BatchOptimizeToursResponse message. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursResponse.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @static
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursResponse} message BatchOptimizeToursResponse message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- BatchOptimizeToursResponse.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- return writer;
- };
-
- /**
- * Encodes the specified BatchOptimizeToursResponse message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.BatchOptimizeToursResponse.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @static
- * @param {google.cloud.optimization.v1.IBatchOptimizeToursResponse} message BatchOptimizeToursResponse message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- BatchOptimizeToursResponse.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a BatchOptimizeToursResponse message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursResponse} BatchOptimizeToursResponse
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- BatchOptimizeToursResponse.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.optimization.v1.BatchOptimizeToursResponse();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a BatchOptimizeToursResponse message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursResponse} BatchOptimizeToursResponse
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- BatchOptimizeToursResponse.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a BatchOptimizeToursResponse message.
- * @function verify
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- BatchOptimizeToursResponse.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- return null;
- };
-
- /**
- * Creates a BatchOptimizeToursResponse message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.BatchOptimizeToursResponse} BatchOptimizeToursResponse
- */
- BatchOptimizeToursResponse.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.BatchOptimizeToursResponse)
- return object;
- return new $root.google.cloud.optimization.v1.BatchOptimizeToursResponse();
- };
-
- /**
- * Creates a plain object from a BatchOptimizeToursResponse message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @static
- * @param {google.cloud.optimization.v1.BatchOptimizeToursResponse} message BatchOptimizeToursResponse
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- BatchOptimizeToursResponse.toObject = function toObject() {
- return {};
- };
-
- /**
- * Converts this BatchOptimizeToursResponse to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @instance
- * @returns {Object.} JSON object
- */
- BatchOptimizeToursResponse.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for BatchOptimizeToursResponse
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.BatchOptimizeToursResponse
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- BatchOptimizeToursResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.BatchOptimizeToursResponse";
- };
-
- return BatchOptimizeToursResponse;
- })();
-
- v1.ShipmentModel = (function() {
-
- /**
- * Properties of a ShipmentModel.
- * @memberof google.cloud.optimization.v1
- * @interface IShipmentModel
- * @property {Array.|null} [shipments] ShipmentModel shipments
- * @property {Array.|null} [vehicles] ShipmentModel vehicles
- * @property {number|null} [maxActiveVehicles] ShipmentModel maxActiveVehicles
- * @property {google.protobuf.ITimestamp|null} [globalStartTime] ShipmentModel globalStartTime
- * @property {google.protobuf.ITimestamp|null} [globalEndTime] ShipmentModel globalEndTime
- * @property {number|null} [globalDurationCostPerHour] ShipmentModel globalDurationCostPerHour
- * @property {Array.|null} [durationDistanceMatrices] ShipmentModel durationDistanceMatrices
- * @property {Array.|null} [durationDistanceMatrixSrcTags] ShipmentModel durationDistanceMatrixSrcTags
- * @property {Array.|null} [durationDistanceMatrixDstTags] ShipmentModel durationDistanceMatrixDstTags
- * @property {Array.|null} [transitionAttributes] ShipmentModel transitionAttributes
- * @property {Array.|null} [shipmentTypeIncompatibilities] ShipmentModel shipmentTypeIncompatibilities
- * @property {Array.|null} [shipmentTypeRequirements] ShipmentModel shipmentTypeRequirements
- * @property {Array.|null} [precedenceRules] ShipmentModel precedenceRules
- * @property {Array.|null} [breakRules] ShipmentModel breakRules
- */
-
- /**
- * Constructs a new ShipmentModel.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a ShipmentModel.
- * @implements IShipmentModel
- * @constructor
- * @param {google.cloud.optimization.v1.IShipmentModel=} [properties] Properties to set
- */
- function ShipmentModel(properties) {
- this.shipments = [];
- this.vehicles = [];
- this.durationDistanceMatrices = [];
- this.durationDistanceMatrixSrcTags = [];
- this.durationDistanceMatrixDstTags = [];
- this.transitionAttributes = [];
- this.shipmentTypeIncompatibilities = [];
- this.shipmentTypeRequirements = [];
- this.precedenceRules = [];
- this.breakRules = [];
- 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]];
- }
-
- /**
- * ShipmentModel shipments.
- * @member {Array.} shipments
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.shipments = $util.emptyArray;
-
- /**
- * ShipmentModel vehicles.
- * @member {Array.} vehicles
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.vehicles = $util.emptyArray;
-
- /**
- * ShipmentModel maxActiveVehicles.
- * @member {number|null|undefined} maxActiveVehicles
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.maxActiveVehicles = null;
-
- /**
- * ShipmentModel globalStartTime.
- * @member {google.protobuf.ITimestamp|null|undefined} globalStartTime
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.globalStartTime = null;
-
- /**
- * ShipmentModel globalEndTime.
- * @member {google.protobuf.ITimestamp|null|undefined} globalEndTime
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.globalEndTime = null;
-
- /**
- * ShipmentModel globalDurationCostPerHour.
- * @member {number} globalDurationCostPerHour
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.globalDurationCostPerHour = 0;
-
- /**
- * ShipmentModel durationDistanceMatrices.
- * @member {Array.} durationDistanceMatrices
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.durationDistanceMatrices = $util.emptyArray;
-
- /**
- * ShipmentModel durationDistanceMatrixSrcTags.
- * @member {Array.} durationDistanceMatrixSrcTags
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.durationDistanceMatrixSrcTags = $util.emptyArray;
-
- /**
- * ShipmentModel durationDistanceMatrixDstTags.
- * @member {Array.} durationDistanceMatrixDstTags
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.durationDistanceMatrixDstTags = $util.emptyArray;
-
- /**
- * ShipmentModel transitionAttributes.
- * @member {Array.} transitionAttributes
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.transitionAttributes = $util.emptyArray;
-
- /**
- * ShipmentModel shipmentTypeIncompatibilities.
- * @member {Array.} shipmentTypeIncompatibilities
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.shipmentTypeIncompatibilities = $util.emptyArray;
-
- /**
- * ShipmentModel shipmentTypeRequirements.
- * @member {Array.} shipmentTypeRequirements
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.shipmentTypeRequirements = $util.emptyArray;
-
- /**
- * ShipmentModel precedenceRules.
- * @member {Array.} precedenceRules
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.precedenceRules = $util.emptyArray;
-
- /**
- * ShipmentModel breakRules.
- * @member {Array.} breakRules
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- ShipmentModel.prototype.breakRules = $util.emptyArray;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * ShipmentModel _maxActiveVehicles.
- * @member {"maxActiveVehicles"|undefined} _maxActiveVehicles
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- */
- Object.defineProperty(ShipmentModel.prototype, "_maxActiveVehicles", {
- get: $util.oneOfGetter($oneOfFields = ["maxActiveVehicles"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new ShipmentModel instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @static
- * @param {google.cloud.optimization.v1.IShipmentModel=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.ShipmentModel} ShipmentModel instance
- */
- ShipmentModel.create = function create(properties) {
- return new ShipmentModel(properties);
- };
-
- /**
- * Encodes the specified ShipmentModel message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @static
- * @param {google.cloud.optimization.v1.IShipmentModel} message ShipmentModel message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ShipmentModel.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.shipments != null && message.shipments.length)
- for (var i = 0; i < message.shipments.length; ++i)
- $root.google.cloud.optimization.v1.Shipment.encode(message.shipments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.vehicles != null && message.vehicles.length)
- for (var i = 0; i < message.vehicles.length; ++i)
- $root.google.cloud.optimization.v1.Vehicle.encode(message.vehicles[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.maxActiveVehicles != null && Object.hasOwnProperty.call(message, "maxActiveVehicles"))
- writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxActiveVehicles);
- if (message.globalStartTime != null && Object.hasOwnProperty.call(message, "globalStartTime"))
- $root.google.protobuf.Timestamp.encode(message.globalStartTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- if (message.globalEndTime != null && Object.hasOwnProperty.call(message, "globalEndTime"))
- $root.google.protobuf.Timestamp.encode(message.globalEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
- if (message.globalDurationCostPerHour != null && Object.hasOwnProperty.call(message, "globalDurationCostPerHour"))
- writer.uint32(/* id 7, wireType 1 =*/57).double(message.globalDurationCostPerHour);
- if (message.durationDistanceMatrices != null && message.durationDistanceMatrices.length)
- for (var i = 0; i < message.durationDistanceMatrices.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.encode(message.durationDistanceMatrices[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
- if (message.durationDistanceMatrixSrcTags != null && message.durationDistanceMatrixSrcTags.length)
- for (var i = 0; i < message.durationDistanceMatrixSrcTags.length; ++i)
- writer.uint32(/* id 9, wireType 2 =*/74).string(message.durationDistanceMatrixSrcTags[i]);
- if (message.durationDistanceMatrixDstTags != null && message.durationDistanceMatrixDstTags.length)
- for (var i = 0; i < message.durationDistanceMatrixDstTags.length; ++i)
- writer.uint32(/* id 10, wireType 2 =*/82).string(message.durationDistanceMatrixDstTags[i]);
- if (message.transitionAttributes != null && message.transitionAttributes.length)
- for (var i = 0; i < message.transitionAttributes.length; ++i)
- $root.google.cloud.optimization.v1.TransitionAttributes.encode(message.transitionAttributes[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
- if (message.shipmentTypeIncompatibilities != null && message.shipmentTypeIncompatibilities.length)
- for (var i = 0; i < message.shipmentTypeIncompatibilities.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentTypeIncompatibility.encode(message.shipmentTypeIncompatibilities[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
- if (message.shipmentTypeRequirements != null && message.shipmentTypeRequirements.length)
- for (var i = 0; i < message.shipmentTypeRequirements.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentTypeRequirement.encode(message.shipmentTypeRequirements[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
- if (message.precedenceRules != null && message.precedenceRules.length)
- for (var i = 0; i < message.precedenceRules.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.encode(message.precedenceRules[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
- if (message.breakRules != null && message.breakRules.length)
- for (var i = 0; i < message.breakRules.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.encode(message.breakRules[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified ShipmentModel message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @static
- * @param {google.cloud.optimization.v1.IShipmentModel} message ShipmentModel message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ShipmentModel.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a ShipmentModel message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.ShipmentModel} ShipmentModel
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ShipmentModel.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.optimization.v1.ShipmentModel();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (!(message.shipments && message.shipments.length))
- message.shipments = [];
- message.shipments.push($root.google.cloud.optimization.v1.Shipment.decode(reader, reader.uint32()));
- break;
- }
- case 2: {
- if (!(message.vehicles && message.vehicles.length))
- message.vehicles = [];
- message.vehicles.push($root.google.cloud.optimization.v1.Vehicle.decode(reader, reader.uint32()));
- break;
- }
- case 4: {
- message.maxActiveVehicles = reader.int32();
- break;
- }
- case 5: {
- message.globalStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 6: {
- message.globalEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 7: {
- message.globalDurationCostPerHour = reader.double();
- break;
- }
- case 8: {
- if (!(message.durationDistanceMatrices && message.durationDistanceMatrices.length))
- message.durationDistanceMatrices = [];
- message.durationDistanceMatrices.push($root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.decode(reader, reader.uint32()));
- break;
- }
- case 9: {
- if (!(message.durationDistanceMatrixSrcTags && message.durationDistanceMatrixSrcTags.length))
- message.durationDistanceMatrixSrcTags = [];
- message.durationDistanceMatrixSrcTags.push(reader.string());
- break;
- }
- case 10: {
- if (!(message.durationDistanceMatrixDstTags && message.durationDistanceMatrixDstTags.length))
- message.durationDistanceMatrixDstTags = [];
- message.durationDistanceMatrixDstTags.push(reader.string());
- break;
- }
- case 11: {
- if (!(message.transitionAttributes && message.transitionAttributes.length))
- message.transitionAttributes = [];
- message.transitionAttributes.push($root.google.cloud.optimization.v1.TransitionAttributes.decode(reader, reader.uint32()));
- break;
- }
- case 12: {
- if (!(message.shipmentTypeIncompatibilities && message.shipmentTypeIncompatibilities.length))
- message.shipmentTypeIncompatibilities = [];
- message.shipmentTypeIncompatibilities.push($root.google.cloud.optimization.v1.ShipmentTypeIncompatibility.decode(reader, reader.uint32()));
- break;
- }
- case 13: {
- if (!(message.shipmentTypeRequirements && message.shipmentTypeRequirements.length))
- message.shipmentTypeRequirements = [];
- message.shipmentTypeRequirements.push($root.google.cloud.optimization.v1.ShipmentTypeRequirement.decode(reader, reader.uint32()));
- break;
- }
- case 14: {
- if (!(message.precedenceRules && message.precedenceRules.length))
- message.precedenceRules = [];
- message.precedenceRules.push($root.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.decode(reader, reader.uint32()));
- break;
- }
- case 15: {
- if (!(message.breakRules && message.breakRules.length))
- message.breakRules = [];
- message.breakRules.push($root.google.cloud.optimization.v1.ShipmentModel.BreakRule.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a ShipmentModel message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.ShipmentModel} ShipmentModel
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ShipmentModel.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a ShipmentModel message.
- * @function verify
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- ShipmentModel.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.shipments != null && message.hasOwnProperty("shipments")) {
- if (!Array.isArray(message.shipments))
- return "shipments: array expected";
- for (var i = 0; i < message.shipments.length; ++i) {
- var error = $root.google.cloud.optimization.v1.Shipment.verify(message.shipments[i]);
- if (error)
- return "shipments." + error;
- }
- }
- if (message.vehicles != null && message.hasOwnProperty("vehicles")) {
- if (!Array.isArray(message.vehicles))
- return "vehicles: array expected";
- for (var i = 0; i < message.vehicles.length; ++i) {
- var error = $root.google.cloud.optimization.v1.Vehicle.verify(message.vehicles[i]);
- if (error)
- return "vehicles." + error;
- }
- }
- if (message.maxActiveVehicles != null && message.hasOwnProperty("maxActiveVehicles")) {
- properties._maxActiveVehicles = 1;
- if (!$util.isInteger(message.maxActiveVehicles))
- return "maxActiveVehicles: integer expected";
- }
- if (message.globalStartTime != null && message.hasOwnProperty("globalStartTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.globalStartTime);
- if (error)
- return "globalStartTime." + error;
- }
- if (message.globalEndTime != null && message.hasOwnProperty("globalEndTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.globalEndTime);
- if (error)
- return "globalEndTime." + error;
- }
- if (message.globalDurationCostPerHour != null && message.hasOwnProperty("globalDurationCostPerHour"))
- if (typeof message.globalDurationCostPerHour !== "number")
- return "globalDurationCostPerHour: number expected";
- if (message.durationDistanceMatrices != null && message.hasOwnProperty("durationDistanceMatrices")) {
- if (!Array.isArray(message.durationDistanceMatrices))
- return "durationDistanceMatrices: array expected";
- for (var i = 0; i < message.durationDistanceMatrices.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.verify(message.durationDistanceMatrices[i]);
- if (error)
- return "durationDistanceMatrices." + error;
- }
- }
- if (message.durationDistanceMatrixSrcTags != null && message.hasOwnProperty("durationDistanceMatrixSrcTags")) {
- if (!Array.isArray(message.durationDistanceMatrixSrcTags))
- return "durationDistanceMatrixSrcTags: array expected";
- for (var i = 0; i < message.durationDistanceMatrixSrcTags.length; ++i)
- if (!$util.isString(message.durationDistanceMatrixSrcTags[i]))
- return "durationDistanceMatrixSrcTags: string[] expected";
- }
- if (message.durationDistanceMatrixDstTags != null && message.hasOwnProperty("durationDistanceMatrixDstTags")) {
- if (!Array.isArray(message.durationDistanceMatrixDstTags))
- return "durationDistanceMatrixDstTags: array expected";
- for (var i = 0; i < message.durationDistanceMatrixDstTags.length; ++i)
- if (!$util.isString(message.durationDistanceMatrixDstTags[i]))
- return "durationDistanceMatrixDstTags: string[] expected";
- }
- if (message.transitionAttributes != null && message.hasOwnProperty("transitionAttributes")) {
- if (!Array.isArray(message.transitionAttributes))
- return "transitionAttributes: array expected";
- for (var i = 0; i < message.transitionAttributes.length; ++i) {
- var error = $root.google.cloud.optimization.v1.TransitionAttributes.verify(message.transitionAttributes[i]);
- if (error)
- return "transitionAttributes." + error;
- }
- }
- if (message.shipmentTypeIncompatibilities != null && message.hasOwnProperty("shipmentTypeIncompatibilities")) {
- if (!Array.isArray(message.shipmentTypeIncompatibilities))
- return "shipmentTypeIncompatibilities: array expected";
- for (var i = 0; i < message.shipmentTypeIncompatibilities.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentTypeIncompatibility.verify(message.shipmentTypeIncompatibilities[i]);
- if (error)
- return "shipmentTypeIncompatibilities." + error;
- }
- }
- if (message.shipmentTypeRequirements != null && message.hasOwnProperty("shipmentTypeRequirements")) {
- if (!Array.isArray(message.shipmentTypeRequirements))
- return "shipmentTypeRequirements: array expected";
- for (var i = 0; i < message.shipmentTypeRequirements.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentTypeRequirement.verify(message.shipmentTypeRequirements[i]);
- if (error)
- return "shipmentTypeRequirements." + error;
- }
- }
- if (message.precedenceRules != null && message.hasOwnProperty("precedenceRules")) {
- if (!Array.isArray(message.precedenceRules))
- return "precedenceRules: array expected";
- for (var i = 0; i < message.precedenceRules.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.verify(message.precedenceRules[i]);
- if (error)
- return "precedenceRules." + error;
- }
- }
- if (message.breakRules != null && message.hasOwnProperty("breakRules")) {
- if (!Array.isArray(message.breakRules))
- return "breakRules: array expected";
- for (var i = 0; i < message.breakRules.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.verify(message.breakRules[i]);
- if (error)
- return "breakRules." + error;
- }
- }
- return null;
- };
-
- /**
- * Creates a ShipmentModel message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.ShipmentModel} ShipmentModel
- */
- ShipmentModel.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.ShipmentModel)
- return object;
- var message = new $root.google.cloud.optimization.v1.ShipmentModel();
- if (object.shipments) {
- if (!Array.isArray(object.shipments))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.shipments: array expected");
- message.shipments = [];
- for (var i = 0; i < object.shipments.length; ++i) {
- if (typeof object.shipments[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.shipments: object expected");
- message.shipments[i] = $root.google.cloud.optimization.v1.Shipment.fromObject(object.shipments[i]);
- }
- }
- if (object.vehicles) {
- if (!Array.isArray(object.vehicles))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.vehicles: array expected");
- message.vehicles = [];
- for (var i = 0; i < object.vehicles.length; ++i) {
- if (typeof object.vehicles[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.vehicles: object expected");
- message.vehicles[i] = $root.google.cloud.optimization.v1.Vehicle.fromObject(object.vehicles[i]);
- }
- }
- if (object.maxActiveVehicles != null)
- message.maxActiveVehicles = object.maxActiveVehicles | 0;
- if (object.globalStartTime != null) {
- if (typeof object.globalStartTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.globalStartTime: object expected");
- message.globalStartTime = $root.google.protobuf.Timestamp.fromObject(object.globalStartTime);
- }
- if (object.globalEndTime != null) {
- if (typeof object.globalEndTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.globalEndTime: object expected");
- message.globalEndTime = $root.google.protobuf.Timestamp.fromObject(object.globalEndTime);
- }
- if (object.globalDurationCostPerHour != null)
- message.globalDurationCostPerHour = Number(object.globalDurationCostPerHour);
- if (object.durationDistanceMatrices) {
- if (!Array.isArray(object.durationDistanceMatrices))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.durationDistanceMatrices: array expected");
- message.durationDistanceMatrices = [];
- for (var i = 0; i < object.durationDistanceMatrices.length; ++i) {
- if (typeof object.durationDistanceMatrices[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.durationDistanceMatrices: object expected");
- message.durationDistanceMatrices[i] = $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.fromObject(object.durationDistanceMatrices[i]);
- }
- }
- if (object.durationDistanceMatrixSrcTags) {
- if (!Array.isArray(object.durationDistanceMatrixSrcTags))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.durationDistanceMatrixSrcTags: array expected");
- message.durationDistanceMatrixSrcTags = [];
- for (var i = 0; i < object.durationDistanceMatrixSrcTags.length; ++i)
- message.durationDistanceMatrixSrcTags[i] = String(object.durationDistanceMatrixSrcTags[i]);
- }
- if (object.durationDistanceMatrixDstTags) {
- if (!Array.isArray(object.durationDistanceMatrixDstTags))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.durationDistanceMatrixDstTags: array expected");
- message.durationDistanceMatrixDstTags = [];
- for (var i = 0; i < object.durationDistanceMatrixDstTags.length; ++i)
- message.durationDistanceMatrixDstTags[i] = String(object.durationDistanceMatrixDstTags[i]);
- }
- if (object.transitionAttributes) {
- if (!Array.isArray(object.transitionAttributes))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.transitionAttributes: array expected");
- message.transitionAttributes = [];
- for (var i = 0; i < object.transitionAttributes.length; ++i) {
- if (typeof object.transitionAttributes[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.transitionAttributes: object expected");
- message.transitionAttributes[i] = $root.google.cloud.optimization.v1.TransitionAttributes.fromObject(object.transitionAttributes[i]);
- }
- }
- if (object.shipmentTypeIncompatibilities) {
- if (!Array.isArray(object.shipmentTypeIncompatibilities))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.shipmentTypeIncompatibilities: array expected");
- message.shipmentTypeIncompatibilities = [];
- for (var i = 0; i < object.shipmentTypeIncompatibilities.length; ++i) {
- if (typeof object.shipmentTypeIncompatibilities[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.shipmentTypeIncompatibilities: object expected");
- message.shipmentTypeIncompatibilities[i] = $root.google.cloud.optimization.v1.ShipmentTypeIncompatibility.fromObject(object.shipmentTypeIncompatibilities[i]);
- }
- }
- if (object.shipmentTypeRequirements) {
- if (!Array.isArray(object.shipmentTypeRequirements))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.shipmentTypeRequirements: array expected");
- message.shipmentTypeRequirements = [];
- for (var i = 0; i < object.shipmentTypeRequirements.length; ++i) {
- if (typeof object.shipmentTypeRequirements[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.shipmentTypeRequirements: object expected");
- message.shipmentTypeRequirements[i] = $root.google.cloud.optimization.v1.ShipmentTypeRequirement.fromObject(object.shipmentTypeRequirements[i]);
- }
- }
- if (object.precedenceRules) {
- if (!Array.isArray(object.precedenceRules))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.precedenceRules: array expected");
- message.precedenceRules = [];
- for (var i = 0; i < object.precedenceRules.length; ++i) {
- if (typeof object.precedenceRules[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.precedenceRules: object expected");
- message.precedenceRules[i] = $root.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.fromObject(object.precedenceRules[i]);
- }
- }
- if (object.breakRules) {
- if (!Array.isArray(object.breakRules))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.breakRules: array expected");
- message.breakRules = [];
- for (var i = 0; i < object.breakRules.length; ++i) {
- if (typeof object.breakRules[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.breakRules: object expected");
- message.breakRules[i] = $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.fromObject(object.breakRules[i]);
- }
- }
- return message;
- };
-
- /**
- * Creates a plain object from a ShipmentModel message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel} message ShipmentModel
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- ShipmentModel.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.shipments = [];
- object.vehicles = [];
- object.durationDistanceMatrices = [];
- object.durationDistanceMatrixSrcTags = [];
- object.durationDistanceMatrixDstTags = [];
- object.transitionAttributes = [];
- object.shipmentTypeIncompatibilities = [];
- object.shipmentTypeRequirements = [];
- object.precedenceRules = [];
- object.breakRules = [];
- }
- if (options.defaults) {
- object.globalStartTime = null;
- object.globalEndTime = null;
- object.globalDurationCostPerHour = 0;
- }
- if (message.shipments && message.shipments.length) {
- object.shipments = [];
- for (var j = 0; j < message.shipments.length; ++j)
- object.shipments[j] = $root.google.cloud.optimization.v1.Shipment.toObject(message.shipments[j], options);
- }
- if (message.vehicles && message.vehicles.length) {
- object.vehicles = [];
- for (var j = 0; j < message.vehicles.length; ++j)
- object.vehicles[j] = $root.google.cloud.optimization.v1.Vehicle.toObject(message.vehicles[j], options);
- }
- if (message.maxActiveVehicles != null && message.hasOwnProperty("maxActiveVehicles")) {
- object.maxActiveVehicles = message.maxActiveVehicles;
- if (options.oneofs)
- object._maxActiveVehicles = "maxActiveVehicles";
- }
- if (message.globalStartTime != null && message.hasOwnProperty("globalStartTime"))
- object.globalStartTime = $root.google.protobuf.Timestamp.toObject(message.globalStartTime, options);
- if (message.globalEndTime != null && message.hasOwnProperty("globalEndTime"))
- object.globalEndTime = $root.google.protobuf.Timestamp.toObject(message.globalEndTime, options);
- if (message.globalDurationCostPerHour != null && message.hasOwnProperty("globalDurationCostPerHour"))
- object.globalDurationCostPerHour = options.json && !isFinite(message.globalDurationCostPerHour) ? String(message.globalDurationCostPerHour) : message.globalDurationCostPerHour;
- if (message.durationDistanceMatrices && message.durationDistanceMatrices.length) {
- object.durationDistanceMatrices = [];
- for (var j = 0; j < message.durationDistanceMatrices.length; ++j)
- object.durationDistanceMatrices[j] = $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.toObject(message.durationDistanceMatrices[j], options);
- }
- if (message.durationDistanceMatrixSrcTags && message.durationDistanceMatrixSrcTags.length) {
- object.durationDistanceMatrixSrcTags = [];
- for (var j = 0; j < message.durationDistanceMatrixSrcTags.length; ++j)
- object.durationDistanceMatrixSrcTags[j] = message.durationDistanceMatrixSrcTags[j];
- }
- if (message.durationDistanceMatrixDstTags && message.durationDistanceMatrixDstTags.length) {
- object.durationDistanceMatrixDstTags = [];
- for (var j = 0; j < message.durationDistanceMatrixDstTags.length; ++j)
- object.durationDistanceMatrixDstTags[j] = message.durationDistanceMatrixDstTags[j];
- }
- if (message.transitionAttributes && message.transitionAttributes.length) {
- object.transitionAttributes = [];
- for (var j = 0; j < message.transitionAttributes.length; ++j)
- object.transitionAttributes[j] = $root.google.cloud.optimization.v1.TransitionAttributes.toObject(message.transitionAttributes[j], options);
- }
- if (message.shipmentTypeIncompatibilities && message.shipmentTypeIncompatibilities.length) {
- object.shipmentTypeIncompatibilities = [];
- for (var j = 0; j < message.shipmentTypeIncompatibilities.length; ++j)
- object.shipmentTypeIncompatibilities[j] = $root.google.cloud.optimization.v1.ShipmentTypeIncompatibility.toObject(message.shipmentTypeIncompatibilities[j], options);
- }
- if (message.shipmentTypeRequirements && message.shipmentTypeRequirements.length) {
- object.shipmentTypeRequirements = [];
- for (var j = 0; j < message.shipmentTypeRequirements.length; ++j)
- object.shipmentTypeRequirements[j] = $root.google.cloud.optimization.v1.ShipmentTypeRequirement.toObject(message.shipmentTypeRequirements[j], options);
- }
- if (message.precedenceRules && message.precedenceRules.length) {
- object.precedenceRules = [];
- for (var j = 0; j < message.precedenceRules.length; ++j)
- object.precedenceRules[j] = $root.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.toObject(message.precedenceRules[j], options);
- }
- if (message.breakRules && message.breakRules.length) {
- object.breakRules = [];
- for (var j = 0; j < message.breakRules.length; ++j)
- object.breakRules[j] = $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.toObject(message.breakRules[j], options);
- }
- return object;
- };
-
- /**
- * Converts this ShipmentModel to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @instance
- * @returns {Object.} JSON object
- */
- ShipmentModel.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for ShipmentModel
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- ShipmentModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.ShipmentModel";
- };
-
- ShipmentModel.DurationDistanceMatrix = (function() {
-
- /**
- * Properties of a DurationDistanceMatrix.
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @interface IDurationDistanceMatrix
- * @property {Array.|null} [rows] DurationDistanceMatrix rows
- * @property {string|null} [vehicleStartTag] DurationDistanceMatrix vehicleStartTag
- */
-
- /**
- * Constructs a new DurationDistanceMatrix.
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @classdesc Represents a DurationDistanceMatrix.
- * @implements IDurationDistanceMatrix
- * @constructor
- * @param {google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix=} [properties] Properties to set
- */
- function DurationDistanceMatrix(properties) {
- this.rows = [];
- 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]];
- }
-
- /**
- * DurationDistanceMatrix rows.
- * @member {Array.} rows
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @instance
- */
- DurationDistanceMatrix.prototype.rows = $util.emptyArray;
-
- /**
- * DurationDistanceMatrix vehicleStartTag.
- * @member {string} vehicleStartTag
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @instance
- */
- DurationDistanceMatrix.prototype.vehicleStartTag = "";
-
- /**
- * Creates a new DurationDistanceMatrix instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix} DurationDistanceMatrix instance
- */
- DurationDistanceMatrix.create = function create(properties) {
- return new DurationDistanceMatrix(properties);
- };
-
- /**
- * Encodes the specified DurationDistanceMatrix message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix} message DurationDistanceMatrix message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DurationDistanceMatrix.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.rows != null && message.rows.length)
- for (var i = 0; i < message.rows.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.vehicleStartTag != null && Object.hasOwnProperty.call(message, "vehicleStartTag"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.vehicleStartTag);
- return writer;
- };
-
- /**
- * Encodes the specified DurationDistanceMatrix message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.IDurationDistanceMatrix} message DurationDistanceMatrix message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DurationDistanceMatrix.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a DurationDistanceMatrix message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix} DurationDistanceMatrix
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DurationDistanceMatrix.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.optimization.v1.ShipmentModel.DurationDistanceMatrix();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (!(message.rows && message.rows.length))
- message.rows = [];
- message.rows.push($root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.decode(reader, reader.uint32()));
- break;
- }
- case 2: {
- message.vehicleStartTag = reader.string();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a DurationDistanceMatrix message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix} DurationDistanceMatrix
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DurationDistanceMatrix.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a DurationDistanceMatrix message.
- * @function verify
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- DurationDistanceMatrix.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.rows != null && message.hasOwnProperty("rows")) {
- if (!Array.isArray(message.rows))
- return "rows: array expected";
- for (var i = 0; i < message.rows.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.verify(message.rows[i]);
- if (error)
- return "rows." + error;
- }
- }
- if (message.vehicleStartTag != null && message.hasOwnProperty("vehicleStartTag"))
- if (!$util.isString(message.vehicleStartTag))
- return "vehicleStartTag: string expected";
- return null;
- };
-
- /**
- * Creates a DurationDistanceMatrix message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix} DurationDistanceMatrix
- */
- DurationDistanceMatrix.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix)
- return object;
- var message = new $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix();
- if (object.rows) {
- if (!Array.isArray(object.rows))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.rows: array expected");
- message.rows = [];
- for (var i = 0; i < object.rows.length; ++i) {
- if (typeof object.rows[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.rows: object expected");
- message.rows[i] = $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.fromObject(object.rows[i]);
- }
- }
- if (object.vehicleStartTag != null)
- message.vehicleStartTag = String(object.vehicleStartTag);
- return message;
- };
-
- /**
- * Creates a plain object from a DurationDistanceMatrix message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix} message DurationDistanceMatrix
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- DurationDistanceMatrix.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.rows = [];
- if (options.defaults)
- object.vehicleStartTag = "";
- if (message.rows && message.rows.length) {
- object.rows = [];
- for (var j = 0; j < message.rows.length; ++j)
- object.rows[j] = $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.toObject(message.rows[j], options);
- }
- if (message.vehicleStartTag != null && message.hasOwnProperty("vehicleStartTag"))
- object.vehicleStartTag = message.vehicleStartTag;
- return object;
- };
-
- /**
- * Converts this DurationDistanceMatrix to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @instance
- * @returns {Object.} JSON object
- */
- DurationDistanceMatrix.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for DurationDistanceMatrix
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- DurationDistanceMatrix.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix";
- };
-
- DurationDistanceMatrix.Row = (function() {
-
- /**
- * Properties of a Row.
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @interface IRow
- * @property {Array.|null} [durations] Row durations
- * @property {Array.|null} [meters] Row meters
- */
-
- /**
- * Constructs a new Row.
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
- * @classdesc Represents a Row.
- * @implements IRow
- * @constructor
- * @param {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow=} [properties] Properties to set
- */
- function Row(properties) {
- this.durations = [];
- this.meters = [];
- 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]];
- }
-
- /**
- * Row durations.
- * @member {Array.} durations
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @instance
- */
- Row.prototype.durations = $util.emptyArray;
-
- /**
- * Row meters.
- * @member {Array.} meters
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @instance
- */
- Row.prototype.meters = $util.emptyArray;
-
- /**
- * Creates a new Row instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row} Row instance
- */
- Row.create = function create(properties) {
- return new Row(properties);
- };
-
- /**
- * Encodes the specified Row message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow} message Row message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Row.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.durations != null && message.durations.length)
- for (var i = 0; i < message.durations.length; ++i)
- $root.google.protobuf.Duration.encode(message.durations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.meters != null && message.meters.length) {
- writer.uint32(/* id 2, wireType 2 =*/18).fork();
- for (var i = 0; i < message.meters.length; ++i)
- writer.double(message.meters[i]);
- writer.ldelim();
- }
- return writer;
- };
-
- /**
- * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.IRow} message Row message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Row.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a Row message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row} Row
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Row.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (!(message.durations && message.durations.length))
- message.durations = [];
- message.durations.push($root.google.protobuf.Duration.decode(reader, reader.uint32()));
- break;
- }
- case 2: {
- if (!(message.meters && message.meters.length))
- message.meters = [];
- if ((tag & 7) === 2) {
- var end2 = reader.uint32() + reader.pos;
- while (reader.pos < end2)
- message.meters.push(reader.double());
- } else
- message.meters.push(reader.double());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a Row message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row} Row
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Row.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a Row message.
- * @function verify
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Row.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.durations != null && message.hasOwnProperty("durations")) {
- if (!Array.isArray(message.durations))
- return "durations: array expected";
- for (var i = 0; i < message.durations.length; ++i) {
- var error = $root.google.protobuf.Duration.verify(message.durations[i]);
- if (error)
- return "durations." + error;
- }
- }
- if (message.meters != null && message.hasOwnProperty("meters")) {
- if (!Array.isArray(message.meters))
- return "meters: array expected";
- for (var i = 0; i < message.meters.length; ++i)
- if (typeof message.meters[i] !== "number")
- return "meters: number[] expected";
- }
- return null;
- };
-
- /**
- * Creates a Row message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row} Row
- */
- Row.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row)
- return object;
- var message = new $root.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row();
- if (object.durations) {
- if (!Array.isArray(object.durations))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.durations: array expected");
- message.durations = [];
- for (var i = 0; i < object.durations.length; ++i) {
- if (typeof object.durations[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.durations: object expected");
- message.durations[i] = $root.google.protobuf.Duration.fromObject(object.durations[i]);
- }
- }
- if (object.meters) {
- if (!Array.isArray(object.meters))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.meters: array expected");
- message.meters = [];
- for (var i = 0; i < object.meters.length; ++i)
- message.meters[i] = Number(object.meters[i]);
- }
- return message;
- };
-
- /**
- * Creates a plain object from a Row message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row} message Row
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Row.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.durations = [];
- object.meters = [];
- }
- if (message.durations && message.durations.length) {
- object.durations = [];
- for (var j = 0; j < message.durations.length; ++j)
- object.durations[j] = $root.google.protobuf.Duration.toObject(message.durations[j], options);
- }
- if (message.meters && message.meters.length) {
- object.meters = [];
- for (var j = 0; j < message.meters.length; ++j)
- object.meters[j] = options.json && !isFinite(message.meters[j]) ? String(message.meters[j]) : message.meters[j];
- }
- return object;
- };
-
- /**
- * Converts this Row to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @instance
- * @returns {Object.} JSON object
- */
- Row.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for Row
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row";
- };
-
- return Row;
- })();
-
- return DurationDistanceMatrix;
- })();
-
- ShipmentModel.PrecedenceRule = (function() {
-
- /**
- * Properties of a PrecedenceRule.
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @interface IPrecedenceRule
- * @property {number|null} [firstIndex] PrecedenceRule firstIndex
- * @property {boolean|null} [firstIsDelivery] PrecedenceRule firstIsDelivery
- * @property {number|null} [secondIndex] PrecedenceRule secondIndex
- * @property {boolean|null} [secondIsDelivery] PrecedenceRule secondIsDelivery
- * @property {google.protobuf.IDuration|null} [offsetDuration] PrecedenceRule offsetDuration
- */
-
- /**
- * Constructs a new PrecedenceRule.
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @classdesc Represents a PrecedenceRule.
- * @implements IPrecedenceRule
- * @constructor
- * @param {google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule=} [properties] Properties to set
- */
- function PrecedenceRule(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]];
- }
-
- /**
- * PrecedenceRule firstIndex.
- * @member {number|null|undefined} firstIndex
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @instance
- */
- PrecedenceRule.prototype.firstIndex = null;
-
- /**
- * PrecedenceRule firstIsDelivery.
- * @member {boolean} firstIsDelivery
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @instance
- */
- PrecedenceRule.prototype.firstIsDelivery = false;
-
- /**
- * PrecedenceRule secondIndex.
- * @member {number|null|undefined} secondIndex
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @instance
- */
- PrecedenceRule.prototype.secondIndex = null;
-
- /**
- * PrecedenceRule secondIsDelivery.
- * @member {boolean} secondIsDelivery
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @instance
- */
- PrecedenceRule.prototype.secondIsDelivery = false;
-
- /**
- * PrecedenceRule offsetDuration.
- * @member {google.protobuf.IDuration|null|undefined} offsetDuration
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @instance
- */
- PrecedenceRule.prototype.offsetDuration = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * PrecedenceRule _firstIndex.
- * @member {"firstIndex"|undefined} _firstIndex
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @instance
- */
- Object.defineProperty(PrecedenceRule.prototype, "_firstIndex", {
- get: $util.oneOfGetter($oneOfFields = ["firstIndex"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * PrecedenceRule _secondIndex.
- * @member {"secondIndex"|undefined} _secondIndex
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @instance
- */
- Object.defineProperty(PrecedenceRule.prototype, "_secondIndex", {
- get: $util.oneOfGetter($oneOfFields = ["secondIndex"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new PrecedenceRule instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.ShipmentModel.PrecedenceRule} PrecedenceRule instance
- */
- PrecedenceRule.create = function create(properties) {
- return new PrecedenceRule(properties);
- };
-
- /**
- * Encodes the specified PrecedenceRule message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule} message PrecedenceRule message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- PrecedenceRule.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.firstIndex != null && Object.hasOwnProperty.call(message, "firstIndex"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.firstIndex);
- if (message.secondIndex != null && Object.hasOwnProperty.call(message, "secondIndex"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.secondIndex);
- if (message.firstIsDelivery != null && Object.hasOwnProperty.call(message, "firstIsDelivery"))
- writer.uint32(/* id 3, wireType 0 =*/24).bool(message.firstIsDelivery);
- if (message.secondIsDelivery != null && Object.hasOwnProperty.call(message, "secondIsDelivery"))
- writer.uint32(/* id 4, wireType 0 =*/32).bool(message.secondIsDelivery);
- if (message.offsetDuration != null && Object.hasOwnProperty.call(message, "offsetDuration"))
- $root.google.protobuf.Duration.encode(message.offsetDuration, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified PrecedenceRule message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.IPrecedenceRule} message PrecedenceRule message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- PrecedenceRule.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a PrecedenceRule message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.ShipmentModel.PrecedenceRule} PrecedenceRule
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- PrecedenceRule.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.optimization.v1.ShipmentModel.PrecedenceRule();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.firstIndex = reader.int32();
- break;
- }
- case 3: {
- message.firstIsDelivery = reader.bool();
- break;
- }
- case 2: {
- message.secondIndex = reader.int32();
- break;
- }
- case 4: {
- message.secondIsDelivery = reader.bool();
- break;
- }
- case 5: {
- message.offsetDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a PrecedenceRule message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.ShipmentModel.PrecedenceRule} PrecedenceRule
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- PrecedenceRule.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a PrecedenceRule message.
- * @function verify
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- PrecedenceRule.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.firstIndex != null && message.hasOwnProperty("firstIndex")) {
- properties._firstIndex = 1;
- if (!$util.isInteger(message.firstIndex))
- return "firstIndex: integer expected";
- }
- if (message.firstIsDelivery != null && message.hasOwnProperty("firstIsDelivery"))
- if (typeof message.firstIsDelivery !== "boolean")
- return "firstIsDelivery: boolean expected";
- if (message.secondIndex != null && message.hasOwnProperty("secondIndex")) {
- properties._secondIndex = 1;
- if (!$util.isInteger(message.secondIndex))
- return "secondIndex: integer expected";
- }
- if (message.secondIsDelivery != null && message.hasOwnProperty("secondIsDelivery"))
- if (typeof message.secondIsDelivery !== "boolean")
- return "secondIsDelivery: boolean expected";
- if (message.offsetDuration != null && message.hasOwnProperty("offsetDuration")) {
- var error = $root.google.protobuf.Duration.verify(message.offsetDuration);
- if (error)
- return "offsetDuration." + error;
- }
- return null;
- };
-
- /**
- * Creates a PrecedenceRule message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.ShipmentModel.PrecedenceRule} PrecedenceRule
- */
- PrecedenceRule.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule)
- return object;
- var message = new $root.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule();
- if (object.firstIndex != null)
- message.firstIndex = object.firstIndex | 0;
- if (object.firstIsDelivery != null)
- message.firstIsDelivery = Boolean(object.firstIsDelivery);
- if (object.secondIndex != null)
- message.secondIndex = object.secondIndex | 0;
- if (object.secondIsDelivery != null)
- message.secondIsDelivery = Boolean(object.secondIsDelivery);
- if (object.offsetDuration != null) {
- if (typeof object.offsetDuration !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.offsetDuration: object expected");
- message.offsetDuration = $root.google.protobuf.Duration.fromObject(object.offsetDuration);
- }
- return message;
- };
-
- /**
- * Creates a plain object from a PrecedenceRule message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.PrecedenceRule} message PrecedenceRule
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- PrecedenceRule.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.firstIsDelivery = false;
- object.secondIsDelivery = false;
- object.offsetDuration = null;
- }
- if (message.firstIndex != null && message.hasOwnProperty("firstIndex")) {
- object.firstIndex = message.firstIndex;
- if (options.oneofs)
- object._firstIndex = "firstIndex";
- }
- if (message.secondIndex != null && message.hasOwnProperty("secondIndex")) {
- object.secondIndex = message.secondIndex;
- if (options.oneofs)
- object._secondIndex = "secondIndex";
- }
- if (message.firstIsDelivery != null && message.hasOwnProperty("firstIsDelivery"))
- object.firstIsDelivery = message.firstIsDelivery;
- if (message.secondIsDelivery != null && message.hasOwnProperty("secondIsDelivery"))
- object.secondIsDelivery = message.secondIsDelivery;
- if (message.offsetDuration != null && message.hasOwnProperty("offsetDuration"))
- object.offsetDuration = $root.google.protobuf.Duration.toObject(message.offsetDuration, options);
- return object;
- };
-
- /**
- * Converts this PrecedenceRule to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @instance
- * @returns {Object.} JSON object
- */
- PrecedenceRule.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for PrecedenceRule
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- PrecedenceRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.ShipmentModel.PrecedenceRule";
- };
-
- return PrecedenceRule;
- })();
-
- ShipmentModel.BreakRule = (function() {
-
- /**
- * Properties of a BreakRule.
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @interface IBreakRule
- * @property {Array.|null} [breakRequests] BreakRule breakRequests
- * @property {Array.|null} [frequencyConstraints] BreakRule frequencyConstraints
- */
-
- /**
- * Constructs a new BreakRule.
- * @memberof google.cloud.optimization.v1.ShipmentModel
- * @classdesc Represents a BreakRule.
- * @implements IBreakRule
- * @constructor
- * @param {google.cloud.optimization.v1.ShipmentModel.IBreakRule=} [properties] Properties to set
- */
- function BreakRule(properties) {
- this.breakRequests = [];
- this.frequencyConstraints = [];
- 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]];
- }
-
- /**
- * BreakRule breakRequests.
- * @member {Array.} breakRequests
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @instance
- */
- BreakRule.prototype.breakRequests = $util.emptyArray;
-
- /**
- * BreakRule frequencyConstraints.
- * @member {Array.} frequencyConstraints
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @instance
- */
- BreakRule.prototype.frequencyConstraints = $util.emptyArray;
-
- /**
- * Creates a new BreakRule instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.IBreakRule=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule} BreakRule instance
- */
- BreakRule.create = function create(properties) {
- return new BreakRule(properties);
- };
-
- /**
- * Encodes the specified BreakRule message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.IBreakRule} message BreakRule message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- BreakRule.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.breakRequests != null && message.breakRequests.length)
- for (var i = 0; i < message.breakRequests.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.encode(message.breakRequests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.frequencyConstraints != null && message.frequencyConstraints.length)
- for (var i = 0; i < message.frequencyConstraints.length; ++i)
- $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.encode(message.frequencyConstraints[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified BreakRule message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.IBreakRule} message BreakRule message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- BreakRule.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a BreakRule message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule} BreakRule
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- BreakRule.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.optimization.v1.ShipmentModel.BreakRule();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (!(message.breakRequests && message.breakRequests.length))
- message.breakRequests = [];
- message.breakRequests.push($root.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.decode(reader, reader.uint32()));
- break;
- }
- case 2: {
- if (!(message.frequencyConstraints && message.frequencyConstraints.length))
- message.frequencyConstraints = [];
- message.frequencyConstraints.push($root.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a BreakRule message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule} BreakRule
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- BreakRule.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a BreakRule message.
- * @function verify
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- BreakRule.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.breakRequests != null && message.hasOwnProperty("breakRequests")) {
- if (!Array.isArray(message.breakRequests))
- return "breakRequests: array expected";
- for (var i = 0; i < message.breakRequests.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.verify(message.breakRequests[i]);
- if (error)
- return "breakRequests." + error;
- }
- }
- if (message.frequencyConstraints != null && message.hasOwnProperty("frequencyConstraints")) {
- if (!Array.isArray(message.frequencyConstraints))
- return "frequencyConstraints: array expected";
- for (var i = 0; i < message.frequencyConstraints.length; ++i) {
- var error = $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.verify(message.frequencyConstraints[i]);
- if (error)
- return "frequencyConstraints." + error;
- }
- }
- return null;
- };
-
- /**
- * Creates a BreakRule message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule} BreakRule
- */
- BreakRule.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.ShipmentModel.BreakRule)
- return object;
- var message = new $root.google.cloud.optimization.v1.ShipmentModel.BreakRule();
- if (object.breakRequests) {
- if (!Array.isArray(object.breakRequests))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.BreakRule.breakRequests: array expected");
- message.breakRequests = [];
- for (var i = 0; i < object.breakRequests.length; ++i) {
- if (typeof object.breakRequests[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.BreakRule.breakRequests: object expected");
- message.breakRequests[i] = $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.fromObject(object.breakRequests[i]);
- }
- }
- if (object.frequencyConstraints) {
- if (!Array.isArray(object.frequencyConstraints))
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.BreakRule.frequencyConstraints: array expected");
- message.frequencyConstraints = [];
- for (var i = 0; i < object.frequencyConstraints.length; ++i) {
- if (typeof object.frequencyConstraints[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.BreakRule.frequencyConstraints: object expected");
- message.frequencyConstraints[i] = $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.fromObject(object.frequencyConstraints[i]);
- }
- }
- return message;
- };
-
- /**
- * Creates a plain object from a BreakRule message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule} message BreakRule
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- BreakRule.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.breakRequests = [];
- object.frequencyConstraints = [];
- }
- if (message.breakRequests && message.breakRequests.length) {
- object.breakRequests = [];
- for (var j = 0; j < message.breakRequests.length; ++j)
- object.breakRequests[j] = $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.toObject(message.breakRequests[j], options);
- }
- if (message.frequencyConstraints && message.frequencyConstraints.length) {
- object.frequencyConstraints = [];
- for (var j = 0; j < message.frequencyConstraints.length; ++j)
- object.frequencyConstraints[j] = $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.toObject(message.frequencyConstraints[j], options);
- }
- return object;
- };
-
- /**
- * Converts this BreakRule to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @instance
- * @returns {Object.} JSON object
- */
- BreakRule.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for BreakRule
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- BreakRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.ShipmentModel.BreakRule";
- };
-
- BreakRule.BreakRequest = (function() {
-
- /**
- * Properties of a BreakRequest.
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @interface IBreakRequest
- * @property {google.protobuf.ITimestamp|null} [earliestStartTime] BreakRequest earliestStartTime
- * @property {google.protobuf.ITimestamp|null} [latestStartTime] BreakRequest latestStartTime
- * @property {google.protobuf.IDuration|null} [minDuration] BreakRequest minDuration
- */
-
- /**
- * Constructs a new BreakRequest.
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @classdesc Represents a BreakRequest.
- * @implements IBreakRequest
- * @constructor
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest=} [properties] Properties to set
- */
- function BreakRequest(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]];
- }
-
- /**
- * BreakRequest earliestStartTime.
- * @member {google.protobuf.ITimestamp|null|undefined} earliestStartTime
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @instance
- */
- BreakRequest.prototype.earliestStartTime = null;
-
- /**
- * BreakRequest latestStartTime.
- * @member {google.protobuf.ITimestamp|null|undefined} latestStartTime
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @instance
- */
- BreakRequest.prototype.latestStartTime = null;
-
- /**
- * BreakRequest minDuration.
- * @member {google.protobuf.IDuration|null|undefined} minDuration
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @instance
- */
- BreakRequest.prototype.minDuration = null;
-
- /**
- * Creates a new BreakRequest instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest} BreakRequest instance
- */
- BreakRequest.create = function create(properties) {
- return new BreakRequest(properties);
- };
-
- /**
- * Encodes the specified BreakRequest message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest} message BreakRequest message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- BreakRequest.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.earliestStartTime != null && Object.hasOwnProperty.call(message, "earliestStartTime"))
- $root.google.protobuf.Timestamp.encode(message.earliestStartTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.latestStartTime != null && Object.hasOwnProperty.call(message, "latestStartTime"))
- $root.google.protobuf.Timestamp.encode(message.latestStartTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.minDuration != null && Object.hasOwnProperty.call(message, "minDuration"))
- $root.google.protobuf.Duration.encode(message.minDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified BreakRequest message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.IBreakRequest} message BreakRequest message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- BreakRequest.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a BreakRequest message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest} BreakRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- BreakRequest.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.optimization.v1.ShipmentModel.BreakRule.BreakRequest();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.earliestStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.latestStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.minDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a BreakRequest message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest} BreakRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- BreakRequest.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a BreakRequest message.
- * @function verify
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- BreakRequest.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.earliestStartTime != null && message.hasOwnProperty("earliestStartTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.earliestStartTime);
- if (error)
- return "earliestStartTime." + error;
- }
- if (message.latestStartTime != null && message.hasOwnProperty("latestStartTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.latestStartTime);
- if (error)
- return "latestStartTime." + error;
- }
- if (message.minDuration != null && message.hasOwnProperty("minDuration")) {
- var error = $root.google.protobuf.Duration.verify(message.minDuration);
- if (error)
- return "minDuration." + error;
- }
- return null;
- };
-
- /**
- * Creates a BreakRequest message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest} BreakRequest
- */
- BreakRequest.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest)
- return object;
- var message = new $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest();
- if (object.earliestStartTime != null) {
- if (typeof object.earliestStartTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.earliestStartTime: object expected");
- message.earliestStartTime = $root.google.protobuf.Timestamp.fromObject(object.earliestStartTime);
- }
- if (object.latestStartTime != null) {
- if (typeof object.latestStartTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.latestStartTime: object expected");
- message.latestStartTime = $root.google.protobuf.Timestamp.fromObject(object.latestStartTime);
- }
- if (object.minDuration != null) {
- if (typeof object.minDuration !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.minDuration: object expected");
- message.minDuration = $root.google.protobuf.Duration.fromObject(object.minDuration);
- }
- return message;
- };
-
- /**
- * Creates a plain object from a BreakRequest message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest} message BreakRequest
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- BreakRequest.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.earliestStartTime = null;
- object.latestStartTime = null;
- object.minDuration = null;
- }
- if (message.earliestStartTime != null && message.hasOwnProperty("earliestStartTime"))
- object.earliestStartTime = $root.google.protobuf.Timestamp.toObject(message.earliestStartTime, options);
- if (message.latestStartTime != null && message.hasOwnProperty("latestStartTime"))
- object.latestStartTime = $root.google.protobuf.Timestamp.toObject(message.latestStartTime, options);
- if (message.minDuration != null && message.hasOwnProperty("minDuration"))
- object.minDuration = $root.google.protobuf.Duration.toObject(message.minDuration, options);
- return object;
- };
-
- /**
- * Converts this BreakRequest to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @instance
- * @returns {Object.} JSON object
- */
- BreakRequest.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for BreakRequest
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- BreakRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest";
- };
-
- return BreakRequest;
- })();
-
- BreakRule.FrequencyConstraint = (function() {
-
- /**
- * Properties of a FrequencyConstraint.
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @interface IFrequencyConstraint
- * @property {google.protobuf.IDuration|null} [minBreakDuration] FrequencyConstraint minBreakDuration
- * @property {google.protobuf.IDuration|null} [maxInterBreakDuration] FrequencyConstraint maxInterBreakDuration
- */
-
- /**
- * Constructs a new FrequencyConstraint.
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule
- * @classdesc Represents a FrequencyConstraint.
- * @implements IFrequencyConstraint
- * @constructor
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint=} [properties] Properties to set
- */
- function FrequencyConstraint(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]];
- }
-
- /**
- * FrequencyConstraint minBreakDuration.
- * @member {google.protobuf.IDuration|null|undefined} minBreakDuration
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @instance
- */
- FrequencyConstraint.prototype.minBreakDuration = null;
-
- /**
- * FrequencyConstraint maxInterBreakDuration.
- * @member {google.protobuf.IDuration|null|undefined} maxInterBreakDuration
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @instance
- */
- FrequencyConstraint.prototype.maxInterBreakDuration = null;
-
- /**
- * Creates a new FrequencyConstraint instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint} FrequencyConstraint instance
- */
- FrequencyConstraint.create = function create(properties) {
- return new FrequencyConstraint(properties);
- };
-
- /**
- * Encodes the specified FrequencyConstraint message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint} message FrequencyConstraint message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- FrequencyConstraint.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.minBreakDuration != null && Object.hasOwnProperty.call(message, "minBreakDuration"))
- $root.google.protobuf.Duration.encode(message.minBreakDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.maxInterBreakDuration != null && Object.hasOwnProperty.call(message, "maxInterBreakDuration"))
- $root.google.protobuf.Duration.encode(message.maxInterBreakDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified FrequencyConstraint message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.IFrequencyConstraint} message FrequencyConstraint message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- FrequencyConstraint.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a FrequencyConstraint message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint} FrequencyConstraint
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- FrequencyConstraint.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.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.minBreakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.maxInterBreakDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a FrequencyConstraint message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint} FrequencyConstraint
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- FrequencyConstraint.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a FrequencyConstraint message.
- * @function verify
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- FrequencyConstraint.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.minBreakDuration != null && message.hasOwnProperty("minBreakDuration")) {
- var error = $root.google.protobuf.Duration.verify(message.minBreakDuration);
- if (error)
- return "minBreakDuration." + error;
- }
- if (message.maxInterBreakDuration != null && message.hasOwnProperty("maxInterBreakDuration")) {
- var error = $root.google.protobuf.Duration.verify(message.maxInterBreakDuration);
- if (error)
- return "maxInterBreakDuration." + error;
- }
- return null;
- };
-
- /**
- * Creates a FrequencyConstraint message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint} FrequencyConstraint
- */
- FrequencyConstraint.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint)
- return object;
- var message = new $root.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint();
- if (object.minBreakDuration != null) {
- if (typeof object.minBreakDuration !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.minBreakDuration: object expected");
- message.minBreakDuration = $root.google.protobuf.Duration.fromObject(object.minBreakDuration);
- }
- if (object.maxInterBreakDuration != null) {
- if (typeof object.maxInterBreakDuration !== "object")
- throw TypeError(".google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.maxInterBreakDuration: object expected");
- message.maxInterBreakDuration = $root.google.protobuf.Duration.fromObject(object.maxInterBreakDuration);
- }
- return message;
- };
-
- /**
- * Creates a plain object from a FrequencyConstraint message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @static
- * @param {google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint} message FrequencyConstraint
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- FrequencyConstraint.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.minBreakDuration = null;
- object.maxInterBreakDuration = null;
- }
- if (message.minBreakDuration != null && message.hasOwnProperty("minBreakDuration"))
- object.minBreakDuration = $root.google.protobuf.Duration.toObject(message.minBreakDuration, options);
- if (message.maxInterBreakDuration != null && message.hasOwnProperty("maxInterBreakDuration"))
- object.maxInterBreakDuration = $root.google.protobuf.Duration.toObject(message.maxInterBreakDuration, options);
- return object;
- };
-
- /**
- * Converts this FrequencyConstraint to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @instance
- * @returns {Object.} JSON object
- */
- FrequencyConstraint.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for FrequencyConstraint
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- FrequencyConstraint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint";
- };
-
- return FrequencyConstraint;
- })();
-
- return BreakRule;
- })();
-
- return ShipmentModel;
- })();
-
- v1.Shipment = (function() {
-
- /**
- * Properties of a Shipment.
- * @memberof google.cloud.optimization.v1
- * @interface IShipment
- * @property {Array.|null} [pickups] Shipment pickups
- * @property {Array.|null} [deliveries] Shipment deliveries
- * @property {Object.|null} [loadDemands] Shipment loadDemands
- * @property {number|null} [penaltyCost] Shipment penaltyCost
- * @property {Array.|null} [allowedVehicleIndices] Shipment allowedVehicleIndices
- * @property {Array.|null} [costsPerVehicle] Shipment costsPerVehicle
- * @property {Array.|null} [costsPerVehicleIndices] Shipment costsPerVehicleIndices
- * @property {number|null} [pickupToDeliveryRelativeDetourLimit] Shipment pickupToDeliveryRelativeDetourLimit
- * @property {google.protobuf.IDuration|null} [pickupToDeliveryAbsoluteDetourLimit] Shipment pickupToDeliveryAbsoluteDetourLimit
- * @property {google.protobuf.IDuration|null} [pickupToDeliveryTimeLimit] Shipment pickupToDeliveryTimeLimit
- * @property {string|null} [shipmentType] Shipment shipmentType
- * @property {string|null} [label] Shipment label
- * @property {boolean|null} [ignore] Shipment ignore
- * @property {Array.|null} [demands] Shipment demands
- */
-
- /**
- * Constructs a new Shipment.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a Shipment.
- * @implements IShipment
- * @constructor
- * @param {google.cloud.optimization.v1.IShipment=} [properties] Properties to set
- */
- function Shipment(properties) {
- this.pickups = [];
- this.deliveries = [];
- this.loadDemands = {};
- this.allowedVehicleIndices = [];
- this.costsPerVehicle = [];
- this.costsPerVehicleIndices = [];
- this.demands = [];
- 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]];
- }
-
- /**
- * Shipment pickups.
- * @member {Array.} pickups
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.pickups = $util.emptyArray;
-
- /**
- * Shipment deliveries.
- * @member {Array.} deliveries
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.deliveries = $util.emptyArray;
-
- /**
- * Shipment loadDemands.
- * @member {Object.} loadDemands
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.loadDemands = $util.emptyObject;
-
- /**
- * Shipment penaltyCost.
- * @member {number|null|undefined} penaltyCost
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.penaltyCost = null;
-
- /**
- * Shipment allowedVehicleIndices.
- * @member {Array.} allowedVehicleIndices
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.allowedVehicleIndices = $util.emptyArray;
-
- /**
- * Shipment costsPerVehicle.
- * @member {Array.} costsPerVehicle
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.costsPerVehicle = $util.emptyArray;
-
- /**
- * Shipment costsPerVehicleIndices.
- * @member {Array.} costsPerVehicleIndices
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.costsPerVehicleIndices = $util.emptyArray;
-
- /**
- * Shipment pickupToDeliveryRelativeDetourLimit.
- * @member {number|null|undefined} pickupToDeliveryRelativeDetourLimit
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.pickupToDeliveryRelativeDetourLimit = null;
-
- /**
- * Shipment pickupToDeliveryAbsoluteDetourLimit.
- * @member {google.protobuf.IDuration|null|undefined} pickupToDeliveryAbsoluteDetourLimit
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.pickupToDeliveryAbsoluteDetourLimit = null;
-
- /**
- * Shipment pickupToDeliveryTimeLimit.
- * @member {google.protobuf.IDuration|null|undefined} pickupToDeliveryTimeLimit
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.pickupToDeliveryTimeLimit = null;
-
- /**
- * Shipment shipmentType.
- * @member {string} shipmentType
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.shipmentType = "";
-
- /**
- * Shipment label.
- * @member {string} label
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.label = "";
-
- /**
- * Shipment ignore.
- * @member {boolean} ignore
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.ignore = false;
-
- /**
- * Shipment demands.
- * @member {Array.} demands
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Shipment.prototype.demands = $util.emptyArray;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * Shipment _penaltyCost.
- * @member {"penaltyCost"|undefined} _penaltyCost
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Object.defineProperty(Shipment.prototype, "_penaltyCost", {
- get: $util.oneOfGetter($oneOfFields = ["penaltyCost"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Shipment _pickupToDeliveryRelativeDetourLimit.
- * @member {"pickupToDeliveryRelativeDetourLimit"|undefined} _pickupToDeliveryRelativeDetourLimit
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- */
- Object.defineProperty(Shipment.prototype, "_pickupToDeliveryRelativeDetourLimit", {
- get: $util.oneOfGetter($oneOfFields = ["pickupToDeliveryRelativeDetourLimit"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new Shipment instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.Shipment
- * @static
- * @param {google.cloud.optimization.v1.IShipment=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.Shipment} Shipment instance
- */
- Shipment.create = function create(properties) {
- return new Shipment(properties);
- };
-
- /**
- * Encodes the specified Shipment message. Does not implicitly {@link google.cloud.optimization.v1.Shipment.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.Shipment
- * @static
- * @param {google.cloud.optimization.v1.IShipment} message Shipment message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Shipment.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.pickups != null && message.pickups.length)
- for (var i = 0; i < message.pickups.length; ++i)
- $root.google.cloud.optimization.v1.Shipment.VisitRequest.encode(message.pickups[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.deliveries != null && message.deliveries.length)
- for (var i = 0; i < message.deliveries.length; ++i)
- $root.google.cloud.optimization.v1.Shipment.VisitRequest.encode(message.deliveries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.demands != null && message.demands.length)
- for (var i = 0; i < message.demands.length; ++i)
- $root.google.cloud.optimization.v1.CapacityQuantity.encode(message.demands[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.penaltyCost != null && Object.hasOwnProperty.call(message, "penaltyCost"))
- writer.uint32(/* id 4, wireType 1 =*/33).double(message.penaltyCost);
- if (message.allowedVehicleIndices != null && message.allowedVehicleIndices.length) {
- writer.uint32(/* id 5, wireType 2 =*/42).fork();
- for (var i = 0; i < message.allowedVehicleIndices.length; ++i)
- writer.int32(message.allowedVehicleIndices[i]);
- writer.ldelim();
- }
- if (message.costsPerVehicle != null && message.costsPerVehicle.length) {
- writer.uint32(/* id 6, wireType 2 =*/50).fork();
- for (var i = 0; i < message.costsPerVehicle.length; ++i)
- writer.double(message.costsPerVehicle[i]);
- writer.ldelim();
- }
- if (message.costsPerVehicleIndices != null && message.costsPerVehicleIndices.length) {
- writer.uint32(/* id 7, wireType 2 =*/58).fork();
- for (var i = 0; i < message.costsPerVehicleIndices.length; ++i)
- writer.int32(message.costsPerVehicleIndices[i]);
- writer.ldelim();
- }
- if (message.pickupToDeliveryRelativeDetourLimit != null && Object.hasOwnProperty.call(message, "pickupToDeliveryRelativeDetourLimit"))
- writer.uint32(/* id 8, wireType 1 =*/65).double(message.pickupToDeliveryRelativeDetourLimit);
- if (message.pickupToDeliveryAbsoluteDetourLimit != null && Object.hasOwnProperty.call(message, "pickupToDeliveryAbsoluteDetourLimit"))
- $root.google.protobuf.Duration.encode(message.pickupToDeliveryAbsoluteDetourLimit, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
- if (message.pickupToDeliveryTimeLimit != null && Object.hasOwnProperty.call(message, "pickupToDeliveryTimeLimit"))
- $root.google.protobuf.Duration.encode(message.pickupToDeliveryTimeLimit, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
- if (message.shipmentType != null && Object.hasOwnProperty.call(message, "shipmentType"))
- writer.uint32(/* id 11, wireType 2 =*/90).string(message.shipmentType);
- if (message.label != null && Object.hasOwnProperty.call(message, "label"))
- writer.uint32(/* id 12, wireType 2 =*/98).string(message.label);
- if (message.ignore != null && Object.hasOwnProperty.call(message, "ignore"))
- writer.uint32(/* id 13, wireType 0 =*/104).bool(message.ignore);
- if (message.loadDemands != null && Object.hasOwnProperty.call(message, "loadDemands"))
- for (var keys = Object.keys(message.loadDemands), i = 0; i < keys.length; ++i) {
- writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
- $root.google.cloud.optimization.v1.Shipment.Load.encode(message.loadDemands[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
- }
- return writer;
- };
-
- /**
- * Encodes the specified Shipment message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Shipment.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.Shipment
- * @static
- * @param {google.cloud.optimization.v1.IShipment} message Shipment message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Shipment.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a Shipment message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.Shipment
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.Shipment} Shipment
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Shipment.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.optimization.v1.Shipment(), key, value;
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (!(message.pickups && message.pickups.length))
- message.pickups = [];
- message.pickups.push($root.google.cloud.optimization.v1.Shipment.VisitRequest.decode(reader, reader.uint32()));
- break;
- }
- case 2: {
- if (!(message.deliveries && message.deliveries.length))
- message.deliveries = [];
- message.deliveries.push($root.google.cloud.optimization.v1.Shipment.VisitRequest.decode(reader, reader.uint32()));
- break;
- }
- case 14: {
- if (message.loadDemands === $util.emptyObject)
- message.loadDemands = {};
- 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.optimization.v1.Shipment.Load.decode(reader, reader.uint32());
- break;
- default:
- reader.skipType(tag2 & 7);
- break;
- }
- }
- message.loadDemands[key] = value;
- break;
- }
- case 4: {
- message.penaltyCost = reader.double();
- break;
- }
- case 5: {
- if (!(message.allowedVehicleIndices && message.allowedVehicleIndices.length))
- message.allowedVehicleIndices = [];
- if ((tag & 7) === 2) {
- var end2 = reader.uint32() + reader.pos;
- while (reader.pos < end2)
- message.allowedVehicleIndices.push(reader.int32());
- } else
- message.allowedVehicleIndices.push(reader.int32());
- break;
- }
- case 6: {
- if (!(message.costsPerVehicle && message.costsPerVehicle.length))
- message.costsPerVehicle = [];
- if ((tag & 7) === 2) {
- var end2 = reader.uint32() + reader.pos;
- while (reader.pos < end2)
- message.costsPerVehicle.push(reader.double());
- } else
- message.costsPerVehicle.push(reader.double());
- break;
- }
- case 7: {
- if (!(message.costsPerVehicleIndices && message.costsPerVehicleIndices.length))
- message.costsPerVehicleIndices = [];
- if ((tag & 7) === 2) {
- var end2 = reader.uint32() + reader.pos;
- while (reader.pos < end2)
- message.costsPerVehicleIndices.push(reader.int32());
- } else
- message.costsPerVehicleIndices.push(reader.int32());
- break;
- }
- case 8: {
- message.pickupToDeliveryRelativeDetourLimit = reader.double();
- break;
- }
- case 9: {
- message.pickupToDeliveryAbsoluteDetourLimit = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- case 10: {
- message.pickupToDeliveryTimeLimit = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- case 11: {
- message.shipmentType = reader.string();
- break;
- }
- case 12: {
- message.label = reader.string();
- break;
- }
- case 13: {
- message.ignore = reader.bool();
- break;
- }
- case 3: {
- if (!(message.demands && message.demands.length))
- message.demands = [];
- message.demands.push($root.google.cloud.optimization.v1.CapacityQuantity.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a Shipment message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.Shipment
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.Shipment} Shipment
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Shipment.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a Shipment message.
- * @function verify
- * @memberof google.cloud.optimization.v1.Shipment
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Shipment.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.pickups != null && message.hasOwnProperty("pickups")) {
- if (!Array.isArray(message.pickups))
- return "pickups: array expected";
- for (var i = 0; i < message.pickups.length; ++i) {
- var error = $root.google.cloud.optimization.v1.Shipment.VisitRequest.verify(message.pickups[i]);
- if (error)
- return "pickups." + error;
- }
- }
- if (message.deliveries != null && message.hasOwnProperty("deliveries")) {
- if (!Array.isArray(message.deliveries))
- return "deliveries: array expected";
- for (var i = 0; i < message.deliveries.length; ++i) {
- var error = $root.google.cloud.optimization.v1.Shipment.VisitRequest.verify(message.deliveries[i]);
- if (error)
- return "deliveries." + error;
- }
- }
- if (message.loadDemands != null && message.hasOwnProperty("loadDemands")) {
- if (!$util.isObject(message.loadDemands))
- return "loadDemands: object expected";
- var key = Object.keys(message.loadDemands);
- for (var i = 0; i < key.length; ++i) {
- var error = $root.google.cloud.optimization.v1.Shipment.Load.verify(message.loadDemands[key[i]]);
- if (error)
- return "loadDemands." + error;
- }
- }
- if (message.penaltyCost != null && message.hasOwnProperty("penaltyCost")) {
- properties._penaltyCost = 1;
- if (typeof message.penaltyCost !== "number")
- return "penaltyCost: number expected";
- }
- if (message.allowedVehicleIndices != null && message.hasOwnProperty("allowedVehicleIndices")) {
- if (!Array.isArray(message.allowedVehicleIndices))
- return "allowedVehicleIndices: array expected";
- for (var i = 0; i < message.allowedVehicleIndices.length; ++i)
- if (!$util.isInteger(message.allowedVehicleIndices[i]))
- return "allowedVehicleIndices: integer[] expected";
- }
- if (message.costsPerVehicle != null && message.hasOwnProperty("costsPerVehicle")) {
- if (!Array.isArray(message.costsPerVehicle))
- return "costsPerVehicle: array expected";
- for (var i = 0; i < message.costsPerVehicle.length; ++i)
- if (typeof message.costsPerVehicle[i] !== "number")
- return "costsPerVehicle: number[] expected";
- }
- if (message.costsPerVehicleIndices != null && message.hasOwnProperty("costsPerVehicleIndices")) {
- if (!Array.isArray(message.costsPerVehicleIndices))
- return "costsPerVehicleIndices: array expected";
- for (var i = 0; i < message.costsPerVehicleIndices.length; ++i)
- if (!$util.isInteger(message.costsPerVehicleIndices[i]))
- return "costsPerVehicleIndices: integer[] expected";
- }
- if (message.pickupToDeliveryRelativeDetourLimit != null && message.hasOwnProperty("pickupToDeliveryRelativeDetourLimit")) {
- properties._pickupToDeliveryRelativeDetourLimit = 1;
- if (typeof message.pickupToDeliveryRelativeDetourLimit !== "number")
- return "pickupToDeliveryRelativeDetourLimit: number expected";
- }
- if (message.pickupToDeliveryAbsoluteDetourLimit != null && message.hasOwnProperty("pickupToDeliveryAbsoluteDetourLimit")) {
- var error = $root.google.protobuf.Duration.verify(message.pickupToDeliveryAbsoluteDetourLimit);
- if (error)
- return "pickupToDeliveryAbsoluteDetourLimit." + error;
- }
- if (message.pickupToDeliveryTimeLimit != null && message.hasOwnProperty("pickupToDeliveryTimeLimit")) {
- var error = $root.google.protobuf.Duration.verify(message.pickupToDeliveryTimeLimit);
- if (error)
- return "pickupToDeliveryTimeLimit." + error;
- }
- if (message.shipmentType != null && message.hasOwnProperty("shipmentType"))
- if (!$util.isString(message.shipmentType))
- return "shipmentType: string expected";
- if (message.label != null && message.hasOwnProperty("label"))
- if (!$util.isString(message.label))
- return "label: string expected";
- if (message.ignore != null && message.hasOwnProperty("ignore"))
- if (typeof message.ignore !== "boolean")
- return "ignore: boolean expected";
- if (message.demands != null && message.hasOwnProperty("demands")) {
- if (!Array.isArray(message.demands))
- return "demands: array expected";
- for (var i = 0; i < message.demands.length; ++i) {
- var error = $root.google.cloud.optimization.v1.CapacityQuantity.verify(message.demands[i]);
- if (error)
- return "demands." + error;
- }
- }
- return null;
- };
-
- /**
- * Creates a Shipment message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.Shipment
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.Shipment} Shipment
- */
- Shipment.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.Shipment)
- return object;
- var message = new $root.google.cloud.optimization.v1.Shipment();
- if (object.pickups) {
- if (!Array.isArray(object.pickups))
- throw TypeError(".google.cloud.optimization.v1.Shipment.pickups: array expected");
- message.pickups = [];
- for (var i = 0; i < object.pickups.length; ++i) {
- if (typeof object.pickups[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.pickups: object expected");
- message.pickups[i] = $root.google.cloud.optimization.v1.Shipment.VisitRequest.fromObject(object.pickups[i]);
- }
- }
- if (object.deliveries) {
- if (!Array.isArray(object.deliveries))
- throw TypeError(".google.cloud.optimization.v1.Shipment.deliveries: array expected");
- message.deliveries = [];
- for (var i = 0; i < object.deliveries.length; ++i) {
- if (typeof object.deliveries[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.deliveries: object expected");
- message.deliveries[i] = $root.google.cloud.optimization.v1.Shipment.VisitRequest.fromObject(object.deliveries[i]);
- }
- }
- if (object.loadDemands) {
- if (typeof object.loadDemands !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.loadDemands: object expected");
- message.loadDemands = {};
- for (var keys = Object.keys(object.loadDemands), i = 0; i < keys.length; ++i) {
- if (typeof object.loadDemands[keys[i]] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.loadDemands: object expected");
- message.loadDemands[keys[i]] = $root.google.cloud.optimization.v1.Shipment.Load.fromObject(object.loadDemands[keys[i]]);
- }
- }
- if (object.penaltyCost != null)
- message.penaltyCost = Number(object.penaltyCost);
- if (object.allowedVehicleIndices) {
- if (!Array.isArray(object.allowedVehicleIndices))
- throw TypeError(".google.cloud.optimization.v1.Shipment.allowedVehicleIndices: array expected");
- message.allowedVehicleIndices = [];
- for (var i = 0; i < object.allowedVehicleIndices.length; ++i)
- message.allowedVehicleIndices[i] = object.allowedVehicleIndices[i] | 0;
- }
- if (object.costsPerVehicle) {
- if (!Array.isArray(object.costsPerVehicle))
- throw TypeError(".google.cloud.optimization.v1.Shipment.costsPerVehicle: array expected");
- message.costsPerVehicle = [];
- for (var i = 0; i < object.costsPerVehicle.length; ++i)
- message.costsPerVehicle[i] = Number(object.costsPerVehicle[i]);
- }
- if (object.costsPerVehicleIndices) {
- if (!Array.isArray(object.costsPerVehicleIndices))
- throw TypeError(".google.cloud.optimization.v1.Shipment.costsPerVehicleIndices: array expected");
- message.costsPerVehicleIndices = [];
- for (var i = 0; i < object.costsPerVehicleIndices.length; ++i)
- message.costsPerVehicleIndices[i] = object.costsPerVehicleIndices[i] | 0;
- }
- if (object.pickupToDeliveryRelativeDetourLimit != null)
- message.pickupToDeliveryRelativeDetourLimit = Number(object.pickupToDeliveryRelativeDetourLimit);
- if (object.pickupToDeliveryAbsoluteDetourLimit != null) {
- if (typeof object.pickupToDeliveryAbsoluteDetourLimit !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.pickupToDeliveryAbsoluteDetourLimit: object expected");
- message.pickupToDeliveryAbsoluteDetourLimit = $root.google.protobuf.Duration.fromObject(object.pickupToDeliveryAbsoluteDetourLimit);
- }
- if (object.pickupToDeliveryTimeLimit != null) {
- if (typeof object.pickupToDeliveryTimeLimit !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.pickupToDeliveryTimeLimit: object expected");
- message.pickupToDeliveryTimeLimit = $root.google.protobuf.Duration.fromObject(object.pickupToDeliveryTimeLimit);
- }
- if (object.shipmentType != null)
- message.shipmentType = String(object.shipmentType);
- if (object.label != null)
- message.label = String(object.label);
- if (object.ignore != null)
- message.ignore = Boolean(object.ignore);
- if (object.demands) {
- if (!Array.isArray(object.demands))
- throw TypeError(".google.cloud.optimization.v1.Shipment.demands: array expected");
- message.demands = [];
- for (var i = 0; i < object.demands.length; ++i) {
- if (typeof object.demands[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.demands: object expected");
- message.demands[i] = $root.google.cloud.optimization.v1.CapacityQuantity.fromObject(object.demands[i]);
- }
- }
- return message;
- };
-
- /**
- * Creates a plain object from a Shipment message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.Shipment
- * @static
- * @param {google.cloud.optimization.v1.Shipment} message Shipment
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Shipment.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.pickups = [];
- object.deliveries = [];
- object.demands = [];
- object.allowedVehicleIndices = [];
- object.costsPerVehicle = [];
- object.costsPerVehicleIndices = [];
- }
- if (options.objects || options.defaults)
- object.loadDemands = {};
- if (options.defaults) {
- object.pickupToDeliveryAbsoluteDetourLimit = null;
- object.pickupToDeliveryTimeLimit = null;
- object.shipmentType = "";
- object.label = "";
- object.ignore = false;
- }
- if (message.pickups && message.pickups.length) {
- object.pickups = [];
- for (var j = 0; j < message.pickups.length; ++j)
- object.pickups[j] = $root.google.cloud.optimization.v1.Shipment.VisitRequest.toObject(message.pickups[j], options);
- }
- if (message.deliveries && message.deliveries.length) {
- object.deliveries = [];
- for (var j = 0; j < message.deliveries.length; ++j)
- object.deliveries[j] = $root.google.cloud.optimization.v1.Shipment.VisitRequest.toObject(message.deliveries[j], options);
- }
- if (message.demands && message.demands.length) {
- object.demands = [];
- for (var j = 0; j < message.demands.length; ++j)
- object.demands[j] = $root.google.cloud.optimization.v1.CapacityQuantity.toObject(message.demands[j], options);
- }
- if (message.penaltyCost != null && message.hasOwnProperty("penaltyCost")) {
- object.penaltyCost = options.json && !isFinite(message.penaltyCost) ? String(message.penaltyCost) : message.penaltyCost;
- if (options.oneofs)
- object._penaltyCost = "penaltyCost";
- }
- if (message.allowedVehicleIndices && message.allowedVehicleIndices.length) {
- object.allowedVehicleIndices = [];
- for (var j = 0; j < message.allowedVehicleIndices.length; ++j)
- object.allowedVehicleIndices[j] = message.allowedVehicleIndices[j];
- }
- if (message.costsPerVehicle && message.costsPerVehicle.length) {
- object.costsPerVehicle = [];
- for (var j = 0; j < message.costsPerVehicle.length; ++j)
- object.costsPerVehicle[j] = options.json && !isFinite(message.costsPerVehicle[j]) ? String(message.costsPerVehicle[j]) : message.costsPerVehicle[j];
- }
- if (message.costsPerVehicleIndices && message.costsPerVehicleIndices.length) {
- object.costsPerVehicleIndices = [];
- for (var j = 0; j < message.costsPerVehicleIndices.length; ++j)
- object.costsPerVehicleIndices[j] = message.costsPerVehicleIndices[j];
- }
- if (message.pickupToDeliveryRelativeDetourLimit != null && message.hasOwnProperty("pickupToDeliveryRelativeDetourLimit")) {
- object.pickupToDeliveryRelativeDetourLimit = options.json && !isFinite(message.pickupToDeliveryRelativeDetourLimit) ? String(message.pickupToDeliveryRelativeDetourLimit) : message.pickupToDeliveryRelativeDetourLimit;
- if (options.oneofs)
- object._pickupToDeliveryRelativeDetourLimit = "pickupToDeliveryRelativeDetourLimit";
- }
- if (message.pickupToDeliveryAbsoluteDetourLimit != null && message.hasOwnProperty("pickupToDeliveryAbsoluteDetourLimit"))
- object.pickupToDeliveryAbsoluteDetourLimit = $root.google.protobuf.Duration.toObject(message.pickupToDeliveryAbsoluteDetourLimit, options);
- if (message.pickupToDeliveryTimeLimit != null && message.hasOwnProperty("pickupToDeliveryTimeLimit"))
- object.pickupToDeliveryTimeLimit = $root.google.protobuf.Duration.toObject(message.pickupToDeliveryTimeLimit, options);
- if (message.shipmentType != null && message.hasOwnProperty("shipmentType"))
- object.shipmentType = message.shipmentType;
- if (message.label != null && message.hasOwnProperty("label"))
- object.label = message.label;
- if (message.ignore != null && message.hasOwnProperty("ignore"))
- object.ignore = message.ignore;
- var keys2;
- if (message.loadDemands && (keys2 = Object.keys(message.loadDemands)).length) {
- object.loadDemands = {};
- for (var j = 0; j < keys2.length; ++j)
- object.loadDemands[keys2[j]] = $root.google.cloud.optimization.v1.Shipment.Load.toObject(message.loadDemands[keys2[j]], options);
- }
- return object;
- };
-
- /**
- * Converts this Shipment to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.Shipment
- * @instance
- * @returns {Object.} JSON object
- */
- Shipment.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for Shipment
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.Shipment
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Shipment.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.Shipment";
- };
-
- Shipment.VisitRequest = (function() {
-
- /**
- * Properties of a VisitRequest.
- * @memberof google.cloud.optimization.v1.Shipment
- * @interface IVisitRequest
- * @property {google.type.ILatLng|null} [arrivalLocation] VisitRequest arrivalLocation
- * @property {google.cloud.optimization.v1.IWaypoint|null} [arrivalWaypoint] VisitRequest arrivalWaypoint
- * @property {google.type.ILatLng|null} [departureLocation] VisitRequest departureLocation
- * @property {google.cloud.optimization.v1.IWaypoint|null} [departureWaypoint] VisitRequest departureWaypoint
- * @property {Array.|null} [tags] VisitRequest tags
- * @property {Array.|null} [timeWindows] VisitRequest timeWindows
- * @property {google.protobuf.IDuration|null} [duration] VisitRequest duration
- * @property {number|null} [cost] VisitRequest cost
- * @property {Object.|null} [loadDemands] VisitRequest loadDemands
- * @property {Array.|null} [visitTypes] VisitRequest visitTypes
- * @property {string|null} [label] VisitRequest label
- * @property {Array.|null} [demands] VisitRequest demands
- */
-
- /**
- * Constructs a new VisitRequest.
- * @memberof google.cloud.optimization.v1.Shipment
- * @classdesc Represents a VisitRequest.
- * @implements IVisitRequest
- * @constructor
- * @param {google.cloud.optimization.v1.Shipment.IVisitRequest=} [properties] Properties to set
- */
- function VisitRequest(properties) {
- this.tags = [];
- this.timeWindows = [];
- this.loadDemands = {};
- this.visitTypes = [];
- this.demands = [];
- 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]];
- }
-
- /**
- * VisitRequest arrivalLocation.
- * @member {google.type.ILatLng|null|undefined} arrivalLocation
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.arrivalLocation = null;
-
- /**
- * VisitRequest arrivalWaypoint.
- * @member {google.cloud.optimization.v1.IWaypoint|null|undefined} arrivalWaypoint
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.arrivalWaypoint = null;
-
- /**
- * VisitRequest departureLocation.
- * @member {google.type.ILatLng|null|undefined} departureLocation
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.departureLocation = null;
-
- /**
- * VisitRequest departureWaypoint.
- * @member {google.cloud.optimization.v1.IWaypoint|null|undefined} departureWaypoint
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.departureWaypoint = null;
-
- /**
- * VisitRequest tags.
- * @member {Array.} tags
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.tags = $util.emptyArray;
-
- /**
- * VisitRequest timeWindows.
- * @member {Array.} timeWindows
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.timeWindows = $util.emptyArray;
-
- /**
- * VisitRequest duration.
- * @member {google.protobuf.IDuration|null|undefined} duration
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.duration = null;
-
- /**
- * VisitRequest cost.
- * @member {number} cost
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.cost = 0;
-
- /**
- * VisitRequest loadDemands.
- * @member {Object.} loadDemands
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.loadDemands = $util.emptyObject;
-
- /**
- * VisitRequest visitTypes.
- * @member {Array.} visitTypes
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.visitTypes = $util.emptyArray;
-
- /**
- * VisitRequest label.
- * @member {string} label
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.label = "";
-
- /**
- * VisitRequest demands.
- * @member {Array.} demands
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- */
- VisitRequest.prototype.demands = $util.emptyArray;
-
- /**
- * Creates a new VisitRequest instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @static
- * @param {google.cloud.optimization.v1.Shipment.IVisitRequest=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.Shipment.VisitRequest} VisitRequest instance
- */
- VisitRequest.create = function create(properties) {
- return new VisitRequest(properties);
- };
-
- /**
- * Encodes the specified VisitRequest message. Does not implicitly {@link google.cloud.optimization.v1.Shipment.VisitRequest.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @static
- * @param {google.cloud.optimization.v1.Shipment.IVisitRequest} message VisitRequest message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- VisitRequest.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.arrivalLocation != null && Object.hasOwnProperty.call(message, "arrivalLocation"))
- $root.google.type.LatLng.encode(message.arrivalLocation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.arrivalWaypoint != null && Object.hasOwnProperty.call(message, "arrivalWaypoint"))
- $root.google.cloud.optimization.v1.Waypoint.encode(message.arrivalWaypoint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.departureLocation != null && Object.hasOwnProperty.call(message, "departureLocation"))
- $root.google.type.LatLng.encode(message.departureLocation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.departureWaypoint != null && Object.hasOwnProperty.call(message, "departureWaypoint"))
- $root.google.cloud.optimization.v1.Waypoint.encode(message.departureWaypoint, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.tags != null && message.tags.length)
- for (var i = 0; i < message.tags.length; ++i)
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.tags[i]);
- if (message.timeWindows != null && message.timeWindows.length)
- for (var i = 0; i < message.timeWindows.length; ++i)
- $root.google.cloud.optimization.v1.TimeWindow.encode(message.timeWindows[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
- if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
- $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
- if (message.cost != null && Object.hasOwnProperty.call(message, "cost"))
- writer.uint32(/* id 8, wireType 1 =*/65).double(message.cost);
- if (message.demands != null && message.demands.length)
- for (var i = 0; i < message.demands.length; ++i)
- $root.google.cloud.optimization.v1.CapacityQuantity.encode(message.demands[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
- if (message.visitTypes != null && message.visitTypes.length)
- for (var i = 0; i < message.visitTypes.length; ++i)
- writer.uint32(/* id 10, wireType 2 =*/82).string(message.visitTypes[i]);
- if (message.label != null && Object.hasOwnProperty.call(message, "label"))
- writer.uint32(/* id 11, wireType 2 =*/90).string(message.label);
- if (message.loadDemands != null && Object.hasOwnProperty.call(message, "loadDemands"))
- for (var keys = Object.keys(message.loadDemands), i = 0; i < keys.length; ++i) {
- writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
- $root.google.cloud.optimization.v1.Shipment.Load.encode(message.loadDemands[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
- }
- return writer;
- };
-
- /**
- * Encodes the specified VisitRequest message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Shipment.VisitRequest.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @static
- * @param {google.cloud.optimization.v1.Shipment.IVisitRequest} message VisitRequest message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- VisitRequest.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a VisitRequest message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.Shipment.VisitRequest} VisitRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- VisitRequest.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.optimization.v1.Shipment.VisitRequest(), key, value;
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.arrivalLocation = $root.google.type.LatLng.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.arrivalWaypoint = $root.google.cloud.optimization.v1.Waypoint.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.departureLocation = $root.google.type.LatLng.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- message.departureWaypoint = $root.google.cloud.optimization.v1.Waypoint.decode(reader, reader.uint32());
- break;
- }
- case 5: {
- if (!(message.tags && message.tags.length))
- message.tags = [];
- message.tags.push(reader.string());
- break;
- }
- case 6: {
- if (!(message.timeWindows && message.timeWindows.length))
- message.timeWindows = [];
- message.timeWindows.push($root.google.cloud.optimization.v1.TimeWindow.decode(reader, reader.uint32()));
- break;
- }
- case 7: {
- message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- case 8: {
- message.cost = reader.double();
- break;
- }
- case 12: {
- if (message.loadDemands === $util.emptyObject)
- message.loadDemands = {};
- 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.optimization.v1.Shipment.Load.decode(reader, reader.uint32());
- break;
- default:
- reader.skipType(tag2 & 7);
- break;
- }
- }
- message.loadDemands[key] = value;
- break;
- }
- case 10: {
- if (!(message.visitTypes && message.visitTypes.length))
- message.visitTypes = [];
- message.visitTypes.push(reader.string());
- break;
- }
- case 11: {
- message.label = reader.string();
- break;
- }
- case 9: {
- if (!(message.demands && message.demands.length))
- message.demands = [];
- message.demands.push($root.google.cloud.optimization.v1.CapacityQuantity.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a VisitRequest message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.Shipment.VisitRequest} VisitRequest
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- VisitRequest.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a VisitRequest message.
- * @function verify
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- VisitRequest.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.arrivalLocation != null && message.hasOwnProperty("arrivalLocation")) {
- var error = $root.google.type.LatLng.verify(message.arrivalLocation);
- if (error)
- return "arrivalLocation." + error;
- }
- if (message.arrivalWaypoint != null && message.hasOwnProperty("arrivalWaypoint")) {
- var error = $root.google.cloud.optimization.v1.Waypoint.verify(message.arrivalWaypoint);
- if (error)
- return "arrivalWaypoint." + error;
- }
- if (message.departureLocation != null && message.hasOwnProperty("departureLocation")) {
- var error = $root.google.type.LatLng.verify(message.departureLocation);
- if (error)
- return "departureLocation." + error;
- }
- if (message.departureWaypoint != null && message.hasOwnProperty("departureWaypoint")) {
- var error = $root.google.cloud.optimization.v1.Waypoint.verify(message.departureWaypoint);
- if (error)
- return "departureWaypoint." + error;
- }
- if (message.tags != null && message.hasOwnProperty("tags")) {
- if (!Array.isArray(message.tags))
- return "tags: array expected";
- for (var i = 0; i < message.tags.length; ++i)
- if (!$util.isString(message.tags[i]))
- return "tags: string[] expected";
- }
- if (message.timeWindows != null && message.hasOwnProperty("timeWindows")) {
- if (!Array.isArray(message.timeWindows))
- return "timeWindows: array expected";
- for (var i = 0; i < message.timeWindows.length; ++i) {
- var error = $root.google.cloud.optimization.v1.TimeWindow.verify(message.timeWindows[i]);
- if (error)
- return "timeWindows." + error;
- }
- }
- if (message.duration != null && message.hasOwnProperty("duration")) {
- var error = $root.google.protobuf.Duration.verify(message.duration);
- if (error)
- return "duration." + error;
- }
- if (message.cost != null && message.hasOwnProperty("cost"))
- if (typeof message.cost !== "number")
- return "cost: number expected";
- if (message.loadDemands != null && message.hasOwnProperty("loadDemands")) {
- if (!$util.isObject(message.loadDemands))
- return "loadDemands: object expected";
- var key = Object.keys(message.loadDemands);
- for (var i = 0; i < key.length; ++i) {
- var error = $root.google.cloud.optimization.v1.Shipment.Load.verify(message.loadDemands[key[i]]);
- if (error)
- return "loadDemands." + error;
- }
- }
- if (message.visitTypes != null && message.hasOwnProperty("visitTypes")) {
- if (!Array.isArray(message.visitTypes))
- return "visitTypes: array expected";
- for (var i = 0; i < message.visitTypes.length; ++i)
- if (!$util.isString(message.visitTypes[i]))
- return "visitTypes: string[] expected";
- }
- if (message.label != null && message.hasOwnProperty("label"))
- if (!$util.isString(message.label))
- return "label: string expected";
- if (message.demands != null && message.hasOwnProperty("demands")) {
- if (!Array.isArray(message.demands))
- return "demands: array expected";
- for (var i = 0; i < message.demands.length; ++i) {
- var error = $root.google.cloud.optimization.v1.CapacityQuantity.verify(message.demands[i]);
- if (error)
- return "demands." + error;
- }
- }
- return null;
- };
-
- /**
- * Creates a VisitRequest message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.Shipment.VisitRequest} VisitRequest
- */
- VisitRequest.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.Shipment.VisitRequest)
- return object;
- var message = new $root.google.cloud.optimization.v1.Shipment.VisitRequest();
- if (object.arrivalLocation != null) {
- if (typeof object.arrivalLocation !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.arrivalLocation: object expected");
- message.arrivalLocation = $root.google.type.LatLng.fromObject(object.arrivalLocation);
- }
- if (object.arrivalWaypoint != null) {
- if (typeof object.arrivalWaypoint !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.arrivalWaypoint: object expected");
- message.arrivalWaypoint = $root.google.cloud.optimization.v1.Waypoint.fromObject(object.arrivalWaypoint);
- }
- if (object.departureLocation != null) {
- if (typeof object.departureLocation !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.departureLocation: object expected");
- message.departureLocation = $root.google.type.LatLng.fromObject(object.departureLocation);
- }
- if (object.departureWaypoint != null) {
- if (typeof object.departureWaypoint !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.departureWaypoint: object expected");
- message.departureWaypoint = $root.google.cloud.optimization.v1.Waypoint.fromObject(object.departureWaypoint);
- }
- if (object.tags) {
- if (!Array.isArray(object.tags))
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.tags: array expected");
- message.tags = [];
- for (var i = 0; i < object.tags.length; ++i)
- message.tags[i] = String(object.tags[i]);
- }
- if (object.timeWindows) {
- if (!Array.isArray(object.timeWindows))
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.timeWindows: array expected");
- message.timeWindows = [];
- for (var i = 0; i < object.timeWindows.length; ++i) {
- if (typeof object.timeWindows[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.timeWindows: object expected");
- message.timeWindows[i] = $root.google.cloud.optimization.v1.TimeWindow.fromObject(object.timeWindows[i]);
- }
- }
- if (object.duration != null) {
- if (typeof object.duration !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.duration: object expected");
- message.duration = $root.google.protobuf.Duration.fromObject(object.duration);
- }
- if (object.cost != null)
- message.cost = Number(object.cost);
- if (object.loadDemands) {
- if (typeof object.loadDemands !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.loadDemands: object expected");
- message.loadDemands = {};
- for (var keys = Object.keys(object.loadDemands), i = 0; i < keys.length; ++i) {
- if (typeof object.loadDemands[keys[i]] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.loadDemands: object expected");
- message.loadDemands[keys[i]] = $root.google.cloud.optimization.v1.Shipment.Load.fromObject(object.loadDemands[keys[i]]);
- }
- }
- if (object.visitTypes) {
- if (!Array.isArray(object.visitTypes))
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.visitTypes: array expected");
- message.visitTypes = [];
- for (var i = 0; i < object.visitTypes.length; ++i)
- message.visitTypes[i] = String(object.visitTypes[i]);
- }
- if (object.label != null)
- message.label = String(object.label);
- if (object.demands) {
- if (!Array.isArray(object.demands))
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.demands: array expected");
- message.demands = [];
- for (var i = 0; i < object.demands.length; ++i) {
- if (typeof object.demands[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Shipment.VisitRequest.demands: object expected");
- message.demands[i] = $root.google.cloud.optimization.v1.CapacityQuantity.fromObject(object.demands[i]);
- }
- }
- return message;
- };
-
- /**
- * Creates a plain object from a VisitRequest message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @static
- * @param {google.cloud.optimization.v1.Shipment.VisitRequest} message VisitRequest
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- VisitRequest.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.tags = [];
- object.timeWindows = [];
- object.demands = [];
- object.visitTypes = [];
- }
- if (options.objects || options.defaults)
- object.loadDemands = {};
- if (options.defaults) {
- object.arrivalLocation = null;
- object.arrivalWaypoint = null;
- object.departureLocation = null;
- object.departureWaypoint = null;
- object.duration = null;
- object.cost = 0;
- object.label = "";
- }
- if (message.arrivalLocation != null && message.hasOwnProperty("arrivalLocation"))
- object.arrivalLocation = $root.google.type.LatLng.toObject(message.arrivalLocation, options);
- if (message.arrivalWaypoint != null && message.hasOwnProperty("arrivalWaypoint"))
- object.arrivalWaypoint = $root.google.cloud.optimization.v1.Waypoint.toObject(message.arrivalWaypoint, options);
- if (message.departureLocation != null && message.hasOwnProperty("departureLocation"))
- object.departureLocation = $root.google.type.LatLng.toObject(message.departureLocation, options);
- if (message.departureWaypoint != null && message.hasOwnProperty("departureWaypoint"))
- object.departureWaypoint = $root.google.cloud.optimization.v1.Waypoint.toObject(message.departureWaypoint, options);
- if (message.tags && message.tags.length) {
- object.tags = [];
- for (var j = 0; j < message.tags.length; ++j)
- object.tags[j] = message.tags[j];
- }
- if (message.timeWindows && message.timeWindows.length) {
- object.timeWindows = [];
- for (var j = 0; j < message.timeWindows.length; ++j)
- object.timeWindows[j] = $root.google.cloud.optimization.v1.TimeWindow.toObject(message.timeWindows[j], options);
- }
- if (message.duration != null && message.hasOwnProperty("duration"))
- object.duration = $root.google.protobuf.Duration.toObject(message.duration, options);
- if (message.cost != null && message.hasOwnProperty("cost"))
- object.cost = options.json && !isFinite(message.cost) ? String(message.cost) : message.cost;
- if (message.demands && message.demands.length) {
- object.demands = [];
- for (var j = 0; j < message.demands.length; ++j)
- object.demands[j] = $root.google.cloud.optimization.v1.CapacityQuantity.toObject(message.demands[j], options);
- }
- if (message.visitTypes && message.visitTypes.length) {
- object.visitTypes = [];
- for (var j = 0; j < message.visitTypes.length; ++j)
- object.visitTypes[j] = message.visitTypes[j];
- }
- if (message.label != null && message.hasOwnProperty("label"))
- object.label = message.label;
- var keys2;
- if (message.loadDemands && (keys2 = Object.keys(message.loadDemands)).length) {
- object.loadDemands = {};
- for (var j = 0; j < keys2.length; ++j)
- object.loadDemands[keys2[j]] = $root.google.cloud.optimization.v1.Shipment.Load.toObject(message.loadDemands[keys2[j]], options);
- }
- return object;
- };
-
- /**
- * Converts this VisitRequest to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @instance
- * @returns {Object.} JSON object
- */
- VisitRequest.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for VisitRequest
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.Shipment.VisitRequest
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- VisitRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.Shipment.VisitRequest";
- };
-
- return VisitRequest;
- })();
-
- Shipment.Load = (function() {
-
- /**
- * Properties of a Load.
- * @memberof google.cloud.optimization.v1.Shipment
- * @interface ILoad
- * @property {number|Long|null} [amount] Load amount
- */
-
- /**
- * Constructs a new Load.
- * @memberof google.cloud.optimization.v1.Shipment
- * @classdesc Represents a Load.
- * @implements ILoad
- * @constructor
- * @param {google.cloud.optimization.v1.Shipment.ILoad=} [properties] Properties to set
- */
- function Load(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]];
- }
-
- /**
- * Load amount.
- * @member {number|Long} amount
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @instance
- */
- Load.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
- /**
- * Creates a new Load instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @static
- * @param {google.cloud.optimization.v1.Shipment.ILoad=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.Shipment.Load} Load instance
- */
- Load.create = function create(properties) {
- return new Load(properties);
- };
-
- /**
- * Encodes the specified Load message. Does not implicitly {@link google.cloud.optimization.v1.Shipment.Load.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @static
- * @param {google.cloud.optimization.v1.Shipment.ILoad} message Load message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Load.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.amount != null && Object.hasOwnProperty.call(message, "amount"))
- writer.uint32(/* id 2, wireType 0 =*/16).int64(message.amount);
- return writer;
- };
-
- /**
- * Encodes the specified Load message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Shipment.Load.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @static
- * @param {google.cloud.optimization.v1.Shipment.ILoad} message Load message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Load.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a Load message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.Shipment.Load} Load
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Load.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.optimization.v1.Shipment.Load();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 2: {
- message.amount = reader.int64();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a Load message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.Shipment.Load} Load
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Load.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a Load message.
- * @function verify
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Load.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.amount != null && message.hasOwnProperty("amount"))
- if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high)))
- return "amount: integer|Long expected";
- return null;
- };
-
- /**
- * Creates a Load message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.Shipment.Load} Load
- */
- Load.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.Shipment.Load)
- return object;
- var message = new $root.google.cloud.optimization.v1.Shipment.Load();
- if (object.amount != null)
- if ($util.Long)
- (message.amount = $util.Long.fromValue(object.amount)).unsigned = false;
- else if (typeof object.amount === "string")
- message.amount = parseInt(object.amount, 10);
- else if (typeof object.amount === "number")
- message.amount = object.amount;
- else if (typeof object.amount === "object")
- message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber();
- return message;
- };
-
- /**
- * Creates a plain object from a Load message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @static
- * @param {google.cloud.optimization.v1.Shipment.Load} message Load
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Load.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.amount = options.longs === String ? "0" : 0;
- if (message.amount != null && message.hasOwnProperty("amount"))
- if (typeof message.amount === "number")
- object.amount = options.longs === String ? String(message.amount) : message.amount;
- else
- object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber() : message.amount;
- return object;
- };
-
- /**
- * Converts this Load to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @instance
- * @returns {Object.} JSON object
- */
- Load.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for Load
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.Shipment.Load
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Load.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.Shipment.Load";
- };
-
- return Load;
- })();
-
- return Shipment;
- })();
-
- v1.ShipmentTypeIncompatibility = (function() {
-
- /**
- * Properties of a ShipmentTypeIncompatibility.
- * @memberof google.cloud.optimization.v1
- * @interface IShipmentTypeIncompatibility
- * @property {Array.|null} [types] ShipmentTypeIncompatibility types
- * @property {google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode|null} [incompatibilityMode] ShipmentTypeIncompatibility incompatibilityMode
- */
-
- /**
- * Constructs a new ShipmentTypeIncompatibility.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a ShipmentTypeIncompatibility.
- * @implements IShipmentTypeIncompatibility
- * @constructor
- * @param {google.cloud.optimization.v1.IShipmentTypeIncompatibility=} [properties] Properties to set
- */
- function ShipmentTypeIncompatibility(properties) {
- this.types = [];
- 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]];
- }
-
- /**
- * ShipmentTypeIncompatibility types.
- * @member {Array.} types
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @instance
- */
- ShipmentTypeIncompatibility.prototype.types = $util.emptyArray;
-
- /**
- * ShipmentTypeIncompatibility incompatibilityMode.
- * @member {google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode} incompatibilityMode
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @instance
- */
- ShipmentTypeIncompatibility.prototype.incompatibilityMode = 0;
-
- /**
- * Creates a new ShipmentTypeIncompatibility instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @static
- * @param {google.cloud.optimization.v1.IShipmentTypeIncompatibility=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.ShipmentTypeIncompatibility} ShipmentTypeIncompatibility instance
- */
- ShipmentTypeIncompatibility.create = function create(properties) {
- return new ShipmentTypeIncompatibility(properties);
- };
-
- /**
- * Encodes the specified ShipmentTypeIncompatibility message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentTypeIncompatibility.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @static
- * @param {google.cloud.optimization.v1.IShipmentTypeIncompatibility} message ShipmentTypeIncompatibility message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ShipmentTypeIncompatibility.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.types != null && message.types.length)
- for (var i = 0; i < message.types.length; ++i)
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.types[i]);
- if (message.incompatibilityMode != null && Object.hasOwnProperty.call(message, "incompatibilityMode"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.incompatibilityMode);
- return writer;
- };
-
- /**
- * Encodes the specified ShipmentTypeIncompatibility message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentTypeIncompatibility.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @static
- * @param {google.cloud.optimization.v1.IShipmentTypeIncompatibility} message ShipmentTypeIncompatibility message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ShipmentTypeIncompatibility.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a ShipmentTypeIncompatibility message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.ShipmentTypeIncompatibility} ShipmentTypeIncompatibility
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ShipmentTypeIncompatibility.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.optimization.v1.ShipmentTypeIncompatibility();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (!(message.types && message.types.length))
- message.types = [];
- message.types.push(reader.string());
- break;
- }
- case 2: {
- message.incompatibilityMode = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a ShipmentTypeIncompatibility message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.ShipmentTypeIncompatibility} ShipmentTypeIncompatibility
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ShipmentTypeIncompatibility.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a ShipmentTypeIncompatibility message.
- * @function verify
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- ShipmentTypeIncompatibility.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.types != null && message.hasOwnProperty("types")) {
- if (!Array.isArray(message.types))
- return "types: array expected";
- for (var i = 0; i < message.types.length; ++i)
- if (!$util.isString(message.types[i]))
- return "types: string[] expected";
- }
- if (message.incompatibilityMode != null && message.hasOwnProperty("incompatibilityMode"))
- switch (message.incompatibilityMode) {
- default:
- return "incompatibilityMode: enum value expected";
- case 0:
- case 1:
- case 2:
- break;
- }
- return null;
- };
-
- /**
- * Creates a ShipmentTypeIncompatibility message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.ShipmentTypeIncompatibility} ShipmentTypeIncompatibility
- */
- ShipmentTypeIncompatibility.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.ShipmentTypeIncompatibility)
- return object;
- var message = new $root.google.cloud.optimization.v1.ShipmentTypeIncompatibility();
- if (object.types) {
- if (!Array.isArray(object.types))
- throw TypeError(".google.cloud.optimization.v1.ShipmentTypeIncompatibility.types: array expected");
- message.types = [];
- for (var i = 0; i < object.types.length; ++i)
- message.types[i] = String(object.types[i]);
- }
- switch (object.incompatibilityMode) {
- default:
- if (typeof object.incompatibilityMode === "number") {
- message.incompatibilityMode = object.incompatibilityMode;
- break;
- }
- break;
- case "INCOMPATIBILITY_MODE_UNSPECIFIED":
- case 0:
- message.incompatibilityMode = 0;
- break;
- case "NOT_PERFORMED_BY_SAME_VEHICLE":
- case 1:
- message.incompatibilityMode = 1;
- break;
- case "NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY":
- case 2:
- message.incompatibilityMode = 2;
- break;
- }
- return message;
- };
-
- /**
- * Creates a plain object from a ShipmentTypeIncompatibility message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @static
- * @param {google.cloud.optimization.v1.ShipmentTypeIncompatibility} message ShipmentTypeIncompatibility
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- ShipmentTypeIncompatibility.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.types = [];
- if (options.defaults)
- object.incompatibilityMode = options.enums === String ? "INCOMPATIBILITY_MODE_UNSPECIFIED" : 0;
- if (message.types && message.types.length) {
- object.types = [];
- for (var j = 0; j < message.types.length; ++j)
- object.types[j] = message.types[j];
- }
- if (message.incompatibilityMode != null && message.hasOwnProperty("incompatibilityMode"))
- object.incompatibilityMode = options.enums === String ? $root.google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode[message.incompatibilityMode] === undefined ? message.incompatibilityMode : $root.google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode[message.incompatibilityMode] : message.incompatibilityMode;
- return object;
- };
-
- /**
- * Converts this ShipmentTypeIncompatibility to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @instance
- * @returns {Object.} JSON object
- */
- ShipmentTypeIncompatibility.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for ShipmentTypeIncompatibility
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.ShipmentTypeIncompatibility
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- ShipmentTypeIncompatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.ShipmentTypeIncompatibility";
- };
-
- /**
- * IncompatibilityMode enum.
- * @name google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode
- * @enum {number}
- * @property {number} INCOMPATIBILITY_MODE_UNSPECIFIED=0 INCOMPATIBILITY_MODE_UNSPECIFIED value
- * @property {number} NOT_PERFORMED_BY_SAME_VEHICLE=1 NOT_PERFORMED_BY_SAME_VEHICLE value
- * @property {number} NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY=2 NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY value
- */
- ShipmentTypeIncompatibility.IncompatibilityMode = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "INCOMPATIBILITY_MODE_UNSPECIFIED"] = 0;
- values[valuesById[1] = "NOT_PERFORMED_BY_SAME_VEHICLE"] = 1;
- values[valuesById[2] = "NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY"] = 2;
- return values;
- })();
-
- return ShipmentTypeIncompatibility;
- })();
-
- v1.ShipmentTypeRequirement = (function() {
-
- /**
- * Properties of a ShipmentTypeRequirement.
- * @memberof google.cloud.optimization.v1
- * @interface IShipmentTypeRequirement
- * @property {Array.|null} [requiredShipmentTypeAlternatives] ShipmentTypeRequirement requiredShipmentTypeAlternatives
- * @property {Array.|null} [dependentShipmentTypes] ShipmentTypeRequirement dependentShipmentTypes
- * @property {google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode|null} [requirementMode] ShipmentTypeRequirement requirementMode
- */
-
- /**
- * Constructs a new ShipmentTypeRequirement.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a ShipmentTypeRequirement.
- * @implements IShipmentTypeRequirement
- * @constructor
- * @param {google.cloud.optimization.v1.IShipmentTypeRequirement=} [properties] Properties to set
- */
- function ShipmentTypeRequirement(properties) {
- this.requiredShipmentTypeAlternatives = [];
- this.dependentShipmentTypes = [];
- 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]];
- }
-
- /**
- * ShipmentTypeRequirement requiredShipmentTypeAlternatives.
- * @member {Array.} requiredShipmentTypeAlternatives
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @instance
- */
- ShipmentTypeRequirement.prototype.requiredShipmentTypeAlternatives = $util.emptyArray;
-
- /**
- * ShipmentTypeRequirement dependentShipmentTypes.
- * @member {Array.} dependentShipmentTypes
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @instance
- */
- ShipmentTypeRequirement.prototype.dependentShipmentTypes = $util.emptyArray;
-
- /**
- * ShipmentTypeRequirement requirementMode.
- * @member {google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode} requirementMode
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @instance
- */
- ShipmentTypeRequirement.prototype.requirementMode = 0;
-
- /**
- * Creates a new ShipmentTypeRequirement instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @static
- * @param {google.cloud.optimization.v1.IShipmentTypeRequirement=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.ShipmentTypeRequirement} ShipmentTypeRequirement instance
- */
- ShipmentTypeRequirement.create = function create(properties) {
- return new ShipmentTypeRequirement(properties);
- };
-
- /**
- * Encodes the specified ShipmentTypeRequirement message. Does not implicitly {@link google.cloud.optimization.v1.ShipmentTypeRequirement.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @static
- * @param {google.cloud.optimization.v1.IShipmentTypeRequirement} message ShipmentTypeRequirement message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ShipmentTypeRequirement.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.requiredShipmentTypeAlternatives != null && message.requiredShipmentTypeAlternatives.length)
- for (var i = 0; i < message.requiredShipmentTypeAlternatives.length; ++i)
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.requiredShipmentTypeAlternatives[i]);
- if (message.dependentShipmentTypes != null && message.dependentShipmentTypes.length)
- for (var i = 0; i < message.dependentShipmentTypes.length; ++i)
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.dependentShipmentTypes[i]);
- if (message.requirementMode != null && Object.hasOwnProperty.call(message, "requirementMode"))
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.requirementMode);
- return writer;
- };
-
- /**
- * Encodes the specified ShipmentTypeRequirement message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.ShipmentTypeRequirement.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @static
- * @param {google.cloud.optimization.v1.IShipmentTypeRequirement} message ShipmentTypeRequirement message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ShipmentTypeRequirement.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a ShipmentTypeRequirement message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.ShipmentTypeRequirement} ShipmentTypeRequirement
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ShipmentTypeRequirement.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.optimization.v1.ShipmentTypeRequirement();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (!(message.requiredShipmentTypeAlternatives && message.requiredShipmentTypeAlternatives.length))
- message.requiredShipmentTypeAlternatives = [];
- message.requiredShipmentTypeAlternatives.push(reader.string());
- break;
- }
- case 2: {
- if (!(message.dependentShipmentTypes && message.dependentShipmentTypes.length))
- message.dependentShipmentTypes = [];
- message.dependentShipmentTypes.push(reader.string());
- break;
- }
- case 3: {
- message.requirementMode = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a ShipmentTypeRequirement message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.ShipmentTypeRequirement} ShipmentTypeRequirement
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ShipmentTypeRequirement.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a ShipmentTypeRequirement message.
- * @function verify
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- ShipmentTypeRequirement.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.requiredShipmentTypeAlternatives != null && message.hasOwnProperty("requiredShipmentTypeAlternatives")) {
- if (!Array.isArray(message.requiredShipmentTypeAlternatives))
- return "requiredShipmentTypeAlternatives: array expected";
- for (var i = 0; i < message.requiredShipmentTypeAlternatives.length; ++i)
- if (!$util.isString(message.requiredShipmentTypeAlternatives[i]))
- return "requiredShipmentTypeAlternatives: string[] expected";
- }
- if (message.dependentShipmentTypes != null && message.hasOwnProperty("dependentShipmentTypes")) {
- if (!Array.isArray(message.dependentShipmentTypes))
- return "dependentShipmentTypes: array expected";
- for (var i = 0; i < message.dependentShipmentTypes.length; ++i)
- if (!$util.isString(message.dependentShipmentTypes[i]))
- return "dependentShipmentTypes: string[] expected";
- }
- if (message.requirementMode != null && message.hasOwnProperty("requirementMode"))
- switch (message.requirementMode) {
- default:
- return "requirementMode: enum value expected";
- case 0:
- case 1:
- case 2:
- case 3:
- break;
- }
- return null;
- };
-
- /**
- * Creates a ShipmentTypeRequirement message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.ShipmentTypeRequirement} ShipmentTypeRequirement
- */
- ShipmentTypeRequirement.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.ShipmentTypeRequirement)
- return object;
- var message = new $root.google.cloud.optimization.v1.ShipmentTypeRequirement();
- if (object.requiredShipmentTypeAlternatives) {
- if (!Array.isArray(object.requiredShipmentTypeAlternatives))
- throw TypeError(".google.cloud.optimization.v1.ShipmentTypeRequirement.requiredShipmentTypeAlternatives: array expected");
- message.requiredShipmentTypeAlternatives = [];
- for (var i = 0; i < object.requiredShipmentTypeAlternatives.length; ++i)
- message.requiredShipmentTypeAlternatives[i] = String(object.requiredShipmentTypeAlternatives[i]);
- }
- if (object.dependentShipmentTypes) {
- if (!Array.isArray(object.dependentShipmentTypes))
- throw TypeError(".google.cloud.optimization.v1.ShipmentTypeRequirement.dependentShipmentTypes: array expected");
- message.dependentShipmentTypes = [];
- for (var i = 0; i < object.dependentShipmentTypes.length; ++i)
- message.dependentShipmentTypes[i] = String(object.dependentShipmentTypes[i]);
- }
- switch (object.requirementMode) {
- default:
- if (typeof object.requirementMode === "number") {
- message.requirementMode = object.requirementMode;
- break;
- }
- break;
- case "REQUIREMENT_MODE_UNSPECIFIED":
- case 0:
- message.requirementMode = 0;
- break;
- case "PERFORMED_BY_SAME_VEHICLE":
- case 1:
- message.requirementMode = 1;
- break;
- case "IN_SAME_VEHICLE_AT_PICKUP_TIME":
- case 2:
- message.requirementMode = 2;
- break;
- case "IN_SAME_VEHICLE_AT_DELIVERY_TIME":
- case 3:
- message.requirementMode = 3;
- break;
- }
- return message;
- };
-
- /**
- * Creates a plain object from a ShipmentTypeRequirement message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @static
- * @param {google.cloud.optimization.v1.ShipmentTypeRequirement} message ShipmentTypeRequirement
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- ShipmentTypeRequirement.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.requiredShipmentTypeAlternatives = [];
- object.dependentShipmentTypes = [];
- }
- if (options.defaults)
- object.requirementMode = options.enums === String ? "REQUIREMENT_MODE_UNSPECIFIED" : 0;
- if (message.requiredShipmentTypeAlternatives && message.requiredShipmentTypeAlternatives.length) {
- object.requiredShipmentTypeAlternatives = [];
- for (var j = 0; j < message.requiredShipmentTypeAlternatives.length; ++j)
- object.requiredShipmentTypeAlternatives[j] = message.requiredShipmentTypeAlternatives[j];
- }
- if (message.dependentShipmentTypes && message.dependentShipmentTypes.length) {
- object.dependentShipmentTypes = [];
- for (var j = 0; j < message.dependentShipmentTypes.length; ++j)
- object.dependentShipmentTypes[j] = message.dependentShipmentTypes[j];
- }
- if (message.requirementMode != null && message.hasOwnProperty("requirementMode"))
- object.requirementMode = options.enums === String ? $root.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode[message.requirementMode] === undefined ? message.requirementMode : $root.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode[message.requirementMode] : message.requirementMode;
- return object;
- };
-
- /**
- * Converts this ShipmentTypeRequirement to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @instance
- * @returns {Object.} JSON object
- */
- ShipmentTypeRequirement.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for ShipmentTypeRequirement
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.ShipmentTypeRequirement
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- ShipmentTypeRequirement.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.ShipmentTypeRequirement";
- };
-
- /**
- * RequirementMode enum.
- * @name google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode
- * @enum {number}
- * @property {number} REQUIREMENT_MODE_UNSPECIFIED=0 REQUIREMENT_MODE_UNSPECIFIED value
- * @property {number} PERFORMED_BY_SAME_VEHICLE=1 PERFORMED_BY_SAME_VEHICLE value
- * @property {number} IN_SAME_VEHICLE_AT_PICKUP_TIME=2 IN_SAME_VEHICLE_AT_PICKUP_TIME value
- * @property {number} IN_SAME_VEHICLE_AT_DELIVERY_TIME=3 IN_SAME_VEHICLE_AT_DELIVERY_TIME value
- */
- ShipmentTypeRequirement.RequirementMode = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "REQUIREMENT_MODE_UNSPECIFIED"] = 0;
- values[valuesById[1] = "PERFORMED_BY_SAME_VEHICLE"] = 1;
- values[valuesById[2] = "IN_SAME_VEHICLE_AT_PICKUP_TIME"] = 2;
- values[valuesById[3] = "IN_SAME_VEHICLE_AT_DELIVERY_TIME"] = 3;
- return values;
- })();
-
- return ShipmentTypeRequirement;
- })();
-
- v1.RouteModifiers = (function() {
-
- /**
- * Properties of a RouteModifiers.
- * @memberof google.cloud.optimization.v1
- * @interface IRouteModifiers
- * @property {boolean|null} [avoidTolls] RouteModifiers avoidTolls
- * @property {boolean|null} [avoidHighways] RouteModifiers avoidHighways
- * @property {boolean|null} [avoidFerries] RouteModifiers avoidFerries
- * @property {boolean|null} [avoidIndoor] RouteModifiers avoidIndoor
- */
-
- /**
- * Constructs a new RouteModifiers.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a RouteModifiers.
- * @implements IRouteModifiers
- * @constructor
- * @param {google.cloud.optimization.v1.IRouteModifiers=} [properties] Properties to set
- */
- function RouteModifiers(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]];
- }
-
- /**
- * RouteModifiers avoidTolls.
- * @member {boolean} avoidTolls
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @instance
- */
- RouteModifiers.prototype.avoidTolls = false;
-
- /**
- * RouteModifiers avoidHighways.
- * @member {boolean} avoidHighways
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @instance
- */
- RouteModifiers.prototype.avoidHighways = false;
-
- /**
- * RouteModifiers avoidFerries.
- * @member {boolean} avoidFerries
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @instance
- */
- RouteModifiers.prototype.avoidFerries = false;
-
- /**
- * RouteModifiers avoidIndoor.
- * @member {boolean} avoidIndoor
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @instance
- */
- RouteModifiers.prototype.avoidIndoor = false;
-
- /**
- * Creates a new RouteModifiers instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @static
- * @param {google.cloud.optimization.v1.IRouteModifiers=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.RouteModifiers} RouteModifiers instance
- */
- RouteModifiers.create = function create(properties) {
- return new RouteModifiers(properties);
- };
-
- /**
- * Encodes the specified RouteModifiers message. Does not implicitly {@link google.cloud.optimization.v1.RouteModifiers.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @static
- * @param {google.cloud.optimization.v1.IRouteModifiers} message RouteModifiers message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- RouteModifiers.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.avoidTolls != null && Object.hasOwnProperty.call(message, "avoidTolls"))
- writer.uint32(/* id 2, wireType 0 =*/16).bool(message.avoidTolls);
- if (message.avoidHighways != null && Object.hasOwnProperty.call(message, "avoidHighways"))
- writer.uint32(/* id 3, wireType 0 =*/24).bool(message.avoidHighways);
- if (message.avoidFerries != null && Object.hasOwnProperty.call(message, "avoidFerries"))
- writer.uint32(/* id 4, wireType 0 =*/32).bool(message.avoidFerries);
- if (message.avoidIndoor != null && Object.hasOwnProperty.call(message, "avoidIndoor"))
- writer.uint32(/* id 5, wireType 0 =*/40).bool(message.avoidIndoor);
- return writer;
- };
-
- /**
- * Encodes the specified RouteModifiers message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.RouteModifiers.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @static
- * @param {google.cloud.optimization.v1.IRouteModifiers} message RouteModifiers message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- RouteModifiers.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a RouteModifiers message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.RouteModifiers} RouteModifiers
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- RouteModifiers.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.optimization.v1.RouteModifiers();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 2: {
- message.avoidTolls = reader.bool();
- break;
- }
- case 3: {
- message.avoidHighways = reader.bool();
- break;
- }
- case 4: {
- message.avoidFerries = reader.bool();
- break;
- }
- case 5: {
- message.avoidIndoor = reader.bool();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a RouteModifiers message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.RouteModifiers} RouteModifiers
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- RouteModifiers.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a RouteModifiers message.
- * @function verify
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- RouteModifiers.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.avoidTolls != null && message.hasOwnProperty("avoidTolls"))
- if (typeof message.avoidTolls !== "boolean")
- return "avoidTolls: boolean expected";
- if (message.avoidHighways != null && message.hasOwnProperty("avoidHighways"))
- if (typeof message.avoidHighways !== "boolean")
- return "avoidHighways: boolean expected";
- if (message.avoidFerries != null && message.hasOwnProperty("avoidFerries"))
- if (typeof message.avoidFerries !== "boolean")
- return "avoidFerries: boolean expected";
- if (message.avoidIndoor != null && message.hasOwnProperty("avoidIndoor"))
- if (typeof message.avoidIndoor !== "boolean")
- return "avoidIndoor: boolean expected";
- return null;
- };
-
- /**
- * Creates a RouteModifiers message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.RouteModifiers} RouteModifiers
- */
- RouteModifiers.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.RouteModifiers)
- return object;
- var message = new $root.google.cloud.optimization.v1.RouteModifiers();
- if (object.avoidTolls != null)
- message.avoidTolls = Boolean(object.avoidTolls);
- if (object.avoidHighways != null)
- message.avoidHighways = Boolean(object.avoidHighways);
- if (object.avoidFerries != null)
- message.avoidFerries = Boolean(object.avoidFerries);
- if (object.avoidIndoor != null)
- message.avoidIndoor = Boolean(object.avoidIndoor);
- return message;
- };
-
- /**
- * Creates a plain object from a RouteModifiers message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @static
- * @param {google.cloud.optimization.v1.RouteModifiers} message RouteModifiers
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- RouteModifiers.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.avoidTolls = false;
- object.avoidHighways = false;
- object.avoidFerries = false;
- object.avoidIndoor = false;
- }
- if (message.avoidTolls != null && message.hasOwnProperty("avoidTolls"))
- object.avoidTolls = message.avoidTolls;
- if (message.avoidHighways != null && message.hasOwnProperty("avoidHighways"))
- object.avoidHighways = message.avoidHighways;
- if (message.avoidFerries != null && message.hasOwnProperty("avoidFerries"))
- object.avoidFerries = message.avoidFerries;
- if (message.avoidIndoor != null && message.hasOwnProperty("avoidIndoor"))
- object.avoidIndoor = message.avoidIndoor;
- return object;
- };
-
- /**
- * Converts this RouteModifiers to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @instance
- * @returns {Object.} JSON object
- */
- RouteModifiers.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for RouteModifiers
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.RouteModifiers
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- RouteModifiers.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.RouteModifiers";
- };
-
- return RouteModifiers;
- })();
-
- v1.Vehicle = (function() {
-
- /**
- * Properties of a Vehicle.
- * @memberof google.cloud.optimization.v1
- * @interface IVehicle
- * @property {google.cloud.optimization.v1.Vehicle.TravelMode|null} [travelMode] Vehicle travelMode
- * @property {google.cloud.optimization.v1.IRouteModifiers|null} [routeModifiers] Vehicle routeModifiers
- * @property {google.type.ILatLng|null} [startLocation] Vehicle startLocation
- * @property {google.cloud.optimization.v1.IWaypoint|null} [startWaypoint] Vehicle startWaypoint
- * @property {google.type.ILatLng|null} [endLocation] Vehicle endLocation
- * @property {google.cloud.optimization.v1.IWaypoint|null} [endWaypoint] Vehicle endWaypoint
- * @property {Array.|null} [startTags] Vehicle startTags
- * @property {Array.|null} [endTags] Vehicle endTags
- * @property {Array.|null} [startTimeWindows] Vehicle startTimeWindows
- * @property {Array.|null} [endTimeWindows] Vehicle endTimeWindows
- * @property {number|null} [travelDurationMultiple] Vehicle travelDurationMultiple
- * @property {google.cloud.optimization.v1.Vehicle.UnloadingPolicy|null} [unloadingPolicy] Vehicle unloadingPolicy
- * @property {Object.|null} [loadLimits] Vehicle loadLimits
- * @property {number|null} [costPerHour] Vehicle costPerHour
- * @property {number|null} [costPerTraveledHour] Vehicle costPerTraveledHour
- * @property {number|null} [costPerKilometer] Vehicle costPerKilometer
- * @property {number|null} [fixedCost] Vehicle fixedCost
- * @property {boolean|null} [usedIfRouteIsEmpty] Vehicle usedIfRouteIsEmpty
- * @property {google.cloud.optimization.v1.Vehicle.IDurationLimit|null} [routeDurationLimit] Vehicle routeDurationLimit
- * @property {google.cloud.optimization.v1.Vehicle.IDurationLimit|null} [travelDurationLimit] Vehicle travelDurationLimit
- * @property {google.cloud.optimization.v1.IDistanceLimit|null} [routeDistanceLimit] Vehicle routeDistanceLimit
- * @property {Object.|null} [extraVisitDurationForVisitType] Vehicle extraVisitDurationForVisitType
- * @property {google.cloud.optimization.v1.IBreakRule|null} [breakRule] Vehicle breakRule
- * @property {string|null} [label] Vehicle label
- * @property {boolean|null} [ignore] Vehicle ignore
- * @property {Array.|null} [breakRuleIndices] Vehicle breakRuleIndices
- * @property {Array.|null} [capacities] Vehicle capacities
- * @property {Array.|null} [startLoadIntervals] Vehicle startLoadIntervals
- * @property {Array.|null} [endLoadIntervals] Vehicle endLoadIntervals
- */
-
- /**
- * Constructs a new Vehicle.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a Vehicle.
- * @implements IVehicle
- * @constructor
- * @param {google.cloud.optimization.v1.IVehicle=} [properties] Properties to set
- */
- function Vehicle(properties) {
- this.startTags = [];
- this.endTags = [];
- this.startTimeWindows = [];
- this.endTimeWindows = [];
- this.loadLimits = {};
- this.extraVisitDurationForVisitType = {};
- this.breakRuleIndices = [];
- this.capacities = [];
- this.startLoadIntervals = [];
- this.endLoadIntervals = [];
- 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]];
- }
-
- /**
- * Vehicle travelMode.
- * @member {google.cloud.optimization.v1.Vehicle.TravelMode} travelMode
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.travelMode = 0;
-
- /**
- * Vehicle routeModifiers.
- * @member {google.cloud.optimization.v1.IRouteModifiers|null|undefined} routeModifiers
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.routeModifiers = null;
-
- /**
- * Vehicle startLocation.
- * @member {google.type.ILatLng|null|undefined} startLocation
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.startLocation = null;
-
- /**
- * Vehicle startWaypoint.
- * @member {google.cloud.optimization.v1.IWaypoint|null|undefined} startWaypoint
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.startWaypoint = null;
-
- /**
- * Vehicle endLocation.
- * @member {google.type.ILatLng|null|undefined} endLocation
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.endLocation = null;
-
- /**
- * Vehicle endWaypoint.
- * @member {google.cloud.optimization.v1.IWaypoint|null|undefined} endWaypoint
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.endWaypoint = null;
-
- /**
- * Vehicle startTags.
- * @member {Array.} startTags
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.startTags = $util.emptyArray;
-
- /**
- * Vehicle endTags.
- * @member {Array.} endTags
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.endTags = $util.emptyArray;
-
- /**
- * Vehicle startTimeWindows.
- * @member {Array.} startTimeWindows
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.startTimeWindows = $util.emptyArray;
-
- /**
- * Vehicle endTimeWindows.
- * @member {Array.} endTimeWindows
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.endTimeWindows = $util.emptyArray;
-
- /**
- * Vehicle travelDurationMultiple.
- * @member {number|null|undefined} travelDurationMultiple
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.travelDurationMultiple = null;
-
- /**
- * Vehicle unloadingPolicy.
- * @member {google.cloud.optimization.v1.Vehicle.UnloadingPolicy} unloadingPolicy
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.unloadingPolicy = 0;
-
- /**
- * Vehicle loadLimits.
- * @member {Object.} loadLimits
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.loadLimits = $util.emptyObject;
-
- /**
- * Vehicle costPerHour.
- * @member {number} costPerHour
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.costPerHour = 0;
-
- /**
- * Vehicle costPerTraveledHour.
- * @member {number} costPerTraveledHour
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.costPerTraveledHour = 0;
-
- /**
- * Vehicle costPerKilometer.
- * @member {number} costPerKilometer
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.costPerKilometer = 0;
-
- /**
- * Vehicle fixedCost.
- * @member {number} fixedCost
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.fixedCost = 0;
-
- /**
- * Vehicle usedIfRouteIsEmpty.
- * @member {boolean} usedIfRouteIsEmpty
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.usedIfRouteIsEmpty = false;
-
- /**
- * Vehicle routeDurationLimit.
- * @member {google.cloud.optimization.v1.Vehicle.IDurationLimit|null|undefined} routeDurationLimit
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.routeDurationLimit = null;
-
- /**
- * Vehicle travelDurationLimit.
- * @member {google.cloud.optimization.v1.Vehicle.IDurationLimit|null|undefined} travelDurationLimit
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.travelDurationLimit = null;
-
- /**
- * Vehicle routeDistanceLimit.
- * @member {google.cloud.optimization.v1.IDistanceLimit|null|undefined} routeDistanceLimit
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.routeDistanceLimit = null;
-
- /**
- * Vehicle extraVisitDurationForVisitType.
- * @member {Object.} extraVisitDurationForVisitType
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.extraVisitDurationForVisitType = $util.emptyObject;
-
- /**
- * Vehicle breakRule.
- * @member {google.cloud.optimization.v1.IBreakRule|null|undefined} breakRule
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.breakRule = null;
-
- /**
- * Vehicle label.
- * @member {string} label
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.label = "";
-
- /**
- * Vehicle ignore.
- * @member {boolean} ignore
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.ignore = false;
-
- /**
- * Vehicle breakRuleIndices.
- * @member {Array.} breakRuleIndices
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.breakRuleIndices = $util.emptyArray;
-
- /**
- * Vehicle capacities.
- * @member {Array.} capacities
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.capacities = $util.emptyArray;
-
- /**
- * Vehicle startLoadIntervals.
- * @member {Array.} startLoadIntervals
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.startLoadIntervals = $util.emptyArray;
-
- /**
- * Vehicle endLoadIntervals.
- * @member {Array.} endLoadIntervals
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Vehicle.prototype.endLoadIntervals = $util.emptyArray;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * Vehicle _travelDurationMultiple.
- * @member {"travelDurationMultiple"|undefined} _travelDurationMultiple
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- */
- Object.defineProperty(Vehicle.prototype, "_travelDurationMultiple", {
- get: $util.oneOfGetter($oneOfFields = ["travelDurationMultiple"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new Vehicle instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.Vehicle
- * @static
- * @param {google.cloud.optimization.v1.IVehicle=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.Vehicle} Vehicle instance
- */
- Vehicle.create = function create(properties) {
- return new Vehicle(properties);
- };
-
- /**
- * Encodes the specified Vehicle message. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.Vehicle
- * @static
- * @param {google.cloud.optimization.v1.IVehicle} message Vehicle message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Vehicle.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.travelMode != null && Object.hasOwnProperty.call(message, "travelMode"))
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.travelMode);
- if (message.routeModifiers != null && Object.hasOwnProperty.call(message, "routeModifiers"))
- $root.google.cloud.optimization.v1.RouteModifiers.encode(message.routeModifiers, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.startLocation != null && Object.hasOwnProperty.call(message, "startLocation"))
- $root.google.type.LatLng.encode(message.startLocation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.startWaypoint != null && Object.hasOwnProperty.call(message, "startWaypoint"))
- $root.google.cloud.optimization.v1.Waypoint.encode(message.startWaypoint, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.endLocation != null && Object.hasOwnProperty.call(message, "endLocation"))
- $root.google.type.LatLng.encode(message.endLocation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- if (message.endWaypoint != null && Object.hasOwnProperty.call(message, "endWaypoint"))
- $root.google.cloud.optimization.v1.Waypoint.encode(message.endWaypoint, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
- if (message.startTags != null && message.startTags.length)
- for (var i = 0; i < message.startTags.length; ++i)
- writer.uint32(/* id 7, wireType 2 =*/58).string(message.startTags[i]);
- if (message.endTags != null && message.endTags.length)
- for (var i = 0; i < message.endTags.length; ++i)
- writer.uint32(/* id 8, wireType 2 =*/66).string(message.endTags[i]);
- if (message.startTimeWindows != null && message.startTimeWindows.length)
- for (var i = 0; i < message.startTimeWindows.length; ++i)
- $root.google.cloud.optimization.v1.TimeWindow.encode(message.startTimeWindows[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
- if (message.endTimeWindows != null && message.endTimeWindows.length)
- for (var i = 0; i < message.endTimeWindows.length; ++i)
- $root.google.cloud.optimization.v1.TimeWindow.encode(message.endTimeWindows[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
- if (message.travelDurationMultiple != null && Object.hasOwnProperty.call(message, "travelDurationMultiple"))
- writer.uint32(/* id 11, wireType 1 =*/89).double(message.travelDurationMultiple);
- if (message.unloadingPolicy != null && Object.hasOwnProperty.call(message, "unloadingPolicy"))
- writer.uint32(/* id 12, wireType 0 =*/96).int32(message.unloadingPolicy);
- if (message.capacities != null && message.capacities.length)
- for (var i = 0; i < message.capacities.length; ++i)
- $root.google.cloud.optimization.v1.CapacityQuantity.encode(message.capacities[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
- if (message.startLoadIntervals != null && message.startLoadIntervals.length)
- for (var i = 0; i < message.startLoadIntervals.length; ++i)
- $root.google.cloud.optimization.v1.CapacityQuantityInterval.encode(message.startLoadIntervals[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
- if (message.endLoadIntervals != null && message.endLoadIntervals.length)
- for (var i = 0; i < message.endLoadIntervals.length; ++i)
- $root.google.cloud.optimization.v1.CapacityQuantityInterval.encode(message.endLoadIntervals[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
- if (message.costPerHour != null && Object.hasOwnProperty.call(message, "costPerHour"))
- writer.uint32(/* id 16, wireType 1 =*/129).double(message.costPerHour);
- if (message.costPerTraveledHour != null && Object.hasOwnProperty.call(message, "costPerTraveledHour"))
- writer.uint32(/* id 17, wireType 1 =*/137).double(message.costPerTraveledHour);
- if (message.costPerKilometer != null && Object.hasOwnProperty.call(message, "costPerKilometer"))
- writer.uint32(/* id 18, wireType 1 =*/145).double(message.costPerKilometer);
- if (message.fixedCost != null && Object.hasOwnProperty.call(message, "fixedCost"))
- writer.uint32(/* id 19, wireType 1 =*/153).double(message.fixedCost);
- if (message.usedIfRouteIsEmpty != null && Object.hasOwnProperty.call(message, "usedIfRouteIsEmpty"))
- writer.uint32(/* id 20, wireType 0 =*/160).bool(message.usedIfRouteIsEmpty);
- if (message.routeDurationLimit != null && Object.hasOwnProperty.call(message, "routeDurationLimit"))
- $root.google.cloud.optimization.v1.Vehicle.DurationLimit.encode(message.routeDurationLimit, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
- if (message.travelDurationLimit != null && Object.hasOwnProperty.call(message, "travelDurationLimit"))
- $root.google.cloud.optimization.v1.Vehicle.DurationLimit.encode(message.travelDurationLimit, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
- if (message.routeDistanceLimit != null && Object.hasOwnProperty.call(message, "routeDistanceLimit"))
- $root.google.cloud.optimization.v1.DistanceLimit.encode(message.routeDistanceLimit, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
- if (message.extraVisitDurationForVisitType != null && Object.hasOwnProperty.call(message, "extraVisitDurationForVisitType"))
- for (var keys = Object.keys(message.extraVisitDurationForVisitType), i = 0; i < keys.length; ++i) {
- writer.uint32(/* id 24, wireType 2 =*/194).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
- $root.google.protobuf.Duration.encode(message.extraVisitDurationForVisitType[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
- }
- if (message.breakRule != null && Object.hasOwnProperty.call(message, "breakRule"))
- $root.google.cloud.optimization.v1.BreakRule.encode(message.breakRule, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
- if (message.label != null && Object.hasOwnProperty.call(message, "label"))
- writer.uint32(/* id 27, wireType 2 =*/218).string(message.label);
- if (message.ignore != null && Object.hasOwnProperty.call(message, "ignore"))
- writer.uint32(/* id 28, wireType 0 =*/224).bool(message.ignore);
- if (message.breakRuleIndices != null && message.breakRuleIndices.length) {
- writer.uint32(/* id 29, wireType 2 =*/234).fork();
- for (var i = 0; i < message.breakRuleIndices.length; ++i)
- writer.int32(message.breakRuleIndices[i]);
- writer.ldelim();
- }
- if (message.loadLimits != null && Object.hasOwnProperty.call(message, "loadLimits"))
- for (var keys = Object.keys(message.loadLimits), i = 0; i < keys.length; ++i) {
- writer.uint32(/* id 30, wireType 2 =*/242).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
- $root.google.cloud.optimization.v1.Vehicle.LoadLimit.encode(message.loadLimits[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
- }
- return writer;
- };
-
- /**
- * Encodes the specified Vehicle message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.Vehicle
- * @static
- * @param {google.cloud.optimization.v1.IVehicle} message Vehicle message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Vehicle.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a Vehicle message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.Vehicle
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.Vehicle} Vehicle
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Vehicle.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.optimization.v1.Vehicle(), key, value;
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.travelMode = reader.int32();
- break;
- }
- case 2: {
- message.routeModifiers = $root.google.cloud.optimization.v1.RouteModifiers.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.startLocation = $root.google.type.LatLng.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- message.startWaypoint = $root.google.cloud.optimization.v1.Waypoint.decode(reader, reader.uint32());
- break;
- }
- case 5: {
- message.endLocation = $root.google.type.LatLng.decode(reader, reader.uint32());
- break;
- }
- case 6: {
- message.endWaypoint = $root.google.cloud.optimization.v1.Waypoint.decode(reader, reader.uint32());
- break;
- }
- case 7: {
- if (!(message.startTags && message.startTags.length))
- message.startTags = [];
- message.startTags.push(reader.string());
- break;
- }
- case 8: {
- if (!(message.endTags && message.endTags.length))
- message.endTags = [];
- message.endTags.push(reader.string());
- break;
- }
- case 9: {
- if (!(message.startTimeWindows && message.startTimeWindows.length))
- message.startTimeWindows = [];
- message.startTimeWindows.push($root.google.cloud.optimization.v1.TimeWindow.decode(reader, reader.uint32()));
- break;
- }
- case 10: {
- if (!(message.endTimeWindows && message.endTimeWindows.length))
- message.endTimeWindows = [];
- message.endTimeWindows.push($root.google.cloud.optimization.v1.TimeWindow.decode(reader, reader.uint32()));
- break;
- }
- case 11: {
- message.travelDurationMultiple = reader.double();
- break;
- }
- case 12: {
- message.unloadingPolicy = reader.int32();
- break;
- }
- case 30: {
- if (message.loadLimits === $util.emptyObject)
- message.loadLimits = {};
- 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.optimization.v1.Vehicle.LoadLimit.decode(reader, reader.uint32());
- break;
- default:
- reader.skipType(tag2 & 7);
- break;
- }
- }
- message.loadLimits[key] = value;
- break;
- }
- case 16: {
- message.costPerHour = reader.double();
- break;
- }
- case 17: {
- message.costPerTraveledHour = reader.double();
- break;
- }
- case 18: {
- message.costPerKilometer = reader.double();
- break;
- }
- case 19: {
- message.fixedCost = reader.double();
- break;
- }
- case 20: {
- message.usedIfRouteIsEmpty = reader.bool();
- break;
- }
- case 21: {
- message.routeDurationLimit = $root.google.cloud.optimization.v1.Vehicle.DurationLimit.decode(reader, reader.uint32());
- break;
- }
- case 22: {
- message.travelDurationLimit = $root.google.cloud.optimization.v1.Vehicle.DurationLimit.decode(reader, reader.uint32());
- break;
- }
- case 23: {
- message.routeDistanceLimit = $root.google.cloud.optimization.v1.DistanceLimit.decode(reader, reader.uint32());
- break;
- }
- case 24: {
- if (message.extraVisitDurationForVisitType === $util.emptyObject)
- message.extraVisitDurationForVisitType = {};
- 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.Duration.decode(reader, reader.uint32());
- break;
- default:
- reader.skipType(tag2 & 7);
- break;
- }
- }
- message.extraVisitDurationForVisitType[key] = value;
- break;
- }
- case 25: {
- message.breakRule = $root.google.cloud.optimization.v1.BreakRule.decode(reader, reader.uint32());
- break;
- }
- case 27: {
- message.label = reader.string();
- break;
- }
- case 28: {
- message.ignore = reader.bool();
- break;
- }
- case 29: {
- if (!(message.breakRuleIndices && message.breakRuleIndices.length))
- message.breakRuleIndices = [];
- if ((tag & 7) === 2) {
- var end2 = reader.uint32() + reader.pos;
- while (reader.pos < end2)
- message.breakRuleIndices.push(reader.int32());
- } else
- message.breakRuleIndices.push(reader.int32());
- break;
- }
- case 13: {
- if (!(message.capacities && message.capacities.length))
- message.capacities = [];
- message.capacities.push($root.google.cloud.optimization.v1.CapacityQuantity.decode(reader, reader.uint32()));
- break;
- }
- case 14: {
- if (!(message.startLoadIntervals && message.startLoadIntervals.length))
- message.startLoadIntervals = [];
- message.startLoadIntervals.push($root.google.cloud.optimization.v1.CapacityQuantityInterval.decode(reader, reader.uint32()));
- break;
- }
- case 15: {
- if (!(message.endLoadIntervals && message.endLoadIntervals.length))
- message.endLoadIntervals = [];
- message.endLoadIntervals.push($root.google.cloud.optimization.v1.CapacityQuantityInterval.decode(reader, reader.uint32()));
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a Vehicle message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.Vehicle
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.Vehicle} Vehicle
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Vehicle.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a Vehicle message.
- * @function verify
- * @memberof google.cloud.optimization.v1.Vehicle
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Vehicle.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.travelMode != null && message.hasOwnProperty("travelMode"))
- switch (message.travelMode) {
- default:
- return "travelMode: enum value expected";
- case 0:
- case 1:
- case 2:
- break;
- }
- if (message.routeModifiers != null && message.hasOwnProperty("routeModifiers")) {
- var error = $root.google.cloud.optimization.v1.RouteModifiers.verify(message.routeModifiers);
- if (error)
- return "routeModifiers." + error;
- }
- if (message.startLocation != null && message.hasOwnProperty("startLocation")) {
- var error = $root.google.type.LatLng.verify(message.startLocation);
- if (error)
- return "startLocation." + error;
- }
- if (message.startWaypoint != null && message.hasOwnProperty("startWaypoint")) {
- var error = $root.google.cloud.optimization.v1.Waypoint.verify(message.startWaypoint);
- if (error)
- return "startWaypoint." + error;
- }
- if (message.endLocation != null && message.hasOwnProperty("endLocation")) {
- var error = $root.google.type.LatLng.verify(message.endLocation);
- if (error)
- return "endLocation." + error;
- }
- if (message.endWaypoint != null && message.hasOwnProperty("endWaypoint")) {
- var error = $root.google.cloud.optimization.v1.Waypoint.verify(message.endWaypoint);
- if (error)
- return "endWaypoint." + error;
- }
- if (message.startTags != null && message.hasOwnProperty("startTags")) {
- if (!Array.isArray(message.startTags))
- return "startTags: array expected";
- for (var i = 0; i < message.startTags.length; ++i)
- if (!$util.isString(message.startTags[i]))
- return "startTags: string[] expected";
- }
- if (message.endTags != null && message.hasOwnProperty("endTags")) {
- if (!Array.isArray(message.endTags))
- return "endTags: array expected";
- for (var i = 0; i < message.endTags.length; ++i)
- if (!$util.isString(message.endTags[i]))
- return "endTags: string[] expected";
- }
- if (message.startTimeWindows != null && message.hasOwnProperty("startTimeWindows")) {
- if (!Array.isArray(message.startTimeWindows))
- return "startTimeWindows: array expected";
- for (var i = 0; i < message.startTimeWindows.length; ++i) {
- var error = $root.google.cloud.optimization.v1.TimeWindow.verify(message.startTimeWindows[i]);
- if (error)
- return "startTimeWindows." + error;
- }
- }
- if (message.endTimeWindows != null && message.hasOwnProperty("endTimeWindows")) {
- if (!Array.isArray(message.endTimeWindows))
- return "endTimeWindows: array expected";
- for (var i = 0; i < message.endTimeWindows.length; ++i) {
- var error = $root.google.cloud.optimization.v1.TimeWindow.verify(message.endTimeWindows[i]);
- if (error)
- return "endTimeWindows." + error;
- }
- }
- if (message.travelDurationMultiple != null && message.hasOwnProperty("travelDurationMultiple")) {
- properties._travelDurationMultiple = 1;
- if (typeof message.travelDurationMultiple !== "number")
- return "travelDurationMultiple: number expected";
- }
- if (message.unloadingPolicy != null && message.hasOwnProperty("unloadingPolicy"))
- switch (message.unloadingPolicy) {
- default:
- return "unloadingPolicy: enum value expected";
- case 0:
- case 1:
- case 2:
- break;
- }
- if (message.loadLimits != null && message.hasOwnProperty("loadLimits")) {
- if (!$util.isObject(message.loadLimits))
- return "loadLimits: object expected";
- var key = Object.keys(message.loadLimits);
- for (var i = 0; i < key.length; ++i) {
- var error = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.verify(message.loadLimits[key[i]]);
- if (error)
- return "loadLimits." + error;
- }
- }
- if (message.costPerHour != null && message.hasOwnProperty("costPerHour"))
- if (typeof message.costPerHour !== "number")
- return "costPerHour: number expected";
- if (message.costPerTraveledHour != null && message.hasOwnProperty("costPerTraveledHour"))
- if (typeof message.costPerTraveledHour !== "number")
- return "costPerTraveledHour: number expected";
- if (message.costPerKilometer != null && message.hasOwnProperty("costPerKilometer"))
- if (typeof message.costPerKilometer !== "number")
- return "costPerKilometer: number expected";
- if (message.fixedCost != null && message.hasOwnProperty("fixedCost"))
- if (typeof message.fixedCost !== "number")
- return "fixedCost: number expected";
- if (message.usedIfRouteIsEmpty != null && message.hasOwnProperty("usedIfRouteIsEmpty"))
- if (typeof message.usedIfRouteIsEmpty !== "boolean")
- return "usedIfRouteIsEmpty: boolean expected";
- if (message.routeDurationLimit != null && message.hasOwnProperty("routeDurationLimit")) {
- var error = $root.google.cloud.optimization.v1.Vehicle.DurationLimit.verify(message.routeDurationLimit);
- if (error)
- return "routeDurationLimit." + error;
- }
- if (message.travelDurationLimit != null && message.hasOwnProperty("travelDurationLimit")) {
- var error = $root.google.cloud.optimization.v1.Vehicle.DurationLimit.verify(message.travelDurationLimit);
- if (error)
- return "travelDurationLimit." + error;
- }
- if (message.routeDistanceLimit != null && message.hasOwnProperty("routeDistanceLimit")) {
- var error = $root.google.cloud.optimization.v1.DistanceLimit.verify(message.routeDistanceLimit);
- if (error)
- return "routeDistanceLimit." + error;
- }
- if (message.extraVisitDurationForVisitType != null && message.hasOwnProperty("extraVisitDurationForVisitType")) {
- if (!$util.isObject(message.extraVisitDurationForVisitType))
- return "extraVisitDurationForVisitType: object expected";
- var key = Object.keys(message.extraVisitDurationForVisitType);
- for (var i = 0; i < key.length; ++i) {
- var error = $root.google.protobuf.Duration.verify(message.extraVisitDurationForVisitType[key[i]]);
- if (error)
- return "extraVisitDurationForVisitType." + error;
- }
- }
- if (message.breakRule != null && message.hasOwnProperty("breakRule")) {
- var error = $root.google.cloud.optimization.v1.BreakRule.verify(message.breakRule);
- if (error)
- return "breakRule." + error;
- }
- if (message.label != null && message.hasOwnProperty("label"))
- if (!$util.isString(message.label))
- return "label: string expected";
- if (message.ignore != null && message.hasOwnProperty("ignore"))
- if (typeof message.ignore !== "boolean")
- return "ignore: boolean expected";
- if (message.breakRuleIndices != null && message.hasOwnProperty("breakRuleIndices")) {
- if (!Array.isArray(message.breakRuleIndices))
- return "breakRuleIndices: array expected";
- for (var i = 0; i < message.breakRuleIndices.length; ++i)
- if (!$util.isInteger(message.breakRuleIndices[i]))
- return "breakRuleIndices: integer[] expected";
- }
- if (message.capacities != null && message.hasOwnProperty("capacities")) {
- if (!Array.isArray(message.capacities))
- return "capacities: array expected";
- for (var i = 0; i < message.capacities.length; ++i) {
- var error = $root.google.cloud.optimization.v1.CapacityQuantity.verify(message.capacities[i]);
- if (error)
- return "capacities." + error;
- }
- }
- if (message.startLoadIntervals != null && message.hasOwnProperty("startLoadIntervals")) {
- if (!Array.isArray(message.startLoadIntervals))
- return "startLoadIntervals: array expected";
- for (var i = 0; i < message.startLoadIntervals.length; ++i) {
- var error = $root.google.cloud.optimization.v1.CapacityQuantityInterval.verify(message.startLoadIntervals[i]);
- if (error)
- return "startLoadIntervals." + error;
- }
- }
- if (message.endLoadIntervals != null && message.hasOwnProperty("endLoadIntervals")) {
- if (!Array.isArray(message.endLoadIntervals))
- return "endLoadIntervals: array expected";
- for (var i = 0; i < message.endLoadIntervals.length; ++i) {
- var error = $root.google.cloud.optimization.v1.CapacityQuantityInterval.verify(message.endLoadIntervals[i]);
- if (error)
- return "endLoadIntervals." + error;
- }
- }
- return null;
- };
-
- /**
- * Creates a Vehicle message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.Vehicle
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.Vehicle} Vehicle
- */
- Vehicle.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.Vehicle)
- return object;
- var message = new $root.google.cloud.optimization.v1.Vehicle();
- switch (object.travelMode) {
- default:
- if (typeof object.travelMode === "number") {
- message.travelMode = object.travelMode;
- break;
- }
- break;
- case "TRAVEL_MODE_UNSPECIFIED":
- case 0:
- message.travelMode = 0;
- break;
- case "DRIVING":
- case 1:
- message.travelMode = 1;
- break;
- case "WALKING":
- case 2:
- message.travelMode = 2;
- break;
- }
- if (object.routeModifiers != null) {
- if (typeof object.routeModifiers !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.routeModifiers: object expected");
- message.routeModifiers = $root.google.cloud.optimization.v1.RouteModifiers.fromObject(object.routeModifiers);
- }
- if (object.startLocation != null) {
- if (typeof object.startLocation !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.startLocation: object expected");
- message.startLocation = $root.google.type.LatLng.fromObject(object.startLocation);
- }
- if (object.startWaypoint != null) {
- if (typeof object.startWaypoint !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.startWaypoint: object expected");
- message.startWaypoint = $root.google.cloud.optimization.v1.Waypoint.fromObject(object.startWaypoint);
- }
- if (object.endLocation != null) {
- if (typeof object.endLocation !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.endLocation: object expected");
- message.endLocation = $root.google.type.LatLng.fromObject(object.endLocation);
- }
- if (object.endWaypoint != null) {
- if (typeof object.endWaypoint !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.endWaypoint: object expected");
- message.endWaypoint = $root.google.cloud.optimization.v1.Waypoint.fromObject(object.endWaypoint);
- }
- if (object.startTags) {
- if (!Array.isArray(object.startTags))
- throw TypeError(".google.cloud.optimization.v1.Vehicle.startTags: array expected");
- message.startTags = [];
- for (var i = 0; i < object.startTags.length; ++i)
- message.startTags[i] = String(object.startTags[i]);
- }
- if (object.endTags) {
- if (!Array.isArray(object.endTags))
- throw TypeError(".google.cloud.optimization.v1.Vehicle.endTags: array expected");
- message.endTags = [];
- for (var i = 0; i < object.endTags.length; ++i)
- message.endTags[i] = String(object.endTags[i]);
- }
- if (object.startTimeWindows) {
- if (!Array.isArray(object.startTimeWindows))
- throw TypeError(".google.cloud.optimization.v1.Vehicle.startTimeWindows: array expected");
- message.startTimeWindows = [];
- for (var i = 0; i < object.startTimeWindows.length; ++i) {
- if (typeof object.startTimeWindows[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.startTimeWindows: object expected");
- message.startTimeWindows[i] = $root.google.cloud.optimization.v1.TimeWindow.fromObject(object.startTimeWindows[i]);
- }
- }
- if (object.endTimeWindows) {
- if (!Array.isArray(object.endTimeWindows))
- throw TypeError(".google.cloud.optimization.v1.Vehicle.endTimeWindows: array expected");
- message.endTimeWindows = [];
- for (var i = 0; i < object.endTimeWindows.length; ++i) {
- if (typeof object.endTimeWindows[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.endTimeWindows: object expected");
- message.endTimeWindows[i] = $root.google.cloud.optimization.v1.TimeWindow.fromObject(object.endTimeWindows[i]);
- }
- }
- if (object.travelDurationMultiple != null)
- message.travelDurationMultiple = Number(object.travelDurationMultiple);
- switch (object.unloadingPolicy) {
- default:
- if (typeof object.unloadingPolicy === "number") {
- message.unloadingPolicy = object.unloadingPolicy;
- break;
- }
- break;
- case "UNLOADING_POLICY_UNSPECIFIED":
- case 0:
- message.unloadingPolicy = 0;
- break;
- case "LAST_IN_FIRST_OUT":
- case 1:
- message.unloadingPolicy = 1;
- break;
- case "FIRST_IN_FIRST_OUT":
- case 2:
- message.unloadingPolicy = 2;
- break;
- }
- if (object.loadLimits) {
- if (typeof object.loadLimits !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.loadLimits: object expected");
- message.loadLimits = {};
- for (var keys = Object.keys(object.loadLimits), i = 0; i < keys.length; ++i) {
- if (typeof object.loadLimits[keys[i]] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.loadLimits: object expected");
- message.loadLimits[keys[i]] = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.fromObject(object.loadLimits[keys[i]]);
- }
- }
- if (object.costPerHour != null)
- message.costPerHour = Number(object.costPerHour);
- if (object.costPerTraveledHour != null)
- message.costPerTraveledHour = Number(object.costPerTraveledHour);
- if (object.costPerKilometer != null)
- message.costPerKilometer = Number(object.costPerKilometer);
- if (object.fixedCost != null)
- message.fixedCost = Number(object.fixedCost);
- if (object.usedIfRouteIsEmpty != null)
- message.usedIfRouteIsEmpty = Boolean(object.usedIfRouteIsEmpty);
- if (object.routeDurationLimit != null) {
- if (typeof object.routeDurationLimit !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.routeDurationLimit: object expected");
- message.routeDurationLimit = $root.google.cloud.optimization.v1.Vehicle.DurationLimit.fromObject(object.routeDurationLimit);
- }
- if (object.travelDurationLimit != null) {
- if (typeof object.travelDurationLimit !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.travelDurationLimit: object expected");
- message.travelDurationLimit = $root.google.cloud.optimization.v1.Vehicle.DurationLimit.fromObject(object.travelDurationLimit);
- }
- if (object.routeDistanceLimit != null) {
- if (typeof object.routeDistanceLimit !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.routeDistanceLimit: object expected");
- message.routeDistanceLimit = $root.google.cloud.optimization.v1.DistanceLimit.fromObject(object.routeDistanceLimit);
- }
- if (object.extraVisitDurationForVisitType) {
- if (typeof object.extraVisitDurationForVisitType !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.extraVisitDurationForVisitType: object expected");
- message.extraVisitDurationForVisitType = {};
- for (var keys = Object.keys(object.extraVisitDurationForVisitType), i = 0; i < keys.length; ++i) {
- if (typeof object.extraVisitDurationForVisitType[keys[i]] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.extraVisitDurationForVisitType: object expected");
- message.extraVisitDurationForVisitType[keys[i]] = $root.google.protobuf.Duration.fromObject(object.extraVisitDurationForVisitType[keys[i]]);
- }
- }
- if (object.breakRule != null) {
- if (typeof object.breakRule !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.breakRule: object expected");
- message.breakRule = $root.google.cloud.optimization.v1.BreakRule.fromObject(object.breakRule);
- }
- if (object.label != null)
- message.label = String(object.label);
- if (object.ignore != null)
- message.ignore = Boolean(object.ignore);
- if (object.breakRuleIndices) {
- if (!Array.isArray(object.breakRuleIndices))
- throw TypeError(".google.cloud.optimization.v1.Vehicle.breakRuleIndices: array expected");
- message.breakRuleIndices = [];
- for (var i = 0; i < object.breakRuleIndices.length; ++i)
- message.breakRuleIndices[i] = object.breakRuleIndices[i] | 0;
- }
- if (object.capacities) {
- if (!Array.isArray(object.capacities))
- throw TypeError(".google.cloud.optimization.v1.Vehicle.capacities: array expected");
- message.capacities = [];
- for (var i = 0; i < object.capacities.length; ++i) {
- if (typeof object.capacities[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.capacities: object expected");
- message.capacities[i] = $root.google.cloud.optimization.v1.CapacityQuantity.fromObject(object.capacities[i]);
- }
- }
- if (object.startLoadIntervals) {
- if (!Array.isArray(object.startLoadIntervals))
- throw TypeError(".google.cloud.optimization.v1.Vehicle.startLoadIntervals: array expected");
- message.startLoadIntervals = [];
- for (var i = 0; i < object.startLoadIntervals.length; ++i) {
- if (typeof object.startLoadIntervals[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.startLoadIntervals: object expected");
- message.startLoadIntervals[i] = $root.google.cloud.optimization.v1.CapacityQuantityInterval.fromObject(object.startLoadIntervals[i]);
- }
- }
- if (object.endLoadIntervals) {
- if (!Array.isArray(object.endLoadIntervals))
- throw TypeError(".google.cloud.optimization.v1.Vehicle.endLoadIntervals: array expected");
- message.endLoadIntervals = [];
- for (var i = 0; i < object.endLoadIntervals.length; ++i) {
- if (typeof object.endLoadIntervals[i] !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.endLoadIntervals: object expected");
- message.endLoadIntervals[i] = $root.google.cloud.optimization.v1.CapacityQuantityInterval.fromObject(object.endLoadIntervals[i]);
- }
- }
- return message;
- };
-
- /**
- * Creates a plain object from a Vehicle message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.Vehicle
- * @static
- * @param {google.cloud.optimization.v1.Vehicle} message Vehicle
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Vehicle.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults) {
- object.startTags = [];
- object.endTags = [];
- object.startTimeWindows = [];
- object.endTimeWindows = [];
- object.capacities = [];
- object.startLoadIntervals = [];
- object.endLoadIntervals = [];
- object.breakRuleIndices = [];
- }
- if (options.objects || options.defaults) {
- object.extraVisitDurationForVisitType = {};
- object.loadLimits = {};
- }
- if (options.defaults) {
- object.travelMode = options.enums === String ? "TRAVEL_MODE_UNSPECIFIED" : 0;
- object.routeModifiers = null;
- object.startLocation = null;
- object.startWaypoint = null;
- object.endLocation = null;
- object.endWaypoint = null;
- object.unloadingPolicy = options.enums === String ? "UNLOADING_POLICY_UNSPECIFIED" : 0;
- object.costPerHour = 0;
- object.costPerTraveledHour = 0;
- object.costPerKilometer = 0;
- object.fixedCost = 0;
- object.usedIfRouteIsEmpty = false;
- object.routeDurationLimit = null;
- object.travelDurationLimit = null;
- object.routeDistanceLimit = null;
- object.breakRule = null;
- object.label = "";
- object.ignore = false;
- }
- if (message.travelMode != null && message.hasOwnProperty("travelMode"))
- object.travelMode = options.enums === String ? $root.google.cloud.optimization.v1.Vehicle.TravelMode[message.travelMode] === undefined ? message.travelMode : $root.google.cloud.optimization.v1.Vehicle.TravelMode[message.travelMode] : message.travelMode;
- if (message.routeModifiers != null && message.hasOwnProperty("routeModifiers"))
- object.routeModifiers = $root.google.cloud.optimization.v1.RouteModifiers.toObject(message.routeModifiers, options);
- if (message.startLocation != null && message.hasOwnProperty("startLocation"))
- object.startLocation = $root.google.type.LatLng.toObject(message.startLocation, options);
- if (message.startWaypoint != null && message.hasOwnProperty("startWaypoint"))
- object.startWaypoint = $root.google.cloud.optimization.v1.Waypoint.toObject(message.startWaypoint, options);
- if (message.endLocation != null && message.hasOwnProperty("endLocation"))
- object.endLocation = $root.google.type.LatLng.toObject(message.endLocation, options);
- if (message.endWaypoint != null && message.hasOwnProperty("endWaypoint"))
- object.endWaypoint = $root.google.cloud.optimization.v1.Waypoint.toObject(message.endWaypoint, options);
- if (message.startTags && message.startTags.length) {
- object.startTags = [];
- for (var j = 0; j < message.startTags.length; ++j)
- object.startTags[j] = message.startTags[j];
- }
- if (message.endTags && message.endTags.length) {
- object.endTags = [];
- for (var j = 0; j < message.endTags.length; ++j)
- object.endTags[j] = message.endTags[j];
- }
- if (message.startTimeWindows && message.startTimeWindows.length) {
- object.startTimeWindows = [];
- for (var j = 0; j < message.startTimeWindows.length; ++j)
- object.startTimeWindows[j] = $root.google.cloud.optimization.v1.TimeWindow.toObject(message.startTimeWindows[j], options);
- }
- if (message.endTimeWindows && message.endTimeWindows.length) {
- object.endTimeWindows = [];
- for (var j = 0; j < message.endTimeWindows.length; ++j)
- object.endTimeWindows[j] = $root.google.cloud.optimization.v1.TimeWindow.toObject(message.endTimeWindows[j], options);
- }
- if (message.travelDurationMultiple != null && message.hasOwnProperty("travelDurationMultiple")) {
- object.travelDurationMultiple = options.json && !isFinite(message.travelDurationMultiple) ? String(message.travelDurationMultiple) : message.travelDurationMultiple;
- if (options.oneofs)
- object._travelDurationMultiple = "travelDurationMultiple";
- }
- if (message.unloadingPolicy != null && message.hasOwnProperty("unloadingPolicy"))
- object.unloadingPolicy = options.enums === String ? $root.google.cloud.optimization.v1.Vehicle.UnloadingPolicy[message.unloadingPolicy] === undefined ? message.unloadingPolicy : $root.google.cloud.optimization.v1.Vehicle.UnloadingPolicy[message.unloadingPolicy] : message.unloadingPolicy;
- if (message.capacities && message.capacities.length) {
- object.capacities = [];
- for (var j = 0; j < message.capacities.length; ++j)
- object.capacities[j] = $root.google.cloud.optimization.v1.CapacityQuantity.toObject(message.capacities[j], options);
- }
- if (message.startLoadIntervals && message.startLoadIntervals.length) {
- object.startLoadIntervals = [];
- for (var j = 0; j < message.startLoadIntervals.length; ++j)
- object.startLoadIntervals[j] = $root.google.cloud.optimization.v1.CapacityQuantityInterval.toObject(message.startLoadIntervals[j], options);
- }
- if (message.endLoadIntervals && message.endLoadIntervals.length) {
- object.endLoadIntervals = [];
- for (var j = 0; j < message.endLoadIntervals.length; ++j)
- object.endLoadIntervals[j] = $root.google.cloud.optimization.v1.CapacityQuantityInterval.toObject(message.endLoadIntervals[j], options);
- }
- if (message.costPerHour != null && message.hasOwnProperty("costPerHour"))
- object.costPerHour = options.json && !isFinite(message.costPerHour) ? String(message.costPerHour) : message.costPerHour;
- if (message.costPerTraveledHour != null && message.hasOwnProperty("costPerTraveledHour"))
- object.costPerTraveledHour = options.json && !isFinite(message.costPerTraveledHour) ? String(message.costPerTraveledHour) : message.costPerTraveledHour;
- if (message.costPerKilometer != null && message.hasOwnProperty("costPerKilometer"))
- object.costPerKilometer = options.json && !isFinite(message.costPerKilometer) ? String(message.costPerKilometer) : message.costPerKilometer;
- if (message.fixedCost != null && message.hasOwnProperty("fixedCost"))
- object.fixedCost = options.json && !isFinite(message.fixedCost) ? String(message.fixedCost) : message.fixedCost;
- if (message.usedIfRouteIsEmpty != null && message.hasOwnProperty("usedIfRouteIsEmpty"))
- object.usedIfRouteIsEmpty = message.usedIfRouteIsEmpty;
- if (message.routeDurationLimit != null && message.hasOwnProperty("routeDurationLimit"))
- object.routeDurationLimit = $root.google.cloud.optimization.v1.Vehicle.DurationLimit.toObject(message.routeDurationLimit, options);
- if (message.travelDurationLimit != null && message.hasOwnProperty("travelDurationLimit"))
- object.travelDurationLimit = $root.google.cloud.optimization.v1.Vehicle.DurationLimit.toObject(message.travelDurationLimit, options);
- if (message.routeDistanceLimit != null && message.hasOwnProperty("routeDistanceLimit"))
- object.routeDistanceLimit = $root.google.cloud.optimization.v1.DistanceLimit.toObject(message.routeDistanceLimit, options);
- var keys2;
- if (message.extraVisitDurationForVisitType && (keys2 = Object.keys(message.extraVisitDurationForVisitType)).length) {
- object.extraVisitDurationForVisitType = {};
- for (var j = 0; j < keys2.length; ++j)
- object.extraVisitDurationForVisitType[keys2[j]] = $root.google.protobuf.Duration.toObject(message.extraVisitDurationForVisitType[keys2[j]], options);
- }
- if (message.breakRule != null && message.hasOwnProperty("breakRule"))
- object.breakRule = $root.google.cloud.optimization.v1.BreakRule.toObject(message.breakRule, options);
- if (message.label != null && message.hasOwnProperty("label"))
- object.label = message.label;
- if (message.ignore != null && message.hasOwnProperty("ignore"))
- object.ignore = message.ignore;
- if (message.breakRuleIndices && message.breakRuleIndices.length) {
- object.breakRuleIndices = [];
- for (var j = 0; j < message.breakRuleIndices.length; ++j)
- object.breakRuleIndices[j] = message.breakRuleIndices[j];
- }
- if (message.loadLimits && (keys2 = Object.keys(message.loadLimits)).length) {
- object.loadLimits = {};
- for (var j = 0; j < keys2.length; ++j)
- object.loadLimits[keys2[j]] = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.toObject(message.loadLimits[keys2[j]], options);
- }
- return object;
- };
-
- /**
- * Converts this Vehicle to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.Vehicle
- * @instance
- * @returns {Object.} JSON object
- */
- Vehicle.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for Vehicle
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.Vehicle
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Vehicle.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.Vehicle";
- };
-
- /**
- * TravelMode enum.
- * @name google.cloud.optimization.v1.Vehicle.TravelMode
- * @enum {number}
- * @property {number} TRAVEL_MODE_UNSPECIFIED=0 TRAVEL_MODE_UNSPECIFIED value
- * @property {number} DRIVING=1 DRIVING value
- * @property {number} WALKING=2 WALKING value
- */
- Vehicle.TravelMode = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "TRAVEL_MODE_UNSPECIFIED"] = 0;
- values[valuesById[1] = "DRIVING"] = 1;
- values[valuesById[2] = "WALKING"] = 2;
- return values;
- })();
-
- /**
- * UnloadingPolicy enum.
- * @name google.cloud.optimization.v1.Vehicle.UnloadingPolicy
- * @enum {number}
- * @property {number} UNLOADING_POLICY_UNSPECIFIED=0 UNLOADING_POLICY_UNSPECIFIED value
- * @property {number} LAST_IN_FIRST_OUT=1 LAST_IN_FIRST_OUT value
- * @property {number} FIRST_IN_FIRST_OUT=2 FIRST_IN_FIRST_OUT value
- */
- Vehicle.UnloadingPolicy = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "UNLOADING_POLICY_UNSPECIFIED"] = 0;
- values[valuesById[1] = "LAST_IN_FIRST_OUT"] = 1;
- values[valuesById[2] = "FIRST_IN_FIRST_OUT"] = 2;
- return values;
- })();
-
- Vehicle.LoadLimit = (function() {
-
- /**
- * Properties of a LoadLimit.
- * @memberof google.cloud.optimization.v1.Vehicle
- * @interface ILoadLimit
- * @property {number|Long|null} [maxLoad] LoadLimit maxLoad
- * @property {number|Long|null} [softMaxLoad] LoadLimit softMaxLoad
- * @property {number|null} [costPerUnitAboveSoftMax] LoadLimit costPerUnitAboveSoftMax
- * @property {google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval|null} [startLoadInterval] LoadLimit startLoadInterval
- * @property {google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval|null} [endLoadInterval] LoadLimit endLoadInterval
- */
-
- /**
- * Constructs a new LoadLimit.
- * @memberof google.cloud.optimization.v1.Vehicle
- * @classdesc Represents a LoadLimit.
- * @implements ILoadLimit
- * @constructor
- * @param {google.cloud.optimization.v1.Vehicle.ILoadLimit=} [properties] Properties to set
- */
- function LoadLimit(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]];
- }
-
- /**
- * LoadLimit maxLoad.
- * @member {number|Long|null|undefined} maxLoad
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @instance
- */
- LoadLimit.prototype.maxLoad = null;
-
- /**
- * LoadLimit softMaxLoad.
- * @member {number|Long} softMaxLoad
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @instance
- */
- LoadLimit.prototype.softMaxLoad = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
- /**
- * LoadLimit costPerUnitAboveSoftMax.
- * @member {number} costPerUnitAboveSoftMax
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @instance
- */
- LoadLimit.prototype.costPerUnitAboveSoftMax = 0;
-
- /**
- * LoadLimit startLoadInterval.
- * @member {google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval|null|undefined} startLoadInterval
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @instance
- */
- LoadLimit.prototype.startLoadInterval = null;
-
- /**
- * LoadLimit endLoadInterval.
- * @member {google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval|null|undefined} endLoadInterval
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @instance
- */
- LoadLimit.prototype.endLoadInterval = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * LoadLimit _maxLoad.
- * @member {"maxLoad"|undefined} _maxLoad
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @instance
- */
- Object.defineProperty(LoadLimit.prototype, "_maxLoad", {
- get: $util.oneOfGetter($oneOfFields = ["maxLoad"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new LoadLimit instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.ILoadLimit=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.Vehicle.LoadLimit} LoadLimit instance
- */
- LoadLimit.create = function create(properties) {
- return new LoadLimit(properties);
- };
-
- /**
- * Encodes the specified LoadLimit message. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.LoadLimit.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.ILoadLimit} message LoadLimit message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- LoadLimit.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.maxLoad != null && Object.hasOwnProperty.call(message, "maxLoad"))
- writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxLoad);
- if (message.softMaxLoad != null && Object.hasOwnProperty.call(message, "softMaxLoad"))
- writer.uint32(/* id 2, wireType 0 =*/16).int64(message.softMaxLoad);
- if (message.costPerUnitAboveSoftMax != null && Object.hasOwnProperty.call(message, "costPerUnitAboveSoftMax"))
- writer.uint32(/* id 3, wireType 1 =*/25).double(message.costPerUnitAboveSoftMax);
- if (message.startLoadInterval != null && Object.hasOwnProperty.call(message, "startLoadInterval"))
- $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.encode(message.startLoadInterval, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.endLoadInterval != null && Object.hasOwnProperty.call(message, "endLoadInterval"))
- $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.encode(message.endLoadInterval, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified LoadLimit message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.LoadLimit.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.ILoadLimit} message LoadLimit message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- LoadLimit.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a LoadLimit message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.Vehicle.LoadLimit} LoadLimit
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- LoadLimit.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.optimization.v1.Vehicle.LoadLimit();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.maxLoad = reader.int64();
- break;
- }
- case 2: {
- message.softMaxLoad = reader.int64();
- break;
- }
- case 3: {
- message.costPerUnitAboveSoftMax = reader.double();
- break;
- }
- case 4: {
- message.startLoadInterval = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.decode(reader, reader.uint32());
- break;
- }
- case 5: {
- message.endLoadInterval = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a LoadLimit message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.Vehicle.LoadLimit} LoadLimit
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- LoadLimit.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a LoadLimit message.
- * @function verify
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- LoadLimit.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.maxLoad != null && message.hasOwnProperty("maxLoad")) {
- properties._maxLoad = 1;
- if (!$util.isInteger(message.maxLoad) && !(message.maxLoad && $util.isInteger(message.maxLoad.low) && $util.isInteger(message.maxLoad.high)))
- return "maxLoad: integer|Long expected";
- }
- if (message.softMaxLoad != null && message.hasOwnProperty("softMaxLoad"))
- if (!$util.isInteger(message.softMaxLoad) && !(message.softMaxLoad && $util.isInteger(message.softMaxLoad.low) && $util.isInteger(message.softMaxLoad.high)))
- return "softMaxLoad: integer|Long expected";
- if (message.costPerUnitAboveSoftMax != null && message.hasOwnProperty("costPerUnitAboveSoftMax"))
- if (typeof message.costPerUnitAboveSoftMax !== "number")
- return "costPerUnitAboveSoftMax: number expected";
- if (message.startLoadInterval != null && message.hasOwnProperty("startLoadInterval")) {
- var error = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.verify(message.startLoadInterval);
- if (error)
- return "startLoadInterval." + error;
- }
- if (message.endLoadInterval != null && message.hasOwnProperty("endLoadInterval")) {
- var error = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.verify(message.endLoadInterval);
- if (error)
- return "endLoadInterval." + error;
- }
- return null;
- };
-
- /**
- * Creates a LoadLimit message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.Vehicle.LoadLimit} LoadLimit
- */
- LoadLimit.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.Vehicle.LoadLimit)
- return object;
- var message = new $root.google.cloud.optimization.v1.Vehicle.LoadLimit();
- if (object.maxLoad != null)
- if ($util.Long)
- (message.maxLoad = $util.Long.fromValue(object.maxLoad)).unsigned = false;
- else if (typeof object.maxLoad === "string")
- message.maxLoad = parseInt(object.maxLoad, 10);
- else if (typeof object.maxLoad === "number")
- message.maxLoad = object.maxLoad;
- else if (typeof object.maxLoad === "object")
- message.maxLoad = new $util.LongBits(object.maxLoad.low >>> 0, object.maxLoad.high >>> 0).toNumber();
- if (object.softMaxLoad != null)
- if ($util.Long)
- (message.softMaxLoad = $util.Long.fromValue(object.softMaxLoad)).unsigned = false;
- else if (typeof object.softMaxLoad === "string")
- message.softMaxLoad = parseInt(object.softMaxLoad, 10);
- else if (typeof object.softMaxLoad === "number")
- message.softMaxLoad = object.softMaxLoad;
- else if (typeof object.softMaxLoad === "object")
- message.softMaxLoad = new $util.LongBits(object.softMaxLoad.low >>> 0, object.softMaxLoad.high >>> 0).toNumber();
- if (object.costPerUnitAboveSoftMax != null)
- message.costPerUnitAboveSoftMax = Number(object.costPerUnitAboveSoftMax);
- if (object.startLoadInterval != null) {
- if (typeof object.startLoadInterval !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.LoadLimit.startLoadInterval: object expected");
- message.startLoadInterval = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.fromObject(object.startLoadInterval);
- }
- if (object.endLoadInterval != null) {
- if (typeof object.endLoadInterval !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.LoadLimit.endLoadInterval: object expected");
- message.endLoadInterval = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.fromObject(object.endLoadInterval);
- }
- return message;
- };
-
- /**
- * Creates a plain object from a LoadLimit message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.LoadLimit} message LoadLimit
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- LoadLimit.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.softMaxLoad = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.softMaxLoad = options.longs === String ? "0" : 0;
- object.costPerUnitAboveSoftMax = 0;
- object.startLoadInterval = null;
- object.endLoadInterval = null;
- }
- if (message.maxLoad != null && message.hasOwnProperty("maxLoad")) {
- if (typeof message.maxLoad === "number")
- object.maxLoad = options.longs === String ? String(message.maxLoad) : message.maxLoad;
- else
- object.maxLoad = options.longs === String ? $util.Long.prototype.toString.call(message.maxLoad) : options.longs === Number ? new $util.LongBits(message.maxLoad.low >>> 0, message.maxLoad.high >>> 0).toNumber() : message.maxLoad;
- if (options.oneofs)
- object._maxLoad = "maxLoad";
- }
- if (message.softMaxLoad != null && message.hasOwnProperty("softMaxLoad"))
- if (typeof message.softMaxLoad === "number")
- object.softMaxLoad = options.longs === String ? String(message.softMaxLoad) : message.softMaxLoad;
- else
- object.softMaxLoad = options.longs === String ? $util.Long.prototype.toString.call(message.softMaxLoad) : options.longs === Number ? new $util.LongBits(message.softMaxLoad.low >>> 0, message.softMaxLoad.high >>> 0).toNumber() : message.softMaxLoad;
- if (message.costPerUnitAboveSoftMax != null && message.hasOwnProperty("costPerUnitAboveSoftMax"))
- object.costPerUnitAboveSoftMax = options.json && !isFinite(message.costPerUnitAboveSoftMax) ? String(message.costPerUnitAboveSoftMax) : message.costPerUnitAboveSoftMax;
- if (message.startLoadInterval != null && message.hasOwnProperty("startLoadInterval"))
- object.startLoadInterval = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.toObject(message.startLoadInterval, options);
- if (message.endLoadInterval != null && message.hasOwnProperty("endLoadInterval"))
- object.endLoadInterval = $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.toObject(message.endLoadInterval, options);
- return object;
- };
-
- /**
- * Converts this LoadLimit to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @instance
- * @returns {Object.} JSON object
- */
- LoadLimit.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for LoadLimit
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- LoadLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.Vehicle.LoadLimit";
- };
-
- LoadLimit.Interval = (function() {
-
- /**
- * Properties of an Interval.
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @interface IInterval
- * @property {number|Long|null} [min] Interval min
- * @property {number|Long|null} [max] Interval max
- */
-
- /**
- * Constructs a new Interval.
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit
- * @classdesc Represents an Interval.
- * @implements IInterval
- * @constructor
- * @param {google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval=} [properties] Properties to set
- */
- function Interval(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
-
- /**
- * Interval min.
- * @member {number|Long} min
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @instance
- */
- Interval.prototype.min = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
- /**
- * Interval max.
- * @member {number|Long|null|undefined} max
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @instance
- */
- Interval.prototype.max = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * Interval _max.
- * @member {"max"|undefined} _max
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @instance
- */
- Object.defineProperty(Interval.prototype, "_max", {
- get: $util.oneOfGetter($oneOfFields = ["max"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new Interval instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.Vehicle.LoadLimit.Interval} Interval instance
- */
- Interval.create = function create(properties) {
- return new Interval(properties);
- };
-
- /**
- * Encodes the specified Interval message. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval} message Interval message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Interval.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.min != null && Object.hasOwnProperty.call(message, "min"))
- writer.uint32(/* id 1, wireType 0 =*/8).int64(message.min);
- if (message.max != null && Object.hasOwnProperty.call(message, "max"))
- writer.uint32(/* id 2, wireType 0 =*/16).int64(message.max);
- return writer;
- };
-
- /**
- * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.LoadLimit.IInterval} message Interval message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Interval.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes an Interval message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.Vehicle.LoadLimit.Interval} Interval
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Interval.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.min = reader.int64();
- break;
- }
- case 2: {
- message.max = reader.int64();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes an Interval message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.Vehicle.LoadLimit.Interval} Interval
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Interval.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies an Interval message.
- * @function verify
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Interval.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.min != null && message.hasOwnProperty("min"))
- if (!$util.isInteger(message.min) && !(message.min && $util.isInteger(message.min.low) && $util.isInteger(message.min.high)))
- return "min: integer|Long expected";
- if (message.max != null && message.hasOwnProperty("max")) {
- properties._max = 1;
- if (!$util.isInteger(message.max) && !(message.max && $util.isInteger(message.max.low) && $util.isInteger(message.max.high)))
- return "max: integer|Long expected";
- }
- return null;
- };
-
- /**
- * Creates an Interval message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.Vehicle.LoadLimit.Interval} Interval
- */
- Interval.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval)
- return object;
- var message = new $root.google.cloud.optimization.v1.Vehicle.LoadLimit.Interval();
- if (object.min != null)
- if ($util.Long)
- (message.min = $util.Long.fromValue(object.min)).unsigned = false;
- else if (typeof object.min === "string")
- message.min = parseInt(object.min, 10);
- else if (typeof object.min === "number")
- message.min = object.min;
- else if (typeof object.min === "object")
- message.min = new $util.LongBits(object.min.low >>> 0, object.min.high >>> 0).toNumber();
- if (object.max != null)
- if ($util.Long)
- (message.max = $util.Long.fromValue(object.max)).unsigned = false;
- else if (typeof object.max === "string")
- message.max = parseInt(object.max, 10);
- else if (typeof object.max === "number")
- message.max = object.max;
- else if (typeof object.max === "object")
- message.max = new $util.LongBits(object.max.low >>> 0, object.max.high >>> 0).toNumber();
- return message;
- };
-
- /**
- * Creates a plain object from an Interval message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.LoadLimit.Interval} message Interval
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Interval.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.min = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.min = options.longs === String ? "0" : 0;
- if (message.min != null && message.hasOwnProperty("min"))
- if (typeof message.min === "number")
- object.min = options.longs === String ? String(message.min) : message.min;
- else
- object.min = options.longs === String ? $util.Long.prototype.toString.call(message.min) : options.longs === Number ? new $util.LongBits(message.min.low >>> 0, message.min.high >>> 0).toNumber() : message.min;
- if (message.max != null && message.hasOwnProperty("max")) {
- if (typeof message.max === "number")
- object.max = options.longs === String ? String(message.max) : message.max;
- else
- object.max = options.longs === String ? $util.Long.prototype.toString.call(message.max) : options.longs === Number ? new $util.LongBits(message.max.low >>> 0, message.max.high >>> 0).toNumber() : message.max;
- if (options.oneofs)
- object._max = "max";
- }
- return object;
- };
-
- /**
- * Converts this Interval to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @instance
- * @returns {Object.} JSON object
- */
- Interval.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for Interval
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.Vehicle.LoadLimit.Interval
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.Vehicle.LoadLimit.Interval";
- };
-
- return Interval;
- })();
-
- return LoadLimit;
- })();
-
- Vehicle.DurationLimit = (function() {
-
- /**
- * Properties of a DurationLimit.
- * @memberof google.cloud.optimization.v1.Vehicle
- * @interface IDurationLimit
- * @property {google.protobuf.IDuration|null} [maxDuration] DurationLimit maxDuration
- * @property {google.protobuf.IDuration|null} [softMaxDuration] DurationLimit softMaxDuration
- * @property {number|null} [costPerHourAfterSoftMax] DurationLimit costPerHourAfterSoftMax
- * @property {google.protobuf.IDuration|null} [quadraticSoftMaxDuration] DurationLimit quadraticSoftMaxDuration
- * @property {number|null} [costPerSquareHourAfterQuadraticSoftMax] DurationLimit costPerSquareHourAfterQuadraticSoftMax
- */
-
- /**
- * Constructs a new DurationLimit.
- * @memberof google.cloud.optimization.v1.Vehicle
- * @classdesc Represents a DurationLimit.
- * @implements IDurationLimit
- * @constructor
- * @param {google.cloud.optimization.v1.Vehicle.IDurationLimit=} [properties] Properties to set
- */
- function DurationLimit(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]];
- }
-
- /**
- * DurationLimit maxDuration.
- * @member {google.protobuf.IDuration|null|undefined} maxDuration
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @instance
- */
- DurationLimit.prototype.maxDuration = null;
-
- /**
- * DurationLimit softMaxDuration.
- * @member {google.protobuf.IDuration|null|undefined} softMaxDuration
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @instance
- */
- DurationLimit.prototype.softMaxDuration = null;
-
- /**
- * DurationLimit costPerHourAfterSoftMax.
- * @member {number|null|undefined} costPerHourAfterSoftMax
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @instance
- */
- DurationLimit.prototype.costPerHourAfterSoftMax = null;
-
- /**
- * DurationLimit quadraticSoftMaxDuration.
- * @member {google.protobuf.IDuration|null|undefined} quadraticSoftMaxDuration
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @instance
- */
- DurationLimit.prototype.quadraticSoftMaxDuration = null;
-
- /**
- * DurationLimit costPerSquareHourAfterQuadraticSoftMax.
- * @member {number|null|undefined} costPerSquareHourAfterQuadraticSoftMax
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @instance
- */
- DurationLimit.prototype.costPerSquareHourAfterQuadraticSoftMax = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * DurationLimit _costPerHourAfterSoftMax.
- * @member {"costPerHourAfterSoftMax"|undefined} _costPerHourAfterSoftMax
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @instance
- */
- Object.defineProperty(DurationLimit.prototype, "_costPerHourAfterSoftMax", {
- get: $util.oneOfGetter($oneOfFields = ["costPerHourAfterSoftMax"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * DurationLimit _costPerSquareHourAfterQuadraticSoftMax.
- * @member {"costPerSquareHourAfterQuadraticSoftMax"|undefined} _costPerSquareHourAfterQuadraticSoftMax
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @instance
- */
- Object.defineProperty(DurationLimit.prototype, "_costPerSquareHourAfterQuadraticSoftMax", {
- get: $util.oneOfGetter($oneOfFields = ["costPerSquareHourAfterQuadraticSoftMax"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new DurationLimit instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.IDurationLimit=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.Vehicle.DurationLimit} DurationLimit instance
- */
- DurationLimit.create = function create(properties) {
- return new DurationLimit(properties);
- };
-
- /**
- * Encodes the specified DurationLimit message. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.DurationLimit.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.IDurationLimit} message DurationLimit message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DurationLimit.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.maxDuration != null && Object.hasOwnProperty.call(message, "maxDuration"))
- $root.google.protobuf.Duration.encode(message.maxDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.softMaxDuration != null && Object.hasOwnProperty.call(message, "softMaxDuration"))
- $root.google.protobuf.Duration.encode(message.softMaxDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.costPerHourAfterSoftMax != null && Object.hasOwnProperty.call(message, "costPerHourAfterSoftMax"))
- writer.uint32(/* id 3, wireType 1 =*/25).double(message.costPerHourAfterSoftMax);
- if (message.quadraticSoftMaxDuration != null && Object.hasOwnProperty.call(message, "quadraticSoftMaxDuration"))
- $root.google.protobuf.Duration.encode(message.quadraticSoftMaxDuration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.costPerSquareHourAfterQuadraticSoftMax != null && Object.hasOwnProperty.call(message, "costPerSquareHourAfterQuadraticSoftMax"))
- writer.uint32(/* id 5, wireType 1 =*/41).double(message.costPerSquareHourAfterQuadraticSoftMax);
- return writer;
- };
-
- /**
- * Encodes the specified DurationLimit message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Vehicle.DurationLimit.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.IDurationLimit} message DurationLimit message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DurationLimit.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a DurationLimit message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.Vehicle.DurationLimit} DurationLimit
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DurationLimit.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.optimization.v1.Vehicle.DurationLimit();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.maxDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.softMaxDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.costPerHourAfterSoftMax = reader.double();
- break;
- }
- case 4: {
- message.quadraticSoftMaxDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- case 5: {
- message.costPerSquareHourAfterQuadraticSoftMax = reader.double();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a DurationLimit message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.Vehicle.DurationLimit} DurationLimit
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DurationLimit.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a DurationLimit message.
- * @function verify
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- DurationLimit.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.maxDuration != null && message.hasOwnProperty("maxDuration")) {
- var error = $root.google.protobuf.Duration.verify(message.maxDuration);
- if (error)
- return "maxDuration." + error;
- }
- if (message.softMaxDuration != null && message.hasOwnProperty("softMaxDuration")) {
- var error = $root.google.protobuf.Duration.verify(message.softMaxDuration);
- if (error)
- return "softMaxDuration." + error;
- }
- if (message.costPerHourAfterSoftMax != null && message.hasOwnProperty("costPerHourAfterSoftMax")) {
- properties._costPerHourAfterSoftMax = 1;
- if (typeof message.costPerHourAfterSoftMax !== "number")
- return "costPerHourAfterSoftMax: number expected";
- }
- if (message.quadraticSoftMaxDuration != null && message.hasOwnProperty("quadraticSoftMaxDuration")) {
- var error = $root.google.protobuf.Duration.verify(message.quadraticSoftMaxDuration);
- if (error)
- return "quadraticSoftMaxDuration." + error;
- }
- if (message.costPerSquareHourAfterQuadraticSoftMax != null && message.hasOwnProperty("costPerSquareHourAfterQuadraticSoftMax")) {
- properties._costPerSquareHourAfterQuadraticSoftMax = 1;
- if (typeof message.costPerSquareHourAfterQuadraticSoftMax !== "number")
- return "costPerSquareHourAfterQuadraticSoftMax: number expected";
- }
- return null;
- };
-
- /**
- * Creates a DurationLimit message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.Vehicle.DurationLimit} DurationLimit
- */
- DurationLimit.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.Vehicle.DurationLimit)
- return object;
- var message = new $root.google.cloud.optimization.v1.Vehicle.DurationLimit();
- if (object.maxDuration != null) {
- if (typeof object.maxDuration !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.DurationLimit.maxDuration: object expected");
- message.maxDuration = $root.google.protobuf.Duration.fromObject(object.maxDuration);
- }
- if (object.softMaxDuration != null) {
- if (typeof object.softMaxDuration !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.DurationLimit.softMaxDuration: object expected");
- message.softMaxDuration = $root.google.protobuf.Duration.fromObject(object.softMaxDuration);
- }
- if (object.costPerHourAfterSoftMax != null)
- message.costPerHourAfterSoftMax = Number(object.costPerHourAfterSoftMax);
- if (object.quadraticSoftMaxDuration != null) {
- if (typeof object.quadraticSoftMaxDuration !== "object")
- throw TypeError(".google.cloud.optimization.v1.Vehicle.DurationLimit.quadraticSoftMaxDuration: object expected");
- message.quadraticSoftMaxDuration = $root.google.protobuf.Duration.fromObject(object.quadraticSoftMaxDuration);
- }
- if (object.costPerSquareHourAfterQuadraticSoftMax != null)
- message.costPerSquareHourAfterQuadraticSoftMax = Number(object.costPerSquareHourAfterQuadraticSoftMax);
- return message;
- };
-
- /**
- * Creates a plain object from a DurationLimit message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @static
- * @param {google.cloud.optimization.v1.Vehicle.DurationLimit} message DurationLimit
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- DurationLimit.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.maxDuration = null;
- object.softMaxDuration = null;
- object.quadraticSoftMaxDuration = null;
- }
- if (message.maxDuration != null && message.hasOwnProperty("maxDuration"))
- object.maxDuration = $root.google.protobuf.Duration.toObject(message.maxDuration, options);
- if (message.softMaxDuration != null && message.hasOwnProperty("softMaxDuration"))
- object.softMaxDuration = $root.google.protobuf.Duration.toObject(message.softMaxDuration, options);
- if (message.costPerHourAfterSoftMax != null && message.hasOwnProperty("costPerHourAfterSoftMax")) {
- object.costPerHourAfterSoftMax = options.json && !isFinite(message.costPerHourAfterSoftMax) ? String(message.costPerHourAfterSoftMax) : message.costPerHourAfterSoftMax;
- if (options.oneofs)
- object._costPerHourAfterSoftMax = "costPerHourAfterSoftMax";
- }
- if (message.quadraticSoftMaxDuration != null && message.hasOwnProperty("quadraticSoftMaxDuration"))
- object.quadraticSoftMaxDuration = $root.google.protobuf.Duration.toObject(message.quadraticSoftMaxDuration, options);
- if (message.costPerSquareHourAfterQuadraticSoftMax != null && message.hasOwnProperty("costPerSquareHourAfterQuadraticSoftMax")) {
- object.costPerSquareHourAfterQuadraticSoftMax = options.json && !isFinite(message.costPerSquareHourAfterQuadraticSoftMax) ? String(message.costPerSquareHourAfterQuadraticSoftMax) : message.costPerSquareHourAfterQuadraticSoftMax;
- if (options.oneofs)
- object._costPerSquareHourAfterQuadraticSoftMax = "costPerSquareHourAfterQuadraticSoftMax";
- }
- return object;
- };
-
- /**
- * Converts this DurationLimit to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @instance
- * @returns {Object.} JSON object
- */
- DurationLimit.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for DurationLimit
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.Vehicle.DurationLimit
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- DurationLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.Vehicle.DurationLimit";
- };
-
- return DurationLimit;
- })();
-
- return Vehicle;
- })();
-
- v1.TimeWindow = (function() {
-
- /**
- * Properties of a TimeWindow.
- * @memberof google.cloud.optimization.v1
- * @interface ITimeWindow
- * @property {google.protobuf.ITimestamp|null} [startTime] TimeWindow startTime
- * @property {google.protobuf.ITimestamp|null} [endTime] TimeWindow endTime
- * @property {google.protobuf.ITimestamp|null} [softStartTime] TimeWindow softStartTime
- * @property {google.protobuf.ITimestamp|null} [softEndTime] TimeWindow softEndTime
- * @property {number|null} [costPerHourBeforeSoftStartTime] TimeWindow costPerHourBeforeSoftStartTime
- * @property {number|null} [costPerHourAfterSoftEndTime] TimeWindow costPerHourAfterSoftEndTime
- */
-
- /**
- * Constructs a new TimeWindow.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a TimeWindow.
- * @implements ITimeWindow
- * @constructor
- * @param {google.cloud.optimization.v1.ITimeWindow=} [properties] Properties to set
- */
- function TimeWindow(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]];
- }
-
- /**
- * TimeWindow startTime.
- * @member {google.protobuf.ITimestamp|null|undefined} startTime
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @instance
- */
- TimeWindow.prototype.startTime = null;
-
- /**
- * TimeWindow endTime.
- * @member {google.protobuf.ITimestamp|null|undefined} endTime
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @instance
- */
- TimeWindow.prototype.endTime = null;
-
- /**
- * TimeWindow softStartTime.
- * @member {google.protobuf.ITimestamp|null|undefined} softStartTime
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @instance
- */
- TimeWindow.prototype.softStartTime = null;
-
- /**
- * TimeWindow softEndTime.
- * @member {google.protobuf.ITimestamp|null|undefined} softEndTime
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @instance
- */
- TimeWindow.prototype.softEndTime = null;
-
- /**
- * TimeWindow costPerHourBeforeSoftStartTime.
- * @member {number|null|undefined} costPerHourBeforeSoftStartTime
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @instance
- */
- TimeWindow.prototype.costPerHourBeforeSoftStartTime = null;
-
- /**
- * TimeWindow costPerHourAfterSoftEndTime.
- * @member {number|null|undefined} costPerHourAfterSoftEndTime
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @instance
- */
- TimeWindow.prototype.costPerHourAfterSoftEndTime = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * TimeWindow _costPerHourBeforeSoftStartTime.
- * @member {"costPerHourBeforeSoftStartTime"|undefined} _costPerHourBeforeSoftStartTime
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @instance
- */
- Object.defineProperty(TimeWindow.prototype, "_costPerHourBeforeSoftStartTime", {
- get: $util.oneOfGetter($oneOfFields = ["costPerHourBeforeSoftStartTime"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * TimeWindow _costPerHourAfterSoftEndTime.
- * @member {"costPerHourAfterSoftEndTime"|undefined} _costPerHourAfterSoftEndTime
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @instance
- */
- Object.defineProperty(TimeWindow.prototype, "_costPerHourAfterSoftEndTime", {
- get: $util.oneOfGetter($oneOfFields = ["costPerHourAfterSoftEndTime"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new TimeWindow instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @static
- * @param {google.cloud.optimization.v1.ITimeWindow=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.TimeWindow} TimeWindow instance
- */
- TimeWindow.create = function create(properties) {
- return new TimeWindow(properties);
- };
-
- /**
- * Encodes the specified TimeWindow message. Does not implicitly {@link google.cloud.optimization.v1.TimeWindow.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @static
- * @param {google.cloud.optimization.v1.ITimeWindow} message TimeWindow message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- TimeWindow.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime"))
- $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime"))
- $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.softStartTime != null && Object.hasOwnProperty.call(message, "softStartTime"))
- $root.google.protobuf.Timestamp.encode(message.softStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- if (message.softEndTime != null && Object.hasOwnProperty.call(message, "softEndTime"))
- $root.google.protobuf.Timestamp.encode(message.softEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- if (message.costPerHourBeforeSoftStartTime != null && Object.hasOwnProperty.call(message, "costPerHourBeforeSoftStartTime"))
- writer.uint32(/* id 5, wireType 1 =*/41).double(message.costPerHourBeforeSoftStartTime);
- if (message.costPerHourAfterSoftEndTime != null && Object.hasOwnProperty.call(message, "costPerHourAfterSoftEndTime"))
- writer.uint32(/* id 6, wireType 1 =*/49).double(message.costPerHourAfterSoftEndTime);
- return writer;
- };
-
- /**
- * Encodes the specified TimeWindow message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.TimeWindow.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @static
- * @param {google.cloud.optimization.v1.ITimeWindow} message TimeWindow message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- TimeWindow.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a TimeWindow message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.TimeWindow} TimeWindow
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- TimeWindow.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.optimization.v1.TimeWindow();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 3: {
- message.softStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 4: {
- message.softEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
- break;
- }
- case 5: {
- message.costPerHourBeforeSoftStartTime = reader.double();
- break;
- }
- case 6: {
- message.costPerHourAfterSoftEndTime = reader.double();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a TimeWindow message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.TimeWindow} TimeWindow
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- TimeWindow.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a TimeWindow message.
- * @function verify
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- TimeWindow.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.startTime != null && message.hasOwnProperty("startTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.startTime);
- if (error)
- return "startTime." + error;
- }
- if (message.endTime != null && message.hasOwnProperty("endTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.endTime);
- if (error)
- return "endTime." + error;
- }
- if (message.softStartTime != null && message.hasOwnProperty("softStartTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.softStartTime);
- if (error)
- return "softStartTime." + error;
- }
- if (message.softEndTime != null && message.hasOwnProperty("softEndTime")) {
- var error = $root.google.protobuf.Timestamp.verify(message.softEndTime);
- if (error)
- return "softEndTime." + error;
- }
- if (message.costPerHourBeforeSoftStartTime != null && message.hasOwnProperty("costPerHourBeforeSoftStartTime")) {
- properties._costPerHourBeforeSoftStartTime = 1;
- if (typeof message.costPerHourBeforeSoftStartTime !== "number")
- return "costPerHourBeforeSoftStartTime: number expected";
- }
- if (message.costPerHourAfterSoftEndTime != null && message.hasOwnProperty("costPerHourAfterSoftEndTime")) {
- properties._costPerHourAfterSoftEndTime = 1;
- if (typeof message.costPerHourAfterSoftEndTime !== "number")
- return "costPerHourAfterSoftEndTime: number expected";
- }
- return null;
- };
-
- /**
- * Creates a TimeWindow message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.TimeWindow} TimeWindow
- */
- TimeWindow.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.TimeWindow)
- return object;
- var message = new $root.google.cloud.optimization.v1.TimeWindow();
- if (object.startTime != null) {
- if (typeof object.startTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.TimeWindow.startTime: object expected");
- message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime);
- }
- if (object.endTime != null) {
- if (typeof object.endTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.TimeWindow.endTime: object expected");
- message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime);
- }
- if (object.softStartTime != null) {
- if (typeof object.softStartTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.TimeWindow.softStartTime: object expected");
- message.softStartTime = $root.google.protobuf.Timestamp.fromObject(object.softStartTime);
- }
- if (object.softEndTime != null) {
- if (typeof object.softEndTime !== "object")
- throw TypeError(".google.cloud.optimization.v1.TimeWindow.softEndTime: object expected");
- message.softEndTime = $root.google.protobuf.Timestamp.fromObject(object.softEndTime);
- }
- if (object.costPerHourBeforeSoftStartTime != null)
- message.costPerHourBeforeSoftStartTime = Number(object.costPerHourBeforeSoftStartTime);
- if (object.costPerHourAfterSoftEndTime != null)
- message.costPerHourAfterSoftEndTime = Number(object.costPerHourAfterSoftEndTime);
- return message;
- };
-
- /**
- * Creates a plain object from a TimeWindow message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @static
- * @param {google.cloud.optimization.v1.TimeWindow} message TimeWindow
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- TimeWindow.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.startTime = null;
- object.endTime = null;
- object.softStartTime = null;
- object.softEndTime = null;
- }
- if (message.startTime != null && message.hasOwnProperty("startTime"))
- object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options);
- if (message.endTime != null && message.hasOwnProperty("endTime"))
- object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options);
- if (message.softStartTime != null && message.hasOwnProperty("softStartTime"))
- object.softStartTime = $root.google.protobuf.Timestamp.toObject(message.softStartTime, options);
- if (message.softEndTime != null && message.hasOwnProperty("softEndTime"))
- object.softEndTime = $root.google.protobuf.Timestamp.toObject(message.softEndTime, options);
- if (message.costPerHourBeforeSoftStartTime != null && message.hasOwnProperty("costPerHourBeforeSoftStartTime")) {
- object.costPerHourBeforeSoftStartTime = options.json && !isFinite(message.costPerHourBeforeSoftStartTime) ? String(message.costPerHourBeforeSoftStartTime) : message.costPerHourBeforeSoftStartTime;
- if (options.oneofs)
- object._costPerHourBeforeSoftStartTime = "costPerHourBeforeSoftStartTime";
- }
- if (message.costPerHourAfterSoftEndTime != null && message.hasOwnProperty("costPerHourAfterSoftEndTime")) {
- object.costPerHourAfterSoftEndTime = options.json && !isFinite(message.costPerHourAfterSoftEndTime) ? String(message.costPerHourAfterSoftEndTime) : message.costPerHourAfterSoftEndTime;
- if (options.oneofs)
- object._costPerHourAfterSoftEndTime = "costPerHourAfterSoftEndTime";
- }
- return object;
- };
-
- /**
- * Converts this TimeWindow to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @instance
- * @returns {Object.} JSON object
- */
- TimeWindow.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for TimeWindow
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.TimeWindow
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- TimeWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.TimeWindow";
- };
-
- return TimeWindow;
- })();
-
- v1.CapacityQuantity = (function() {
-
- /**
- * Properties of a CapacityQuantity.
- * @memberof google.cloud.optimization.v1
- * @interface ICapacityQuantity
- * @property {string|null} [type] CapacityQuantity type
- * @property {number|Long|null} [value] CapacityQuantity value
- */
-
- /**
- * Constructs a new CapacityQuantity.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a CapacityQuantity.
- * @implements ICapacityQuantity
- * @constructor
- * @param {google.cloud.optimization.v1.ICapacityQuantity=} [properties] Properties to set
- */
- function CapacityQuantity(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]];
- }
-
- /**
- * CapacityQuantity type.
- * @member {string} type
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @instance
- */
- CapacityQuantity.prototype.type = "";
-
- /**
- * CapacityQuantity value.
- * @member {number|Long} value
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @instance
- */
- CapacityQuantity.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
-
- /**
- * Creates a new CapacityQuantity instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @static
- * @param {google.cloud.optimization.v1.ICapacityQuantity=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.CapacityQuantity} CapacityQuantity instance
- */
- CapacityQuantity.create = function create(properties) {
- return new CapacityQuantity(properties);
- };
-
- /**
- * Encodes the specified CapacityQuantity message. Does not implicitly {@link google.cloud.optimization.v1.CapacityQuantity.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @static
- * @param {google.cloud.optimization.v1.ICapacityQuantity} message CapacityQuantity message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- CapacityQuantity.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.value != null && Object.hasOwnProperty.call(message, "value"))
- writer.uint32(/* id 2, wireType 0 =*/16).int64(message.value);
- return writer;
- };
-
- /**
- * Encodes the specified CapacityQuantity message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.CapacityQuantity.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @static
- * @param {google.cloud.optimization.v1.ICapacityQuantity} message CapacityQuantity message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- CapacityQuantity.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a CapacityQuantity message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.CapacityQuantity} CapacityQuantity
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- CapacityQuantity.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.optimization.v1.CapacityQuantity();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.type = reader.string();
- break;
- }
- case 2: {
- message.value = reader.int64();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a CapacityQuantity message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.CapacityQuantity} CapacityQuantity
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- CapacityQuantity.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a CapacityQuantity message.
- * @function verify
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- CapacityQuantity.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.value != null && message.hasOwnProperty("value"))
- if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high)))
- return "value: integer|Long expected";
- return null;
- };
-
- /**
- * Creates a CapacityQuantity message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.CapacityQuantity} CapacityQuantity
- */
- CapacityQuantity.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.CapacityQuantity)
- return object;
- var message = new $root.google.cloud.optimization.v1.CapacityQuantity();
- if (object.type != null)
- message.type = String(object.type);
- if (object.value != null)
- if ($util.Long)
- (message.value = $util.Long.fromValue(object.value)).unsigned = false;
- else if (typeof object.value === "string")
- message.value = parseInt(object.value, 10);
- else if (typeof object.value === "number")
- message.value = object.value;
- else if (typeof object.value === "object")
- message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber();
- return message;
- };
-
- /**
- * Creates a plain object from a CapacityQuantity message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @static
- * @param {google.cloud.optimization.v1.CapacityQuantity} message CapacityQuantity
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- CapacityQuantity.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.type = "";
- if ($util.Long) {
- var long = new $util.Long(0, 0, false);
- object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.value = options.longs === String ? "0" : 0;
- }
- if (message.type != null && message.hasOwnProperty("type"))
- object.type = message.type;
- if (message.value != null && message.hasOwnProperty("value"))
- if (typeof message.value === "number")
- object.value = options.longs === String ? String(message.value) : message.value;
- else
- object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value;
- return object;
- };
-
- /**
- * Converts this CapacityQuantity to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @instance
- * @returns {Object.} JSON object
- */
- CapacityQuantity.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for CapacityQuantity
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.CapacityQuantity
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- CapacityQuantity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.CapacityQuantity";
- };
-
- return CapacityQuantity;
- })();
-
- v1.CapacityQuantityInterval = (function() {
-
- /**
- * Properties of a CapacityQuantityInterval.
- * @memberof google.cloud.optimization.v1
- * @interface ICapacityQuantityInterval
- * @property {string|null} [type] CapacityQuantityInterval type
- * @property {number|Long|null} [minValue] CapacityQuantityInterval minValue
- * @property {number|Long|null} [maxValue] CapacityQuantityInterval maxValue
- */
-
- /**
- * Constructs a new CapacityQuantityInterval.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a CapacityQuantityInterval.
- * @implements ICapacityQuantityInterval
- * @constructor
- * @param {google.cloud.optimization.v1.ICapacityQuantityInterval=} [properties] Properties to set
- */
- function CapacityQuantityInterval(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]];
- }
-
- /**
- * CapacityQuantityInterval type.
- * @member {string} type
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @instance
- */
- CapacityQuantityInterval.prototype.type = "";
-
- /**
- * CapacityQuantityInterval minValue.
- * @member {number|Long|null|undefined} minValue
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @instance
- */
- CapacityQuantityInterval.prototype.minValue = null;
-
- /**
- * CapacityQuantityInterval maxValue.
- * @member {number|Long|null|undefined} maxValue
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @instance
- */
- CapacityQuantityInterval.prototype.maxValue = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * CapacityQuantityInterval _minValue.
- * @member {"minValue"|undefined} _minValue
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @instance
- */
- Object.defineProperty(CapacityQuantityInterval.prototype, "_minValue", {
- get: $util.oneOfGetter($oneOfFields = ["minValue"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * CapacityQuantityInterval _maxValue.
- * @member {"maxValue"|undefined} _maxValue
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @instance
- */
- Object.defineProperty(CapacityQuantityInterval.prototype, "_maxValue", {
- get: $util.oneOfGetter($oneOfFields = ["maxValue"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new CapacityQuantityInterval instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @static
- * @param {google.cloud.optimization.v1.ICapacityQuantityInterval=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.CapacityQuantityInterval} CapacityQuantityInterval instance
- */
- CapacityQuantityInterval.create = function create(properties) {
- return new CapacityQuantityInterval(properties);
- };
-
- /**
- * Encodes the specified CapacityQuantityInterval message. Does not implicitly {@link google.cloud.optimization.v1.CapacityQuantityInterval.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @static
- * @param {google.cloud.optimization.v1.ICapacityQuantityInterval} message CapacityQuantityInterval message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- CapacityQuantityInterval.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.minValue != null && Object.hasOwnProperty.call(message, "minValue"))
- writer.uint32(/* id 2, wireType 0 =*/16).int64(message.minValue);
- if (message.maxValue != null && Object.hasOwnProperty.call(message, "maxValue"))
- writer.uint32(/* id 3, wireType 0 =*/24).int64(message.maxValue);
- return writer;
- };
-
- /**
- * Encodes the specified CapacityQuantityInterval message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.CapacityQuantityInterval.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @static
- * @param {google.cloud.optimization.v1.ICapacityQuantityInterval} message CapacityQuantityInterval message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- CapacityQuantityInterval.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a CapacityQuantityInterval message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.CapacityQuantityInterval} CapacityQuantityInterval
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- CapacityQuantityInterval.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.optimization.v1.CapacityQuantityInterval();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.type = reader.string();
- break;
- }
- case 2: {
- message.minValue = reader.int64();
- break;
- }
- case 3: {
- message.maxValue = reader.int64();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a CapacityQuantityInterval message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.CapacityQuantityInterval} CapacityQuantityInterval
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- CapacityQuantityInterval.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a CapacityQuantityInterval message.
- * @function verify
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- CapacityQuantityInterval.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.type != null && message.hasOwnProperty("type"))
- if (!$util.isString(message.type))
- return "type: string expected";
- if (message.minValue != null && message.hasOwnProperty("minValue")) {
- properties._minValue = 1;
- if (!$util.isInteger(message.minValue) && !(message.minValue && $util.isInteger(message.minValue.low) && $util.isInteger(message.minValue.high)))
- return "minValue: integer|Long expected";
- }
- if (message.maxValue != null && message.hasOwnProperty("maxValue")) {
- properties._maxValue = 1;
- if (!$util.isInteger(message.maxValue) && !(message.maxValue && $util.isInteger(message.maxValue.low) && $util.isInteger(message.maxValue.high)))
- return "maxValue: integer|Long expected";
- }
- return null;
- };
-
- /**
- * Creates a CapacityQuantityInterval message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.CapacityQuantityInterval} CapacityQuantityInterval
- */
- CapacityQuantityInterval.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.CapacityQuantityInterval)
- return object;
- var message = new $root.google.cloud.optimization.v1.CapacityQuantityInterval();
- if (object.type != null)
- message.type = String(object.type);
- if (object.minValue != null)
- if ($util.Long)
- (message.minValue = $util.Long.fromValue(object.minValue)).unsigned = false;
- else if (typeof object.minValue === "string")
- message.minValue = parseInt(object.minValue, 10);
- else if (typeof object.minValue === "number")
- message.minValue = object.minValue;
- else if (typeof object.minValue === "object")
- message.minValue = new $util.LongBits(object.minValue.low >>> 0, object.minValue.high >>> 0).toNumber();
- if (object.maxValue != null)
- if ($util.Long)
- (message.maxValue = $util.Long.fromValue(object.maxValue)).unsigned = false;
- else if (typeof object.maxValue === "string")
- message.maxValue = parseInt(object.maxValue, 10);
- else if (typeof object.maxValue === "number")
- message.maxValue = object.maxValue;
- else if (typeof object.maxValue === "object")
- message.maxValue = new $util.LongBits(object.maxValue.low >>> 0, object.maxValue.high >>> 0).toNumber();
- return message;
- };
-
- /**
- * Creates a plain object from a CapacityQuantityInterval message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @static
- * @param {google.cloud.optimization.v1.CapacityQuantityInterval} message CapacityQuantityInterval
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- CapacityQuantityInterval.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.type = "";
- if (message.type != null && message.hasOwnProperty("type"))
- object.type = message.type;
- if (message.minValue != null && message.hasOwnProperty("minValue")) {
- if (typeof message.minValue === "number")
- object.minValue = options.longs === String ? String(message.minValue) : message.minValue;
- else
- object.minValue = options.longs === String ? $util.Long.prototype.toString.call(message.minValue) : options.longs === Number ? new $util.LongBits(message.minValue.low >>> 0, message.minValue.high >>> 0).toNumber() : message.minValue;
- if (options.oneofs)
- object._minValue = "minValue";
- }
- if (message.maxValue != null && message.hasOwnProperty("maxValue")) {
- if (typeof message.maxValue === "number")
- object.maxValue = options.longs === String ? String(message.maxValue) : message.maxValue;
- else
- object.maxValue = options.longs === String ? $util.Long.prototype.toString.call(message.maxValue) : options.longs === Number ? new $util.LongBits(message.maxValue.low >>> 0, message.maxValue.high >>> 0).toNumber() : message.maxValue;
- if (options.oneofs)
- object._maxValue = "maxValue";
- }
- return object;
- };
-
- /**
- * Converts this CapacityQuantityInterval to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @instance
- * @returns {Object.} JSON object
- */
- CapacityQuantityInterval.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for CapacityQuantityInterval
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.CapacityQuantityInterval
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- CapacityQuantityInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.CapacityQuantityInterval";
- };
-
- return CapacityQuantityInterval;
- })();
-
- v1.DistanceLimit = (function() {
-
- /**
- * Properties of a DistanceLimit.
- * @memberof google.cloud.optimization.v1
- * @interface IDistanceLimit
- * @property {number|Long|null} [maxMeters] DistanceLimit maxMeters
- * @property {number|Long|null} [softMaxMeters] DistanceLimit softMaxMeters
- * @property {number|null} [costPerKilometerBelowSoftMax] DistanceLimit costPerKilometerBelowSoftMax
- * @property {number|null} [costPerKilometerAboveSoftMax] DistanceLimit costPerKilometerAboveSoftMax
- */
-
- /**
- * Constructs a new DistanceLimit.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a DistanceLimit.
- * @implements IDistanceLimit
- * @constructor
- * @param {google.cloud.optimization.v1.IDistanceLimit=} [properties] Properties to set
- */
- function DistanceLimit(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]];
- }
-
- /**
- * DistanceLimit maxMeters.
- * @member {number|Long|null|undefined} maxMeters
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @instance
- */
- DistanceLimit.prototype.maxMeters = null;
-
- /**
- * DistanceLimit softMaxMeters.
- * @member {number|Long|null|undefined} softMaxMeters
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @instance
- */
- DistanceLimit.prototype.softMaxMeters = null;
-
- /**
- * DistanceLimit costPerKilometerBelowSoftMax.
- * @member {number|null|undefined} costPerKilometerBelowSoftMax
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @instance
- */
- DistanceLimit.prototype.costPerKilometerBelowSoftMax = null;
-
- /**
- * DistanceLimit costPerKilometerAboveSoftMax.
- * @member {number|null|undefined} costPerKilometerAboveSoftMax
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @instance
- */
- DistanceLimit.prototype.costPerKilometerAboveSoftMax = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * DistanceLimit _maxMeters.
- * @member {"maxMeters"|undefined} _maxMeters
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @instance
- */
- Object.defineProperty(DistanceLimit.prototype, "_maxMeters", {
- get: $util.oneOfGetter($oneOfFields = ["maxMeters"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * DistanceLimit _softMaxMeters.
- * @member {"softMaxMeters"|undefined} _softMaxMeters
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @instance
- */
- Object.defineProperty(DistanceLimit.prototype, "_softMaxMeters", {
- get: $util.oneOfGetter($oneOfFields = ["softMaxMeters"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * DistanceLimit _costPerKilometerBelowSoftMax.
- * @member {"costPerKilometerBelowSoftMax"|undefined} _costPerKilometerBelowSoftMax
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @instance
- */
- Object.defineProperty(DistanceLimit.prototype, "_costPerKilometerBelowSoftMax", {
- get: $util.oneOfGetter($oneOfFields = ["costPerKilometerBelowSoftMax"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * DistanceLimit _costPerKilometerAboveSoftMax.
- * @member {"costPerKilometerAboveSoftMax"|undefined} _costPerKilometerAboveSoftMax
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @instance
- */
- Object.defineProperty(DistanceLimit.prototype, "_costPerKilometerAboveSoftMax", {
- get: $util.oneOfGetter($oneOfFields = ["costPerKilometerAboveSoftMax"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new DistanceLimit instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @static
- * @param {google.cloud.optimization.v1.IDistanceLimit=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.DistanceLimit} DistanceLimit instance
- */
- DistanceLimit.create = function create(properties) {
- return new DistanceLimit(properties);
- };
-
- /**
- * Encodes the specified DistanceLimit message. Does not implicitly {@link google.cloud.optimization.v1.DistanceLimit.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @static
- * @param {google.cloud.optimization.v1.IDistanceLimit} message DistanceLimit message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DistanceLimit.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.maxMeters != null && Object.hasOwnProperty.call(message, "maxMeters"))
- writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxMeters);
- if (message.softMaxMeters != null && Object.hasOwnProperty.call(message, "softMaxMeters"))
- writer.uint32(/* id 2, wireType 0 =*/16).int64(message.softMaxMeters);
- if (message.costPerKilometerAboveSoftMax != null && Object.hasOwnProperty.call(message, "costPerKilometerAboveSoftMax"))
- writer.uint32(/* id 3, wireType 1 =*/25).double(message.costPerKilometerAboveSoftMax);
- if (message.costPerKilometerBelowSoftMax != null && Object.hasOwnProperty.call(message, "costPerKilometerBelowSoftMax"))
- writer.uint32(/* id 4, wireType 1 =*/33).double(message.costPerKilometerBelowSoftMax);
- return writer;
- };
-
- /**
- * Encodes the specified DistanceLimit message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.DistanceLimit.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @static
- * @param {google.cloud.optimization.v1.IDistanceLimit} message DistanceLimit message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- DistanceLimit.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a DistanceLimit message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.DistanceLimit} DistanceLimit
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DistanceLimit.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.optimization.v1.DistanceLimit();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.maxMeters = reader.int64();
- break;
- }
- case 2: {
- message.softMaxMeters = reader.int64();
- break;
- }
- case 4: {
- message.costPerKilometerBelowSoftMax = reader.double();
- break;
- }
- case 3: {
- message.costPerKilometerAboveSoftMax = reader.double();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a DistanceLimit message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.DistanceLimit} DistanceLimit
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- DistanceLimit.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a DistanceLimit message.
- * @function verify
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- DistanceLimit.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.maxMeters != null && message.hasOwnProperty("maxMeters")) {
- properties._maxMeters = 1;
- if (!$util.isInteger(message.maxMeters) && !(message.maxMeters && $util.isInteger(message.maxMeters.low) && $util.isInteger(message.maxMeters.high)))
- return "maxMeters: integer|Long expected";
- }
- if (message.softMaxMeters != null && message.hasOwnProperty("softMaxMeters")) {
- properties._softMaxMeters = 1;
- if (!$util.isInteger(message.softMaxMeters) && !(message.softMaxMeters && $util.isInteger(message.softMaxMeters.low) && $util.isInteger(message.softMaxMeters.high)))
- return "softMaxMeters: integer|Long expected";
- }
- if (message.costPerKilometerBelowSoftMax != null && message.hasOwnProperty("costPerKilometerBelowSoftMax")) {
- properties._costPerKilometerBelowSoftMax = 1;
- if (typeof message.costPerKilometerBelowSoftMax !== "number")
- return "costPerKilometerBelowSoftMax: number expected";
- }
- if (message.costPerKilometerAboveSoftMax != null && message.hasOwnProperty("costPerKilometerAboveSoftMax")) {
- properties._costPerKilometerAboveSoftMax = 1;
- if (typeof message.costPerKilometerAboveSoftMax !== "number")
- return "costPerKilometerAboveSoftMax: number expected";
- }
- return null;
- };
-
- /**
- * Creates a DistanceLimit message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.DistanceLimit} DistanceLimit
- */
- DistanceLimit.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.DistanceLimit)
- return object;
- var message = new $root.google.cloud.optimization.v1.DistanceLimit();
- if (object.maxMeters != null)
- if ($util.Long)
- (message.maxMeters = $util.Long.fromValue(object.maxMeters)).unsigned = false;
- else if (typeof object.maxMeters === "string")
- message.maxMeters = parseInt(object.maxMeters, 10);
- else if (typeof object.maxMeters === "number")
- message.maxMeters = object.maxMeters;
- else if (typeof object.maxMeters === "object")
- message.maxMeters = new $util.LongBits(object.maxMeters.low >>> 0, object.maxMeters.high >>> 0).toNumber();
- if (object.softMaxMeters != null)
- if ($util.Long)
- (message.softMaxMeters = $util.Long.fromValue(object.softMaxMeters)).unsigned = false;
- else if (typeof object.softMaxMeters === "string")
- message.softMaxMeters = parseInt(object.softMaxMeters, 10);
- else if (typeof object.softMaxMeters === "number")
- message.softMaxMeters = object.softMaxMeters;
- else if (typeof object.softMaxMeters === "object")
- message.softMaxMeters = new $util.LongBits(object.softMaxMeters.low >>> 0, object.softMaxMeters.high >>> 0).toNumber();
- if (object.costPerKilometerBelowSoftMax != null)
- message.costPerKilometerBelowSoftMax = Number(object.costPerKilometerBelowSoftMax);
- if (object.costPerKilometerAboveSoftMax != null)
- message.costPerKilometerAboveSoftMax = Number(object.costPerKilometerAboveSoftMax);
- return message;
- };
-
- /**
- * Creates a plain object from a DistanceLimit message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @static
- * @param {google.cloud.optimization.v1.DistanceLimit} message DistanceLimit
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- DistanceLimit.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (message.maxMeters != null && message.hasOwnProperty("maxMeters")) {
- if (typeof message.maxMeters === "number")
- object.maxMeters = options.longs === String ? String(message.maxMeters) : message.maxMeters;
- else
- object.maxMeters = options.longs === String ? $util.Long.prototype.toString.call(message.maxMeters) : options.longs === Number ? new $util.LongBits(message.maxMeters.low >>> 0, message.maxMeters.high >>> 0).toNumber() : message.maxMeters;
- if (options.oneofs)
- object._maxMeters = "maxMeters";
- }
- if (message.softMaxMeters != null && message.hasOwnProperty("softMaxMeters")) {
- if (typeof message.softMaxMeters === "number")
- object.softMaxMeters = options.longs === String ? String(message.softMaxMeters) : message.softMaxMeters;
- else
- object.softMaxMeters = options.longs === String ? $util.Long.prototype.toString.call(message.softMaxMeters) : options.longs === Number ? new $util.LongBits(message.softMaxMeters.low >>> 0, message.softMaxMeters.high >>> 0).toNumber() : message.softMaxMeters;
- if (options.oneofs)
- object._softMaxMeters = "softMaxMeters";
- }
- if (message.costPerKilometerAboveSoftMax != null && message.hasOwnProperty("costPerKilometerAboveSoftMax")) {
- object.costPerKilometerAboveSoftMax = options.json && !isFinite(message.costPerKilometerAboveSoftMax) ? String(message.costPerKilometerAboveSoftMax) : message.costPerKilometerAboveSoftMax;
- if (options.oneofs)
- object._costPerKilometerAboveSoftMax = "costPerKilometerAboveSoftMax";
- }
- if (message.costPerKilometerBelowSoftMax != null && message.hasOwnProperty("costPerKilometerBelowSoftMax")) {
- object.costPerKilometerBelowSoftMax = options.json && !isFinite(message.costPerKilometerBelowSoftMax) ? String(message.costPerKilometerBelowSoftMax) : message.costPerKilometerBelowSoftMax;
- if (options.oneofs)
- object._costPerKilometerBelowSoftMax = "costPerKilometerBelowSoftMax";
- }
- return object;
- };
-
- /**
- * Converts this DistanceLimit to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @instance
- * @returns {Object.} JSON object
- */
- DistanceLimit.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for DistanceLimit
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.DistanceLimit
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- DistanceLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.DistanceLimit";
- };
-
- return DistanceLimit;
- })();
-
- v1.TransitionAttributes = (function() {
-
- /**
- * Properties of a TransitionAttributes.
- * @memberof google.cloud.optimization.v1
- * @interface ITransitionAttributes
- * @property {string|null} [srcTag] TransitionAttributes srcTag
- * @property {string|null} [excludedSrcTag] TransitionAttributes excludedSrcTag
- * @property {string|null} [dstTag] TransitionAttributes dstTag
- * @property {string|null} [excludedDstTag] TransitionAttributes excludedDstTag
- * @property {number|null} [cost] TransitionAttributes cost
- * @property {number|null} [costPerKilometer] TransitionAttributes costPerKilometer
- * @property {google.cloud.optimization.v1.IDistanceLimit|null} [distanceLimit] TransitionAttributes distanceLimit
- * @property {google.protobuf.IDuration|null} [delay] TransitionAttributes delay
- */
-
- /**
- * Constructs a new TransitionAttributes.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a TransitionAttributes.
- * @implements ITransitionAttributes
- * @constructor
- * @param {google.cloud.optimization.v1.ITransitionAttributes=} [properties] Properties to set
- */
- function TransitionAttributes(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]];
- }
-
- /**
- * TransitionAttributes srcTag.
- * @member {string} srcTag
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @instance
- */
- TransitionAttributes.prototype.srcTag = "";
-
- /**
- * TransitionAttributes excludedSrcTag.
- * @member {string} excludedSrcTag
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @instance
- */
- TransitionAttributes.prototype.excludedSrcTag = "";
-
- /**
- * TransitionAttributes dstTag.
- * @member {string} dstTag
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @instance
- */
- TransitionAttributes.prototype.dstTag = "";
-
- /**
- * TransitionAttributes excludedDstTag.
- * @member {string} excludedDstTag
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @instance
- */
- TransitionAttributes.prototype.excludedDstTag = "";
-
- /**
- * TransitionAttributes cost.
- * @member {number} cost
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @instance
- */
- TransitionAttributes.prototype.cost = 0;
-
- /**
- * TransitionAttributes costPerKilometer.
- * @member {number} costPerKilometer
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @instance
- */
- TransitionAttributes.prototype.costPerKilometer = 0;
-
- /**
- * TransitionAttributes distanceLimit.
- * @member {google.cloud.optimization.v1.IDistanceLimit|null|undefined} distanceLimit
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @instance
- */
- TransitionAttributes.prototype.distanceLimit = null;
-
- /**
- * TransitionAttributes delay.
- * @member {google.protobuf.IDuration|null|undefined} delay
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @instance
- */
- TransitionAttributes.prototype.delay = null;
-
- /**
- * Creates a new TransitionAttributes instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @static
- * @param {google.cloud.optimization.v1.ITransitionAttributes=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.TransitionAttributes} TransitionAttributes instance
- */
- TransitionAttributes.create = function create(properties) {
- return new TransitionAttributes(properties);
- };
-
- /**
- * Encodes the specified TransitionAttributes message. Does not implicitly {@link google.cloud.optimization.v1.TransitionAttributes.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @static
- * @param {google.cloud.optimization.v1.ITransitionAttributes} message TransitionAttributes message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- TransitionAttributes.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.srcTag != null && Object.hasOwnProperty.call(message, "srcTag"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.srcTag);
- if (message.excludedSrcTag != null && Object.hasOwnProperty.call(message, "excludedSrcTag"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.excludedSrcTag);
- if (message.dstTag != null && Object.hasOwnProperty.call(message, "dstTag"))
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.dstTag);
- if (message.excludedDstTag != null && Object.hasOwnProperty.call(message, "excludedDstTag"))
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.excludedDstTag);
- if (message.cost != null && Object.hasOwnProperty.call(message, "cost"))
- writer.uint32(/* id 5, wireType 1 =*/41).double(message.cost);
- if (message.costPerKilometer != null && Object.hasOwnProperty.call(message, "costPerKilometer"))
- writer.uint32(/* id 6, wireType 1 =*/49).double(message.costPerKilometer);
- if (message.distanceLimit != null && Object.hasOwnProperty.call(message, "distanceLimit"))
- $root.google.cloud.optimization.v1.DistanceLimit.encode(message.distanceLimit, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
- if (message.delay != null && Object.hasOwnProperty.call(message, "delay"))
- $root.google.protobuf.Duration.encode(message.delay, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
- return writer;
- };
-
- /**
- * Encodes the specified TransitionAttributes message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.TransitionAttributes.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @static
- * @param {google.cloud.optimization.v1.ITransitionAttributes} message TransitionAttributes message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- TransitionAttributes.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a TransitionAttributes message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.TransitionAttributes} TransitionAttributes
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- TransitionAttributes.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.optimization.v1.TransitionAttributes();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.srcTag = reader.string();
- break;
- }
- case 2: {
- message.excludedSrcTag = reader.string();
- break;
- }
- case 3: {
- message.dstTag = reader.string();
- break;
- }
- case 4: {
- message.excludedDstTag = reader.string();
- break;
- }
- case 5: {
- message.cost = reader.double();
- break;
- }
- case 6: {
- message.costPerKilometer = reader.double();
- break;
- }
- case 7: {
- message.distanceLimit = $root.google.cloud.optimization.v1.DistanceLimit.decode(reader, reader.uint32());
- break;
- }
- case 8: {
- message.delay = $root.google.protobuf.Duration.decode(reader, reader.uint32());
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a TransitionAttributes message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.TransitionAttributes} TransitionAttributes
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- TransitionAttributes.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a TransitionAttributes message.
- * @function verify
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- TransitionAttributes.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.srcTag != null && message.hasOwnProperty("srcTag"))
- if (!$util.isString(message.srcTag))
- return "srcTag: string expected";
- if (message.excludedSrcTag != null && message.hasOwnProperty("excludedSrcTag"))
- if (!$util.isString(message.excludedSrcTag))
- return "excludedSrcTag: string expected";
- if (message.dstTag != null && message.hasOwnProperty("dstTag"))
- if (!$util.isString(message.dstTag))
- return "dstTag: string expected";
- if (message.excludedDstTag != null && message.hasOwnProperty("excludedDstTag"))
- if (!$util.isString(message.excludedDstTag))
- return "excludedDstTag: string expected";
- if (message.cost != null && message.hasOwnProperty("cost"))
- if (typeof message.cost !== "number")
- return "cost: number expected";
- if (message.costPerKilometer != null && message.hasOwnProperty("costPerKilometer"))
- if (typeof message.costPerKilometer !== "number")
- return "costPerKilometer: number expected";
- if (message.distanceLimit != null && message.hasOwnProperty("distanceLimit")) {
- var error = $root.google.cloud.optimization.v1.DistanceLimit.verify(message.distanceLimit);
- if (error)
- return "distanceLimit." + error;
- }
- if (message.delay != null && message.hasOwnProperty("delay")) {
- var error = $root.google.protobuf.Duration.verify(message.delay);
- if (error)
- return "delay." + error;
- }
- return null;
- };
-
- /**
- * Creates a TransitionAttributes message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.TransitionAttributes} TransitionAttributes
- */
- TransitionAttributes.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.TransitionAttributes)
- return object;
- var message = new $root.google.cloud.optimization.v1.TransitionAttributes();
- if (object.srcTag != null)
- message.srcTag = String(object.srcTag);
- if (object.excludedSrcTag != null)
- message.excludedSrcTag = String(object.excludedSrcTag);
- if (object.dstTag != null)
- message.dstTag = String(object.dstTag);
- if (object.excludedDstTag != null)
- message.excludedDstTag = String(object.excludedDstTag);
- if (object.cost != null)
- message.cost = Number(object.cost);
- if (object.costPerKilometer != null)
- message.costPerKilometer = Number(object.costPerKilometer);
- if (object.distanceLimit != null) {
- if (typeof object.distanceLimit !== "object")
- throw TypeError(".google.cloud.optimization.v1.TransitionAttributes.distanceLimit: object expected");
- message.distanceLimit = $root.google.cloud.optimization.v1.DistanceLimit.fromObject(object.distanceLimit);
- }
- if (object.delay != null) {
- if (typeof object.delay !== "object")
- throw TypeError(".google.cloud.optimization.v1.TransitionAttributes.delay: object expected");
- message.delay = $root.google.protobuf.Duration.fromObject(object.delay);
- }
- return message;
- };
-
- /**
- * Creates a plain object from a TransitionAttributes message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @static
- * @param {google.cloud.optimization.v1.TransitionAttributes} message TransitionAttributes
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- TransitionAttributes.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.srcTag = "";
- object.excludedSrcTag = "";
- object.dstTag = "";
- object.excludedDstTag = "";
- object.cost = 0;
- object.costPerKilometer = 0;
- object.distanceLimit = null;
- object.delay = null;
- }
- if (message.srcTag != null && message.hasOwnProperty("srcTag"))
- object.srcTag = message.srcTag;
- if (message.excludedSrcTag != null && message.hasOwnProperty("excludedSrcTag"))
- object.excludedSrcTag = message.excludedSrcTag;
- if (message.dstTag != null && message.hasOwnProperty("dstTag"))
- object.dstTag = message.dstTag;
- if (message.excludedDstTag != null && message.hasOwnProperty("excludedDstTag"))
- object.excludedDstTag = message.excludedDstTag;
- if (message.cost != null && message.hasOwnProperty("cost"))
- object.cost = options.json && !isFinite(message.cost) ? String(message.cost) : message.cost;
- if (message.costPerKilometer != null && message.hasOwnProperty("costPerKilometer"))
- object.costPerKilometer = options.json && !isFinite(message.costPerKilometer) ? String(message.costPerKilometer) : message.costPerKilometer;
- if (message.distanceLimit != null && message.hasOwnProperty("distanceLimit"))
- object.distanceLimit = $root.google.cloud.optimization.v1.DistanceLimit.toObject(message.distanceLimit, options);
- if (message.delay != null && message.hasOwnProperty("delay"))
- object.delay = $root.google.protobuf.Duration.toObject(message.delay, options);
- return object;
- };
-
- /**
- * Converts this TransitionAttributes to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @instance
- * @returns {Object.} JSON object
- */
- TransitionAttributes.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for TransitionAttributes
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.TransitionAttributes
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- TransitionAttributes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.TransitionAttributes";
- };
-
- return TransitionAttributes;
- })();
-
- v1.Waypoint = (function() {
-
- /**
- * Properties of a Waypoint.
- * @memberof google.cloud.optimization.v1
- * @interface IWaypoint
- * @property {google.cloud.optimization.v1.ILocation|null} [location] Waypoint location
- * @property {string|null} [placeId] Waypoint placeId
- * @property {boolean|null} [sideOfRoad] Waypoint sideOfRoad
- */
-
- /**
- * Constructs a new Waypoint.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a Waypoint.
- * @implements IWaypoint
- * @constructor
- * @param {google.cloud.optimization.v1.IWaypoint=} [properties] Properties to set
- */
- function Waypoint(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]];
- }
-
- /**
- * Waypoint location.
- * @member {google.cloud.optimization.v1.ILocation|null|undefined} location
- * @memberof google.cloud.optimization.v1.Waypoint
- * @instance
- */
- Waypoint.prototype.location = null;
-
- /**
- * Waypoint placeId.
- * @member {string|null|undefined} placeId
- * @memberof google.cloud.optimization.v1.Waypoint
- * @instance
- */
- Waypoint.prototype.placeId = null;
-
- /**
- * Waypoint sideOfRoad.
- * @member {boolean} sideOfRoad
- * @memberof google.cloud.optimization.v1.Waypoint
- * @instance
- */
- Waypoint.prototype.sideOfRoad = false;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * Waypoint locationType.
- * @member {"location"|"placeId"|undefined} locationType
- * @memberof google.cloud.optimization.v1.Waypoint
- * @instance
- */
- Object.defineProperty(Waypoint.prototype, "locationType", {
- get: $util.oneOfGetter($oneOfFields = ["location", "placeId"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new Waypoint instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.Waypoint
- * @static
- * @param {google.cloud.optimization.v1.IWaypoint=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.Waypoint} Waypoint instance
- */
- Waypoint.create = function create(properties) {
- return new Waypoint(properties);
- };
-
- /**
- * Encodes the specified Waypoint message. Does not implicitly {@link google.cloud.optimization.v1.Waypoint.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.Waypoint
- * @static
- * @param {google.cloud.optimization.v1.IWaypoint} message Waypoint message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Waypoint.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.location != null && Object.hasOwnProperty.call(message, "location"))
- $root.google.cloud.optimization.v1.Location.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.placeId != null && Object.hasOwnProperty.call(message, "placeId"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.placeId);
- if (message.sideOfRoad != null && Object.hasOwnProperty.call(message, "sideOfRoad"))
- writer.uint32(/* id 3, wireType 0 =*/24).bool(message.sideOfRoad);
- return writer;
- };
-
- /**
- * Encodes the specified Waypoint message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Waypoint.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.Waypoint
- * @static
- * @param {google.cloud.optimization.v1.IWaypoint} message Waypoint message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Waypoint.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a Waypoint message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.Waypoint
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.Waypoint} Waypoint
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Waypoint.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.optimization.v1.Waypoint();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.location = $root.google.cloud.optimization.v1.Location.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.placeId = reader.string();
- break;
- }
- case 3: {
- message.sideOfRoad = reader.bool();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a Waypoint message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.Waypoint
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.Waypoint} Waypoint
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Waypoint.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a Waypoint message.
- * @function verify
- * @memberof google.cloud.optimization.v1.Waypoint
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Waypoint.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.location != null && message.hasOwnProperty("location")) {
- properties.locationType = 1;
- {
- var error = $root.google.cloud.optimization.v1.Location.verify(message.location);
- if (error)
- return "location." + error;
- }
- }
- if (message.placeId != null && message.hasOwnProperty("placeId")) {
- if (properties.locationType === 1)
- return "locationType: multiple values";
- properties.locationType = 1;
- if (!$util.isString(message.placeId))
- return "placeId: string expected";
- }
- if (message.sideOfRoad != null && message.hasOwnProperty("sideOfRoad"))
- if (typeof message.sideOfRoad !== "boolean")
- return "sideOfRoad: boolean expected";
- return null;
- };
-
- /**
- * Creates a Waypoint message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.Waypoint
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.Waypoint} Waypoint
- */
- Waypoint.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.Waypoint)
- return object;
- var message = new $root.google.cloud.optimization.v1.Waypoint();
- if (object.location != null) {
- if (typeof object.location !== "object")
- throw TypeError(".google.cloud.optimization.v1.Waypoint.location: object expected");
- message.location = $root.google.cloud.optimization.v1.Location.fromObject(object.location);
- }
- if (object.placeId != null)
- message.placeId = String(object.placeId);
- if (object.sideOfRoad != null)
- message.sideOfRoad = Boolean(object.sideOfRoad);
- return message;
- };
-
- /**
- * Creates a plain object from a Waypoint message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.Waypoint
- * @static
- * @param {google.cloud.optimization.v1.Waypoint} message Waypoint
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Waypoint.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.sideOfRoad = false;
- if (message.location != null && message.hasOwnProperty("location")) {
- object.location = $root.google.cloud.optimization.v1.Location.toObject(message.location, options);
- if (options.oneofs)
- object.locationType = "location";
- }
- if (message.placeId != null && message.hasOwnProperty("placeId")) {
- object.placeId = message.placeId;
- if (options.oneofs)
- object.locationType = "placeId";
- }
- if (message.sideOfRoad != null && message.hasOwnProperty("sideOfRoad"))
- object.sideOfRoad = message.sideOfRoad;
- return object;
- };
-
- /**
- * Converts this Waypoint to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.Waypoint
- * @instance
- * @returns {Object.} JSON object
- */
- Waypoint.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for Waypoint
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.Waypoint
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Waypoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.Waypoint";
- };
-
- return Waypoint;
- })();
-
- v1.Location = (function() {
-
- /**
- * Properties of a Location.
- * @memberof google.cloud.optimization.v1
- * @interface ILocation
- * @property {google.type.ILatLng|null} [latLng] Location latLng
- * @property {number|null} [heading] Location heading
- */
-
- /**
- * Constructs a new Location.
- * @memberof google.cloud.optimization.v1
- * @classdesc Represents a Location.
- * @implements ILocation
- * @constructor
- * @param {google.cloud.optimization.v1.ILocation=} [properties] Properties to set
- */
- function Location(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]];
- }
-
- /**
- * Location latLng.
- * @member {google.type.ILatLng|null|undefined} latLng
- * @memberof google.cloud.optimization.v1.Location
- * @instance
- */
- Location.prototype.latLng = null;
-
- /**
- * Location heading.
- * @member {number|null|undefined} heading
- * @memberof google.cloud.optimization.v1.Location
- * @instance
- */
- Location.prototype.heading = null;
-
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
-
- /**
- * Location _heading.
- * @member {"heading"|undefined} _heading
- * @memberof google.cloud.optimization.v1.Location
- * @instance
- */
- Object.defineProperty(Location.prototype, "_heading", {
- get: $util.oneOfGetter($oneOfFields = ["heading"]),
- set: $util.oneOfSetter($oneOfFields)
- });
-
- /**
- * Creates a new Location instance using the specified properties.
- * @function create
- * @memberof google.cloud.optimization.v1.Location
- * @static
- * @param {google.cloud.optimization.v1.ILocation=} [properties] Properties to set
- * @returns {google.cloud.optimization.v1.Location} Location instance
- */
- Location.create = function create(properties) {
- return new Location(properties);
- };
-
- /**
- * Encodes the specified Location message. Does not implicitly {@link google.cloud.optimization.v1.Location.verify|verify} messages.
- * @function encode
- * @memberof google.cloud.optimization.v1.Location
- * @static
- * @param {google.cloud.optimization.v1.ILocation} message Location message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Location.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.latLng != null && Object.hasOwnProperty.call(message, "latLng"))
- $root.google.type.LatLng.encode(message.latLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.heading != null && Object.hasOwnProperty.call(message, "heading"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.heading);
- return writer;
- };
-
- /**
- * Encodes the specified Location message, length delimited. Does not implicitly {@link google.cloud.optimization.v1.Location.verify|verify} messages.
- * @function encodeDelimited
- * @memberof google.cloud.optimization.v1.Location
- * @static
- * @param {google.cloud.optimization.v1.ILocation} message Location message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- Location.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
-
- /**
- * Decodes a Location message from the specified reader or buffer.
- * @function decode
- * @memberof google.cloud.optimization.v1.Location
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {google.cloud.optimization.v1.Location} Location
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Location.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.optimization.v1.Location();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- message.latLng = $root.google.type.LatLng.decode(reader, reader.uint32());
- break;
- }
- case 2: {
- message.heading = reader.int32();
- break;
- }
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
-
- /**
- * Decodes a Location message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof google.cloud.optimization.v1.Location
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {google.cloud.optimization.v1.Location} Location
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- Location.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
-
- /**
- * Verifies a Location message.
- * @function verify
- * @memberof google.cloud.optimization.v1.Location
- * @static
- * @param {Object.} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- Location.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.latLng != null && message.hasOwnProperty("latLng")) {
- var error = $root.google.type.LatLng.verify(message.latLng);
- if (error)
- return "latLng." + error;
- }
- if (message.heading != null && message.hasOwnProperty("heading")) {
- properties._heading = 1;
- if (!$util.isInteger(message.heading))
- return "heading: integer expected";
- }
- return null;
- };
-
- /**
- * Creates a Location message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof google.cloud.optimization.v1.Location
- * @static
- * @param {Object.} object Plain object
- * @returns {google.cloud.optimization.v1.Location} Location
- */
- Location.fromObject = function fromObject(object) {
- if (object instanceof $root.google.cloud.optimization.v1.Location)
- return object;
- var message = new $root.google.cloud.optimization.v1.Location();
- if (object.latLng != null) {
- if (typeof object.latLng !== "object")
- throw TypeError(".google.cloud.optimization.v1.Location.latLng: object expected");
- message.latLng = $root.google.type.LatLng.fromObject(object.latLng);
- }
- if (object.heading != null)
- message.heading = object.heading | 0;
- return message;
- };
-
- /**
- * Creates a plain object from a Location message. Also converts values to other types if specified.
- * @function toObject
- * @memberof google.cloud.optimization.v1.Location
- * @static
- * @param {google.cloud.optimization.v1.Location} message Location
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.} Plain object
- */
- Location.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.latLng = null;
- if (message.latLng != null && message.hasOwnProperty("latLng"))
- object.latLng = $root.google.type.LatLng.toObject(message.latLng, options);
- if (message.heading != null && message.hasOwnProperty("heading")) {
- object.heading = message.heading;
- if (options.oneofs)
- object._heading = "heading";
- }
- return object;
- };
-
- /**
- * Converts this Location to JSON.
- * @function toJSON
- * @memberof google.cloud.optimization.v1.Location
- * @instance
- * @returns {Object.} JSON object
- */
- Location.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
-
- /**
- * Gets the default type url for Location
- * @function getTypeUrl
- * @memberof google.cloud.optimization.v1.Location
- * @static
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
- * @returns {string} The default type url
- */
- Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
- if (typeUrlPrefix === undefined) {
- typeUrlPrefix = "type.googleapis.com";
- }
- return typeUrlPrefix + "/google.cloud.optimization.v1.Location";
- };
-
- return Location;
- })();
-
- v1.BreakRule = (function() {
-
- /**
- * Properties of a BreakRule.
- * @memberof google.cloud.optimization.v1
- * @interface IBreakRule
- * @property {Array.|null} [breakRequests] BreakRule breakRequests
- * @property {Array.