diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c4d4042 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,68 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + - release + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + verify: + name: verify (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: Set up Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: npm ci + + - name: Typecheck + run: npm run typecheck + + - name: Test + run: npm test + + - name: Build extension and webviews + run: npm run build + + - name: Package universal VSIX + run: npm run package:vsix + + - name: Verify packaged VSIX + run: node scripts/verify-universal-vsix.mjs + + - name: Audit production dependencies + run: npm audit --omit=dev --audit-level=low + + - name: Upload VSIX + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v4 + with: + name: atomic-sherpa-vsix + path: releases/*.vsix + if-no-files-found: error diff --git a/.gitignore b/.gitignore index a708b8e..98cfe18 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ assets/ AGENTS.md features.md /.atomic + +!vendor/nodeatomic/dist/ +!vendor/nodeatomic/dist/** diff --git a/.vault/intents/01M6PC7K2SDM98K150VEA727WJ/intent.md b/.vault/intents/01M6PC7K2SDM98K150VEA727WJ/intent.md new file mode 100644 index 0000000..8783888 --- /dev/null +++ b/.vault/intents/01M6PC7K2SDM98K150VEA727WJ/intent.md @@ -0,0 +1,79 @@ +--- +author: bradley +created_by: bradley +goals: [] +id: CATA::bradley::32 +kind: chore +priority: medium +project: CATA +seq: 32 +status: needs-review +title: Make Atomic Sherpa 1.0.0 production ready +uid: 01M6PC7K2SDM98K150VEA727WJ +view: dev +entry_type: intent +content_hash: EYEI2YOCKBJRBLHF2JJVR7NSMTREVNINVDENKLCWVHDFYXYSTXEQ +created_at: 2026-11-05T17:31:32.785585+00:00 +updated_at: 2026-11-05T17:31:32.785585+00:00 +--- +:::why +Atomic Sherpa 1.0.0 is the first public release. It must build from a clean checkout without a sibling nodeatomic repository, ship no known production dependency vulnerabilities, expose complete release metadata, and verify typecheck, tests, build, universal VSIX packaging, and audit in CI on macOS, Linux, and Windows. +::: + +:::acceptance-criterion{#01M6PC7K2SDM98K150VEA727WJ-ac-1 status=met verifiedBy="npm ci; npm run ci:verify; npm audit --omit=dev; Bun-built Node PDF smoke; installed VSIX manifest check" evidence="npm ci passed; typecheck, 213 tests, build, universal 1.0.0 VSIX packaging and archive verification passed; production audit reports 0 vulnerabilities; Puppeteer 25 PDF export produced /tmp/sherpa-1.0.0-export.pdf; installed VSIX is 1.0.0 with sherpaIntent/sherpaAtomic namespaces."} +The repository installs and builds from a clean checkout using the vendored nodeatomic consumer; the production dependency audit reports zero vulnerabilities; package.json declares version 1.0.0, no private flag, repository/homepage/bugs metadata, and the atomicdotdev publisher. +::: + +:::acceptance-criterion{#01M6PC7K2SDM98K150VEA727WJ-ac-2 status=met verifiedBy="npm ci; npm run ci:verify; npm audit --omit=dev; Bun-built Node PDF smoke; installed VSIX manifest check" evidence="npm ci passed; typecheck, 213 tests, build, universal 1.0.0 VSIX packaging and archive verification passed; production audit reports 0 vulnerabilities; Puppeteer 25 PDF export produced /tmp/sherpa-1.0.0-export.pdf; installed VSIX is 1.0.0 with sherpaIntent/sherpaAtomic namespaces."} +The CI workflow runs typecheck, tests, build, universal VSIX packaging, archive verification, and production audit on macOS, Linux, and Windows; the generated 1.0.0 VSIX contains no stale Puppeteer runtime, native payload, vendor directory, or pinned platform target. +::: + +:::acceptance-criterion{#01M6PC7K2SDM98K150VEA727WJ-ac-3 status=met verifiedBy="npm ci; npm run ci:verify; npm audit --omit=dev; Bun-built Node PDF smoke; installed VSIX manifest check" evidence="npm ci passed; typecheck, 213 tests, build, universal 1.0.0 VSIX packaging and archive verification passed; production audit reports 0 vulnerabilities; Puppeteer 25 PDF export produced /tmp/sherpa-1.0.0-export.pdf; installed VSIX is 1.0.0 with sherpaIntent/sherpaAtomic namespaces."} +PDF export still works through the Puppeteer 25 ESM runtime, and the installed VSIX exposes the Sherpa command/setting/editor namespaces. +::: + +:::task{#01M6PC7K2SDM98K150VEA727WJ-1 status=done criteria=01M6PC7K2SDM98K150VEA727WJ-ac-1} +Upgrade and audit production dependencies, remove unused gRPC packages, and adapt the PDF runtime to Puppeteer 25 ESM. +::file-ref{path=package.json} +::file-ref{path=package-lock.json} +::file-ref{path=src/export/puppeteerRuntime.mts} +::file-ref{path=src/export/pdfRenderer.ts} +::file-ref{path=src/extension.ts} +::: + +:::task{#01M6PC7K2SDM98K150VEA727WJ-2 status=done criteria=01M6PC7K2SDM98K150VEA727WJ-ac-1} +Vendor nodeatomic so a clean checkout can install and build without a sibling repository. +::file-ref{path=vendor/nodeatomic} +::file-ref{path=.gitignore} +::file-ref{path=.vscodeignore} +::file-ref{path=scripts/build-nodeatomic.mjs} +::: + +:::task{#01M6PC7K2SDM98K150VEA727WJ-3 status=done criteria=01M6PC7K2SDM98K150VEA727WJ-ac-2} +Add cross-platform build scripts and CI for typecheck, tests, build, packaging, and audit. +::file-ref{path=scripts/build-webview.mjs} +::file-ref{path=scripts/build-graph.mjs} +::file-ref{path=scripts/clean-dist.mjs} +::file-ref{path=.github/workflows/ci.yml} +::: + +:::task{#01M6PC7K2SDM98K150VEA727WJ-4 status=done criteria=01M6PC7K2SDM98K150VEA727WJ-ac-2} +Finalize 1.0.0 metadata, changelog, README, and security policy. +::file-ref{path=package.json} +::file-ref{path=CHANGELOG.md} +::file-ref{path=README.md} +::file-ref{path=SECURITY.md} +::file-ref{path=THIRD_PARTY_NOTICES.md} +::: + +:::scope-in +Production release hardening, reproducible clean builds, CI, dependency security, release metadata, and cross-platform packaging. +::: + +:::scope-out +No new editor features, no direct atomicd RPC dependency, and no Marketplace publication from CI. +::: + +:::constraint +Keep the extension a universal JavaScript-only VSIX; do not bundle native Atomic libraries or require a sibling checkout. +::: diff --git a/.vscodeignore b/.vscodeignore index aae8f2d..852b01f 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -32,3 +32,8 @@ features.md .github/** .vault/** examples/** + +vendor/** +tsconfig.json +flask.png +logo.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c27d2f..0db3621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ # Atomic Sherpa -## Unreleased +## 1.0.0 - 2026-11-05 - Rename the extension to Atomic Sherpa (`atomic-sherpa`) and use the backpack artwork as its icon. - Rename command, setting, and custom-editor IDs from `catalyst*` to `sherpa*` for the public release. +- Fix blast-radius hop counting, webview message validation, evidence refresh/state, SCM path isolation, oversized-blame handling, and export/editor regressions from review intents 1–14. +- Remove inherited Git editor integration; Atomic remains the SCM provider. +- Add Atomic push, pull, insert-view, and add-remote commands through the installed Atomic CLI. +- Upgrade vulnerable production dependencies (markdown-it, mermaid, sanitize-html, katex, Puppeteer, cspell, highlight.js, Shiki) and remove unused gRPC packages; `npm audit --omit=dev` is clean. +- Load Puppeteer 25 as an ESM runtime and make webview/graph build steps cross-platform. +- Add CI for typecheck, tests, build, universal VSIX packaging, and production audit; set the public `atomicdotdev` publisher metadata and 1.0.0 version. ## 0.2.12 - Package one universal, JavaScript-only VSIX; Atomic's platform library is supplied by the separate Atomic installation on the extension host. diff --git a/README.md b/README.md index 06002dc..3d9314c 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ There is no daemon startup, socket, direct database access, or webview native ac ## Develop and package -Build requirements: Node.js 22+/npm (for VSCE 4), Bun, a VS Code-compatible editor, and a **previously built universal nodeatomic JavaScript consumer**. The current development dependency is `file:../nodeatomic`; build that project independently using its README first. Its compiled codecs/fingerprint are bundled, so the resulting VSIX does not need that checkout. Atomic Sherpa never builds Rust or searches for Atomic producer sources. Building/packaging does not require a native library unless an explicit runtime override requests the native smoke. +Build requirements: Node.js 22+/npm (for VSCE 4), Bun, and a VS Code-compatible editor. The universal nodeatomic JavaScript consumer and its generated codecs are vendored at `vendor/nodeatomic` from revision `6e50338c1d450cef8463113198d95c61e431a0b9`, so a clean checkout builds without a sibling repository. Refresh that directory from the nodeatomic producer when its descriptor or runtime loader changes. Its compiled codecs/fingerprint are bundled, so the resulting VSIX does not need the vendor directory. Atomic Sherpa never builds Rust or searches for Atomic producer sources. Building/packaging does not require a native library unless an explicit runtime override requests the native smoke. ```sh npm ci @@ -124,8 +124,8 @@ The presentation parser never serializes the whole Markdown or YAML document. Fi Atomic CLI generation, JSON-LD lifting, SHACL validation, signing, and verification are not reimplemented. The version control panel and evidence inspector use the backend consumers; CLI-based intent workflows, signing, and ticket attestation badges remain separate work. -Full VS Code save/recovery and external CLI synchronization testing is still required. CodeMirror normalizes line endings internally, so exact CRLF round trips through the entire editor are not yet guaranteed, although targeted edit helpers preserve CRLF. +Platform-specific VS Code/Electron host smoke testing remains a release checklist; CI covers Node-level integration, typecheck, tests, build, and universal VSIX packaging on macOS, Linux, and Windows. CodeMirror normalizes line endings internally, so exact CRLF round trips through the entire editor are not yet guaranteed, although targeted edit helpers preserve CRLF. -**Local development build, not production-ready:** the inherited dependency tree reports 22 advisories, including one critical. Review `npm audit` and harden dependencies before distribution. `sherpa-local` is a local publisher placeholder, not a registered Marketplace identity. +**Production build:** production dependencies audit clean (`npm audit --omit=dev`); the publisher is `atomicdotdev`. CI runs typecheck, tests, build, packaging, and production audit on every pull request and release branch. Upstream revision and attribution are documented in `docs/UPSTREAM.md`; the upstream README is retained in `docs/MEO-README.md`. The original MIT `LICENSE` is retained unchanged. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..af6219b --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,26 @@ +# Security policy + +## Supported versions + +Atomic Sherpa 1.x receives security fixes. Pre-1.0 builds are unsupported. + +## Reporting a vulnerability + +Report vulnerabilities through a private GitHub security advisory: + +https://github.com/atomicdotdev/sherpa-vscode/security/advisories/new + +Do not open a public issue for an unpatched vulnerability. Include the affected +version, platform, reproduction steps, and any relevant extension-host or Atomic +runtime logs. Do not include private repository contents, identities, or tokens. + +## Dependency policy + +Production dependencies must pass: + +```sh +npm audit --omit=dev +``` + +CI enforces this on every pull request and release branch. Development-only +advisories are tracked separately and do not ship in the VSIX. diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 24f6db5..fe9c433 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -33,3 +33,14 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +## nodeatomic + +The bundled `dist/nodeatomic/index.mjs` consumer is generated from +[`atomicdotdev/nodeatomic`](https://github.com/atomicdotdev/nodeatomic), revision +`6e50338c1d450cef8463113198d95c61e431a0b9`. The vendored build under +`vendor/nodeatomic` is used only at build time and is excluded from the VSIX. + +nodeatomic is licensed under MIT OR Apache-2.0. The repository MIT license is in +`LICENSE`; the Apache-2.0 text is in `THIRD_PARTY_APACHE_LICENSE.txt`. diff --git a/package-lock.json b/package-lock.json index ebc9ab5..5b74e38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "atomic-sherpa", - "version": "0.2.12", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "atomic-sherpa", - "version": "0.2.12", + "version": "1.0.0", "license": "MIT", "dependencies": { "@codemirror/commands": "6.8.1", @@ -25,29 +25,27 @@ "@codemirror/search": "6.6.0", "@codemirror/state": "6.5.2", "@codemirror/view": "6.36.4", - "@grpc/grpc-js": "^1.14.6", - "@grpc/proto-loader": "^0.8.1", - "@lezer/highlight": "^1.2.3", - "@replit/codemirror-vim": "^6.3.0", + "@lezer/highlight": "^1.2.5", + "@replit/codemirror-vim": "^6.4.0", "@types/vscode": "^1.109.0", - "cspell-lib": "^10.0.1", + "cspell-lib": "^10.4.0", "d3-drag": "3.0.0", "d3-force": "3.0.0", "d3-selection": "3.0.0", "d3-zoom": "3.0.0", - "highlight.js": "^11.11.1", - "katex": "^0.16.28", + "highlight.js": "^11.12.0", + "katex": "^0.19.1", "lucide": "^0.564.0", - "markdown-it": "^14.1.0", - "markdown-it-emoji": "^3.0.0", - "mermaid": "^11.4.1", - "nodeatomic": "file:../nodeatomic", - "puppeteer-core": "^24.1.1", + "markdown-it": "^14.3.3", + "markdown-it-emoji": "^3.1.0", + "mermaid": "^11.17.2", + "nodeatomic": "file:vendor/nodeatomic", + "puppeteer-core": "^25.16.0", "remark-directive": "^4.0.0", "remark-frontmatter": "^5.0.0", "remark-parse": "^11.0.0", - "sanitize-html": "^2.17.0", - "shiki": "^4.2.0", + "sanitize-html": "^2.18.1", + "shiki": "^4.6.0", "unified": "^11.0.5", "yaml": "^2.9.1" }, @@ -59,8 +57,8 @@ "@types/markdown-it": "^14.1.2", "@types/markdown-it-emoji": "^3.0.1", "@types/sanitize-html": "^2.16.0", - "@vscode/vsce": "^4.0.0", - "happy-dom": "^21.0.1", + "@vscode/vsce": "^4.1.0", + "happy-dom": "^21.0.4", "typescript": "^5.9.3" }, "engines": { @@ -69,6 +67,7 @@ }, "../nodeatomic": { "version": "0.1.0", + "extraneous": true, "license": "MIT OR Apache-2.0", "dependencies": { "protobufjs": "^8.8.1" @@ -282,45 +281,64 @@ "node": ">=0.8.0" } }, - "node_modules/@braintree/sanitize-url": { - "version": "7.1.2", - "license": "MIT" + "node_modules/@babel/helper-string-parser": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.13.tgz", + "integrity": "sha512-fWegr+WsEsiMVW4KUNdIIzzMTZSzNiqhy0//6+2MRi2d5NFNsL/AYwBQW8eBnRbTBVRnDVzjaJEUqKaCWjMMdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } }, - "node_modules/@chevrotain/cst-dts-gen": { - "version": "11.0.3", - "license": "Apache-2.0", - "dependencies": { - "@chevrotain/gast": "11.0.3", - "@chevrotain/types": "11.0.3", - "lodash-es": "4.17.21" + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@chevrotain/cst-dts-gen/node_modules/lodash-es": { - "version": "4.17.21", - "license": "MIT" + "node_modules/@babel/parser": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.13.tgz", + "integrity": "sha512-fJM50YYjlTiBhgdkGmC1tBpv+FMAyo4annf2X6Aks+0yRlaiVkYW/3f07xAfVVkYIoZ9fFZp+mEThUFnuybhkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.11" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } }, - "node_modules/@chevrotain/gast": { - "version": "11.0.3", - "license": "Apache-2.0", + "node_modules/@babel/types": { + "version": "7.29.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.11.tgz", + "integrity": "sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==", + "dev": true, + "license": "MIT", "dependencies": { - "@chevrotain/types": "11.0.3", - "lodash-es": "4.17.21" + "@babel/helper-string-parser": "^7.29.11", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@chevrotain/gast/node_modules/lodash-es": { - "version": "4.17.21", + "node_modules/@braintree/sanitize-url": { + "version": "7.1.2", "license": "MIT" }, - "node_modules/@chevrotain/regexp-to-ast": { - "version": "11.0.3", - "license": "Apache-2.0" - }, "node_modules/@chevrotain/types": { - "version": "11.0.3", - "license": "Apache-2.0" - }, - "node_modules/@chevrotain/utils": { - "version": "11.0.3", + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.1.2.tgz", + "integrity": "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==", "license": "Apache-2.0" }, "node_modules/@codemirror/autocomplete": { @@ -526,67 +544,67 @@ } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-10.0.1.tgz", - "integrity": "sha512-WvkSDNX4Uyyj/ZgbPO6L38iFNMfK1EqsH1FteRiI2qLz6QZMXRFrIt12OqiWIplzZDDaVpBH9FCJOPJll0fjCQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-10.4.0.tgz", + "integrity": "sha512-ey23dut7NdnOsQQinQhROFZUh4LvLhJnnZCiq7y+KXMngdqXnIAZuEnnwXk3IfdOX+tycDC8OuMssLXDJ3Fnxw==", "license": "MIT", "dependencies": { "@cspell/dict-ada": "^4.1.1", "@cspell/dict-al": "^1.1.1", "@cspell/dict-aws": "^4.0.17", - "@cspell/dict-bash": "^4.2.2", - "@cspell/dict-companies": "^3.2.11", - "@cspell/dict-cpp": "^7.0.2", + "@cspell/dict-bash": "^4.2.3", + "@cspell/dict-companies": "^3.2.13", + "@cspell/dict-cpp": "^7.1.3", "@cspell/dict-cryptocurrencies": "^5.0.5", "@cspell/dict-csharp": "^4.0.8", - "@cspell/dict-css": "^4.1.1", + "@cspell/dict-css": "^4.1.2", "@cspell/dict-dart": "^2.3.2", - "@cspell/dict-data-science": "^2.0.13", - "@cspell/dict-django": "^4.1.6", + "@cspell/dict-data-science": "^2.0.16", + "@cspell/dict-django": "^4.1.7", "@cspell/dict-docker": "^1.1.17", - "@cspell/dict-dotnet": "^5.0.13", + "@cspell/dict-dotnet": "^5.0.15", "@cspell/dict-elixir": "^4.0.8", - "@cspell/dict-en_us": "^4.4.33", - "@cspell/dict-en-common-misspellings": "^2.1.12", - "@cspell/dict-en-gb-mit": "^3.1.22", + "@cspell/dict-en_us": "^4.4.41", + "@cspell/dict-en-common-misspellings": "^2.2.5", + "@cspell/dict-en-gb-mit": "^3.1.30", "@cspell/dict-filetypes": "^3.0.18", "@cspell/dict-flutter": "^1.1.1", "@cspell/dict-fonts": "^4.0.6", "@cspell/dict-fsharp": "^1.1.1", "@cspell/dict-fullstack": "^3.2.9", - "@cspell/dict-gaming-terms": "^1.1.2", - "@cspell/dict-git": "^3.1.0", - "@cspell/dict-golang": "^6.0.26", + "@cspell/dict-gaming-terms": "^1.1.3", + "@cspell/dict-git": "^3.1.1", + "@cspell/dict-golang": "^6.0.29", "@cspell/dict-google": "^1.0.9", "@cspell/dict-haskell": "^4.0.6", - "@cspell/dict-html": "^4.0.15", + "@cspell/dict-html": "^4.0.16", "@cspell/dict-html-symbol-entities": "^4.0.5", "@cspell/dict-java": "^5.0.12", "@cspell/dict-julia": "^1.1.1", - "@cspell/dict-k8s": "^1.0.12", + "@cspell/dict-k8s": "^1.0.13", "@cspell/dict-kotlin": "^1.1.1", "@cspell/dict-latex": "^5.1.0", "@cspell/dict-lorem-ipsum": "^4.0.5", "@cspell/dict-lua": "^4.0.8", "@cspell/dict-makefile": "^1.0.5", - "@cspell/dict-markdown": "^2.0.16", - "@cspell/dict-monkeyc": "^1.0.12", + "@cspell/dict-markdown": "^2.0.18", + "@cspell/dict-monkeyc": "^1.1.2", "@cspell/dict-node": "^5.0.9", - "@cspell/dict-npm": "^5.2.38", - "@cspell/dict-php": "^4.1.1", - "@cspell/dict-powershell": "^5.0.15", - "@cspell/dict-public-licenses": "^2.0.16", - "@cspell/dict-python": "^4.2.26", + "@cspell/dict-npm": "^5.2.54", + "@cspell/dict-php": "^4.1.3", + "@cspell/dict-powershell": "^5.0.17", + "@cspell/dict-public-licenses": "^2.0.17", + "@cspell/dict-python": "^4.5.2", "@cspell/dict-r": "^2.1.1", - "@cspell/dict-ruby": "^5.1.1", + "@cspell/dict-ruby": "^5.1.4", "@cspell/dict-rust": "^4.1.2", - "@cspell/dict-scala": "^5.0.9", - "@cspell/dict-shell": "^1.1.2", - "@cspell/dict-software-terms": "^5.2.2", + "@cspell/dict-scala": "^5.0.11", + "@cspell/dict-shell": "^1.2.0", + "@cspell/dict-software-terms": "^5.4.8", "@cspell/dict-sql": "^2.2.1", "@cspell/dict-svelte": "^1.0.7", "@cspell/dict-swift": "^2.0.6", - "@cspell/dict-terraform": "^1.1.3", + "@cspell/dict-terraform": "^1.1.4", "@cspell/dict-typescript": "^3.2.3", "@cspell/dict-vue": "^3.0.5", "@cspell/dict-zig": "^1.0.0" @@ -596,27 +614,27 @@ } }, "node_modules/@cspell/cspell-performance-monitor": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-performance-monitor/-/cspell-performance-monitor-10.0.1.tgz", - "integrity": "sha512-9tVcHXwRnbazUv4WSG0h3MqV4+LgmLNgSALAQUflPPW0EMxTf7C4Dmv9cgxJyCEQrdnVKCr58nPPaahhz9LJUg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-performance-monitor/-/cspell-performance-monitor-10.4.0.tgz", + "integrity": "sha512-0hCqI8pR0waFKKOR3SZ4VtWddx7HZTr0v7MPCPG0IpaqMzzaibrXn9AtFCe+9T1+UDQrM109YKS+yr0c6xVvMQ==", "license": "MIT", "engines": { "node": ">=22.18.0" } }, "node_modules/@cspell/cspell-pipe": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-10.0.1.tgz", - "integrity": "sha512-HPeXMD9AZ3V/qPkvQaPcak+C7cJ2z7JTHN8smd6J8L2aThLRky2cHc2OyeaHPSHB7WA47b4z2n5u5nawZhv5VQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-10.4.0.tgz", + "integrity": "sha512-cXHgST9ySpECyiE5ZK7TcwBqrCb3h9X49j/lSDcWNAVp7GkwnPfcdylH+Zq/VfYMlHad24z8CNXd5H91O9DhEA==", "license": "MIT", "engines": { "node": ">=22.18.0" } }, "node_modules/@cspell/cspell-resolver": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-10.0.1.tgz", - "integrity": "sha512-PIzkZHD1fGUQx1XteK2d1iQ0Mzq/maYcoB4jkvAiiR6WqP3MWYNKFdI9z+R5pOq5KgMfW+5Ig1q0oSR6h8irlA==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-10.4.0.tgz", + "integrity": "sha512-uyI9qX8hagtcFtRTElYGXXyVhhnVxPBSf1Ltds9AlU9cktPOFYeTXQOfBR+Dpt9dCruzX29ZJbd3hR1i5yryZg==", "license": "MIT", "dependencies": { "global-directory": "^5.0.0" @@ -626,18 +644,18 @@ } }, "node_modules/@cspell/cspell-service-bus": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-10.0.1.tgz", - "integrity": "sha512-y6NcIGP2IdXaBL4PVH8vxsr7K27wzz3Ech87UtUtrDSXAiVEOvXgAIknEOUVp59rTlUE8Rn4IRURC6f/hgMyfw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-10.4.0.tgz", + "integrity": "sha512-IZzx+EWADkN5xbFrW+VS+JQ52+w5tWaZNxDgGa+0Mv79hks6wNa2Vcnce+9vGcBJYgA24VcuAfekI38tYzcDtw==", "license": "MIT", "engines": { "node": ">=22.18.0" } }, "node_modules/@cspell/cspell-types": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-10.0.1.tgz", - "integrity": "sha512-kLgLShnWADDVreKC63pBrWkcvxgZzFIfO34Jhx/SWfuOIA3cD8AXT+HjyuLfoGJ7mUb58hv2kUziKzEy4INb1w==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-10.4.0.tgz", + "integrity": "sha512-LTOrZcDSHj5BkeNSvimuV3AMF7gWjxzXUdQ7zYT/h/57/5flHuE6NPKSXS69ty8vJM0WrVh35L5aDxnCPfDzXA==", "license": "MIT", "engines": { "node": ">=22.18.0" @@ -671,15 +689,15 @@ } }, "node_modules/@cspell/dict-companies": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.2.11.tgz", - "integrity": "sha512-0cmafbcz2pTHXLd59eLR1gvDvN6aWAOM0+cIL4LLF9GX9yB2iKDNrKsvs4tJRqutoaTdwNFBbV0FYv+6iCtebQ==", + "version": "3.2.14", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.2.14.tgz", + "integrity": "sha512-3EeCXEjd6ocbKNEHsPHViHJrDduJsVo9ixr0EMrzUO6OVCXlLSCLosDUzeANQidu/u6WA1ln63uRJ9fAGAKHzw==", "license": "MIT" }, "node_modules/@cspell/dict-cpp": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-7.0.2.tgz", - "integrity": "sha512-dfbeERiVNeqmo/npivdR6rDiBCqZi3QtjH2Z0HFcXwpdj6i97dX1xaKyK2GUsO/p4u1TOv63Dmj5Vm48haDpuA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-7.2.0.tgz", + "integrity": "sha512-hxz+OyQKV96/Bk2JYGsDuSOheYA5gd8KybXnoZMMu/mhZPnwhPi+qiS0Kjc0gLNbXjJ6wbBuXIQWi1UWpQBU/g==", "license": "MIT" }, "node_modules/@cspell/dict-cryptocurrencies": { @@ -707,16 +725,16 @@ "license": "MIT" }, "node_modules/@cspell/dict-data-science": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.14.tgz", - "integrity": "sha512-jl6Ds4u5u5JT+yY30pWQpAbdCHfy3lCcNkLbpL/AZKoUaLEoXbaYsps9xQtvD7DyaiXxiLZkdH2yHHXtoFtZyg==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.17.tgz", + "integrity": "sha512-6KuM1tXc1PROGu2VJjRMIkFI3lf/1c3ReFqbjV148m5w8SwNVej4Jp6nJa2f64xyaR5Z+LSRTr5RvDDJVovP8A==", "license": "MIT" }, "node_modules/@cspell/dict-django": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-4.1.6.tgz", - "integrity": "sha512-SdbSFDGy9ulETqNz15oWv2+kpWLlk8DJYd573xhIkeRdcXOjskRuxjSZPKfW7O3NxN/KEf3gm3IevVOiNuFS+w==", - "license": "MIT" + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-4.1.7.tgz", + "integrity": "sha512-94LIxiF/StBTxDkmBhi1eoOX9D/B7gk6pabBvIZFh0gmREAU6ESqU2Wv/RfGARdueMQMPfOJka+vbtL4yKv0oA==", + "license": "WTFPL" }, "node_modules/@cspell/dict-docker": { "version": "1.1.17", @@ -725,9 +743,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-dotnet": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-5.0.13.tgz", - "integrity": "sha512-xPp7jMnFpOri7tzmqmm/dXMolXz1t2bhNqxYkOyMqXhvs08oc7BFs+EsbDY0X7hqiISgeFZGNqn0dOCr+ncPYw==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-5.0.15.tgz", + "integrity": "sha512-j2MUKPlzMeDy/mnb1EjmtkX8e6VzZdw60Qyf6vPlp7WZhUwwp2LBlKOWx7+hASjP6k4a0nDpmn77G+4upxvbZA==", "license": "MIT" }, "node_modules/@cspell/dict-elixir": { @@ -737,21 +755,21 @@ "license": "MIT" }, "node_modules/@cspell/dict-en_us": { - "version": "4.4.35", - "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.4.35.tgz", - "integrity": "sha512-xWpxBCc/FzzMMo/A+0qwARVaIIhR0Ql8yhhv4rvsvg+GfQF+LG9yzg2GwTM5N2rjvzmM3nKuR9zxFZq2I6fJSg==", + "version": "4.4.43", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.4.43.tgz", + "integrity": "sha512-RK0zfFXSPi0G/zmV9YgUhS2xw9eTV/8DtQ+ouLIiRZ8ejWRt2zhAonu5di+qmIhzhQ62fg7d3tMz3WwRy82yJA==", "license": "MIT" }, "node_modules/@cspell/dict-en-common-misspellings": { - "version": "2.1.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.1.12.tgz", - "integrity": "sha512-14Eu6QGqyksqOd4fYPuRb58lK1Va7FQK9XxFsRKnZU8LhL3N+kj7YKDW+7aIaAN/0WGEqslGP6lGbQzNti8Akw==", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.2.6.tgz", + "integrity": "sha512-RMOmCPOJuBfcC8IVLKjs9aqssjLKmhwVI8Yw/xgEnO9trWAiUzESassDATE229xqi1sdtRIIMGHyuxlkL75Xjg==", "license": "CC BY-SA 4.0" }, "node_modules/@cspell/dict-en-gb-mit": { - "version": "3.1.24", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb-mit/-/dict-en-gb-mit-3.1.24.tgz", - "integrity": "sha512-Oowb/Uzkh7OmDRdCcETzMc9imEb4IpLlHJXoYjX8A8DS2X/54gqSjI915JFB8hKtFjBko5OM0BLQ+6cZhFEMmQ==", + "version": "3.1.32", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb-mit/-/dict-en-gb-mit-3.1.32.tgz", + "integrity": "sha512-bEASyTAzXLowmFWrZIJjeAeCpY9g3jcYDO3tVyFDL/UaAuz0UvCVgOEyg+Ym7bclijqvXmj0xXOD/cW2XWG8iw==", "license": "MIT" }, "node_modules/@cspell/dict-filetypes": { @@ -785,21 +803,21 @@ "license": "MIT" }, "node_modules/@cspell/dict-gaming-terms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-gaming-terms/-/dict-gaming-terms-1.1.2.tgz", - "integrity": "sha512-9XnOvaoTBscq0xuD6KTEIkk9hhdfBkkvJAIsvw3JMcnp1214OCGW8+kako5RqQ2vTZR3Tnf3pc57o7VgkM0q1Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-gaming-terms/-/dict-gaming-terms-1.1.3.tgz", + "integrity": "sha512-hLGzd/f+KX5B/5YxAXuQi4DYEfu6IKudtNFO/Nima3JLXD+8Xn+d0q6VdaBxkWVhGYlzow9o+dce+S9mNtgpMg==", "license": "MIT" }, "node_modules/@cspell/dict-git": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-3.1.0.tgz", - "integrity": "sha512-KEt9zGkxqGy2q1nwH4CbyqTSv5nadpn8BAlDnzlRcnL0Xb3LX9xTgSGShKvzb0bw35lHoYyLWN2ZKAqbC4pgGQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-3.1.1.tgz", + "integrity": "sha512-XvuGVYj9YEu4EzntqyhH8XlTRyy57C6j8oxkIbUQfR2UYzxZGAP77XHl7qY7eC/40r/haDwnBaccyFR6BRmUCg==", "license": "MIT" }, "node_modules/@cspell/dict-golang": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.26.tgz", - "integrity": "sha512-YKA7Xm5KeOd14v5SQ4ll6afe9VSy3a2DWM7L9uBq4u3lXToRBQ1W5PRa+/Q9udd+DTURyVVnQ+7b9cnOlNxaRg==", + "version": "6.0.29", + "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.29.tgz", + "integrity": "sha512-EZCgfxrr5lPnYQLmSvB6YtpfoDFt2KKxAD4ppq2xGSIgDFXAF7Mv4doiXIFUQaynCBIEfAMl3f/uDfrIUo4fyQ==", "license": "MIT" }, "node_modules/@cspell/dict-google": { @@ -815,9 +833,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-html": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.15.tgz", - "integrity": "sha512-GJYnYKoD9fmo2OI0aySEGZOjThnx3upSUvV7mmqUu8oG+mGgzqm82P/f7OqsuvTaInZZwZbo+PwJQd/yHcyFIw==", + "version": "4.0.16", + "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.16.tgz", + "integrity": "sha512-9B6/Cpb5YVcYgsEAlKudun1yd4ONllYS/ZibKLYea2apPR+l2vQdARnPrP9kTqa7NUNfRKl7m9Fb6k9rjimnow==", "license": "MIT" }, "node_modules/@cspell/dict-html-symbol-entities": { @@ -839,9 +857,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-k8s": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.12.tgz", - "integrity": "sha512-2LcllTWgaTfYC7DmkMPOn9GsBWsA4DZdlun4po8s2ysTP7CPEnZc1ZfK6pZ2eI4TsZemlUQQ+NZxMe9/QutQxg==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.13.tgz", + "integrity": "sha512-ELGkS13k7K/NEfVimBSrxVTfqXvOF/Kvxj4I62YxRm8bvHbfoXgrGaOx28lPiNRz+dmu+yYtvuXbnURKtYbC6g==", "license": "MIT" }, "node_modules/@cspell/dict-kotlin": { @@ -875,21 +893,21 @@ "license": "MIT" }, "node_modules/@cspell/dict-markdown": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.17.tgz", - "integrity": "sha512-H8bAxih6U8NOnSPL7R8My+tqjaB4tmnJTjERuz4zYqmf+cH+5xshX3UVgKlwWFcyjsYfv/zEDuRdMctQv1q6HQ==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.18.tgz", + "integrity": "sha512-KLRSwVrwKDz4n7bl2XQjzvaBZbGgx5QKkP5Ok1b24xaO3TpXsLhAbAn1mItvFlI2tF6Rkt83iYjQcYppywuf5Q==", "license": "MIT", "peerDependencies": { "@cspell/dict-css": "^4.1.2", - "@cspell/dict-html": "^4.0.15", + "@cspell/dict-html": "^4.0.16", "@cspell/dict-html-symbol-entities": "^4.0.5", "@cspell/dict-typescript": "^3.2.3" } }, "node_modules/@cspell/dict-monkeyc": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-monkeyc/-/dict-monkeyc-1.0.12.tgz", - "integrity": "sha512-MN7Vs11TdP5mbdNFQP5x2Ac8zOBm97ARg6zM5Sb53YQt/eMvXOMvrep7+/+8NJXs0jkp70bBzjqU4APcqBFNAw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-monkeyc/-/dict-monkeyc-1.1.2.tgz", + "integrity": "sha512-4VzwdSUVqyUVmAKAzMkVwVa7AkvSi1l1OHdQr58MWq4VR4NQDO8sVQSibd2PMxruXTkxJt9UwVQVHgaaVTiV1Q==", "license": "MIT" }, "node_modules/@cspell/dict-node": { @@ -899,36 +917,36 @@ "license": "MIT" }, "node_modules/@cspell/dict-npm": { - "version": "5.2.41", - "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.41.tgz", - "integrity": "sha512-To3xsfRmMBYVXtWVEdUgV35M9a/JZ54dSuoY6m6D3uHKKL3I326Wmy4xifZ3PU8MQaWhyEH7zbIcUEtKwTQMcA==", + "version": "5.2.56", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.2.56.tgz", + "integrity": "sha512-VqN/f97X64gYR7zVXLu2PN6t5Sm6EljZEFp4htmbOL9tGqs0XVErl9B9kwfaLlKJqfLU6vYcupjRBjqTQ6rQ4Q==", "license": "MIT" }, "node_modules/@cspell/dict-php": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.1.1.tgz", - "integrity": "sha512-EXelI+4AftmdIGtA8HL8kr4WlUE11OqCSVlnIgZekmTkEGSZdYnkFdiJ5IANSALtlQ1mghKjz+OFqVs6yowgWA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.1.3.tgz", + "integrity": "sha512-41oKzl7rLVrrVZA/Gs0ESnP6KliEX7c+IwaaNmOL3PAoHasFDVEmIFeENIzuDdM12UcHT+MlLkAm3Qw/lS/ERA==", "license": "MIT" }, "node_modules/@cspell/dict-powershell": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-5.0.15.tgz", - "integrity": "sha512-l4S5PAcvCFcVDMJShrYD0X6Huv9dcsQPlsVsBGbH38wvuN7gS7+GxZFAjTNxDmTY1wrNi1cCatSg6Pu2BW4rgg==", + "version": "5.0.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-5.0.17.tgz", + "integrity": "sha512-khOoIdBgKRk2scnr7888pf70yJ1Tr3RGdnYcAN0MJ2vtaNRKoOTCFc13gXUkNDHwEyhMI1h9oz3KsT180F2amw==", "license": "MIT" }, "node_modules/@cspell/dict-public-licenses": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.16.tgz", - "integrity": "sha512-EQRrPvEOmwhwWezV+W7LjXbIBjiy6y/shrET6Qcpnk3XANTzfvWflf9PnJ5kId/oKWvihFy0za0AV1JHd03pSQ==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.17.tgz", + "integrity": "sha512-Asdumgg3oZ4ki//b2a+beiVIsNZA5thim4t4v3lTDLY/6a8VAPmTjzC3Y2t0x7ywC/bzAhi1KW/fg8JlwHDgig==", "license": "MIT" }, "node_modules/@cspell/dict-python": { - "version": "4.2.27", - "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.27.tgz", - "integrity": "sha512-Rj6xQgYS4X6ienjgAZF+njA0GRY4oSPouJWv0vfikCTn6EWlfk0V6Dy1HP3Migj1O+IC2NmespgVq+BZNSp8OA==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.5.3.tgz", + "integrity": "sha512-I226HEEJW4fleE0HMxRaecnzcJICFK6TOqIjqVkOJZzaVZTTjE7fojM+f5XECAwhf4BImW7HVOKMu4rMtza6ZA==", "license": "MIT", "dependencies": { - "@cspell/dict-data-science": "^2.0.14" + "@cspell/dict-data-science": "^2.0.17" } }, "node_modules/@cspell/dict-r": { @@ -938,9 +956,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-ruby": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.1.1.tgz", - "integrity": "sha512-LHrp84oEV6q1ZxPPyj4z+FdKyq1XAKYPtmGptrd+uwHbrF/Ns5+fy6gtSi7pS+uc0zk3JdO9w/tPK+8N1/7WUA==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.1.4.tgz", + "integrity": "sha512-Slw1dLY/pW5liJ5Fle+MIPphIdleZkIM6STDoXCN7sy298GfbfT34sJTcSZcXzZJVXiCEAvlLp+s1YNr6DuWNg==", "license": "MIT" }, "node_modules/@cspell/dict-rust": { @@ -950,9 +968,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-scala": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-5.0.9.tgz", - "integrity": "sha512-AjVcVAELgllybr1zk93CJ5wSUNu/Zb5kIubymR/GAYkMyBdYFCZ3Zbwn4Zz8GJlFFAbazABGOu0JPVbeY59vGg==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-5.0.11.tgz", + "integrity": "sha512-+D59847Y61KZ0MBoXJzBMtOXfFhezEb6ShjvJlL7bnryyy6iBwAfozbz7OJAe+KrEpYm+GlVV7Wy4FmJSgxBag==", "license": "MIT" }, "node_modules/@cspell/dict-shell": { @@ -962,9 +980,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-software-terms": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.2.2.tgz", - "integrity": "sha512-0CaYd6TAsKtEoA7tNswm1iptEblTzEe3UG8beG2cpSTHk7afWIVMtJLgXDv0f/Li67Lf3Z1Jf3JeXR7GsJ2TRw==", + "version": "5.4.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-5.4.9.tgz", + "integrity": "sha512-bB5L+OGW0F8Vt83j0XFcMEWCbCNqquLgjlQjm/iCp1jcYi/pQbqDLkXIPbINgbeG0vRqiu5yCPDFCsv4Qb6miQ==", "license": "MIT" }, "node_modules/@cspell/dict-sql": { @@ -986,9 +1004,9 @@ "license": "MIT" }, "node_modules/@cspell/dict-terraform": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.1.3.tgz", - "integrity": "sha512-gr6wxCydwSFyyBKhBA2xkENXtVFToheqYYGFvlMZXWjviynXmh+NK/JTvTCk/VHk3+lzbO9EEQKee6VjrAUSbA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.1.4.tgz", + "integrity": "sha512-Ere42ilvMFvQA4GlcN0OKlruMPR6EsvaB+iTHzj2xc+NJGRK64V7yApUcWrOrSgTiM/vhWXPIsK3OMfiAiNdmA==", "license": "MIT" }, "node_modules/@cspell/dict-typescript": { @@ -1010,12 +1028,12 @@ "license": "MIT" }, "node_modules/@cspell/dynamic-import": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-10.0.1.tgz", - "integrity": "sha512-mP1gdq00aIcH8HxNMqnH11X6BKxLcneDtFgl/ecjIKnaGKwi44m8AndP5Kr4ODaYdl8UUw9O3dJh7KaQXnLHZQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-10.4.0.tgz", + "integrity": "sha512-scSwtJDqpRT/Kqzo64XR8OWzXYfdpp9Yneq99Drhqm5gXXI2BAlgjzhBnMGKa+x7eIJZVM2+D2uFeDI2xQYM2w==", "license": "MIT", "dependencies": { - "@cspell/url": "10.0.1", + "@cspell/url": "10.4.0", "import-meta-resolve": "^4.2.0" }, "engines": { @@ -1023,72 +1041,41 @@ } }, "node_modules/@cspell/filetypes": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-10.0.1.tgz", - "integrity": "sha512-Z5S35giU5IW49fBBq6BksUbE8PC4IYPfaKuwl5Nl9jkf/OkAKiBmCowKX45NzRUQInwK/GSqqIUifrNeI6LdLw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-10.4.0.tgz", + "integrity": "sha512-ez0MyFxnpYN9eMkH8vGGseQPsCRwD7ZlsR+ivQ2rPx04CX7ctp015nWv71P7m+T6V05AsyAwyEGZP9vrTlB4Ig==", "license": "MIT", "engines": { "node": ">=22.18.0" } }, "node_modules/@cspell/rpc": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/rpc/-/rpc-10.0.1.tgz", - "integrity": "sha512-axSRKv3zEAmBm66iD/FV/MPmE4/Yf7c3PZiwTW894Yd3iEhtn3KPKeTrqQ2/tDrhB1Z2qTsap/Hue0MK4o5WXg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/rpc/-/rpc-10.4.0.tgz", + "integrity": "sha512-tX1YLQYPQz+p73U5OTLmOxIrsmRkpaaKrPnfrVIpK5yv3erWE8ELVZD0zK01rursbL1rW3gyOv0ShHlmoE5VNA==", "license": "MIT", "engines": { "node": ">=22.18.0" } }, "node_modules/@cspell/strong-weak-map": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-10.0.1.tgz", - "integrity": "sha512-lenN1DVyPi8nJLSMSJJ670ddTjyiruLueuSZO1qLcxBqUhgxDt/mALu9N/1m6WdOVcg6m/5cLiZVg2KOo2UzRw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-10.4.0.tgz", + "integrity": "sha512-y8+Hk90mA3UY4HYEWBJokvNcixQOKkRDLEr+yXSYyOJnt6MhAu8D7N567HjEVNj0e7oirXl62wpNglPfo7qAcQ==", "license": "MIT", "engines": { "node": ">=22.18.0" } }, "node_modules/@cspell/url": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@cspell/url/-/url-10.0.1.tgz", - "integrity": "sha512-abYYgI29wJhWIfWTYrYuzRYDcHQUQ1N5ylnhxYn1NJnIQMqUWGLbDmt12JABtZ+R6h6UNatQrS7rhP86etvJyQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-10.4.0.tgz", + "integrity": "sha512-8NvDv8h3eaxejAvD+crMsSEgGq6LiunfS6iD2TBAcDqskNsIpN43AMHNNRf7T7Fd/3Y413nQDBH4RmsHcNsiqg==", "license": "MIT", "engines": { "node": ">=22.18.0" } }, - "node_modules/@grpc/grpc-js": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.6.tgz", - "integrity": "sha512-SgC/B3/VZ8lTyOZ4Cwk6f1skWhmkNAaVfiX90qd5u1rRXGKk1//8FTUEN9GvOUq7rfWIqAYkA3CoyumYVpOS6g==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/proto-loader": "^0.8.0", - "@js-sdsl/ordered-map": "^4.4.2" - }, - "engines": { - "node": ">=12.10.0" - } - }, - "node_modules/@grpc/proto-loader": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.1.tgz", - "integrity": "sha512-wtF6h+DY6M3YaDBPAmvuuA6jV8Sif9MjtOI5euKFWRgCDl5PeDpPsHR9u2l6St5ceY8AZgoNDww5+HvEsXFsGg==", - "license": "Apache-2.0", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.5.5", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@iconify/types": { "version": "2.0.0", "license": "MIT" @@ -1102,14 +1089,17 @@ "mlly": "^1.8.0" } }, - "node_modules/@js-sdsl/ordered-map": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", - "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" + "node_modules/@jsdoc/salty": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.12.tgz", + "integrity": "sha512-TuB0x50EoAvEX/UEWITd8Mkn3WhiTjSvbTMCLj0BhsQEl5iUzjXdA0bETEVpTk+5TGTLR6QktI9H4hLviVeaAQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lodash": "^4.18.1" + }, + "engines": { + "node": ">=v12.0.0" } }, "node_modules/@lezer/common": { @@ -1146,7 +1136,9 @@ } }, "node_modules/@lezer/highlight": { - "version": "1.2.3", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.5.tgz", + "integrity": "sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==", "license": "MIT", "dependencies": { "@lezer/common": "^1.3.0" @@ -1230,10 +1222,12 @@ "license": "MIT" }, "node_modules/@mermaid-js/parser": { - "version": "0.6.3", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.2.1.tgz", + "integrity": "sha512-n12NohV3mrUyUL2o93IgG/ifeW9FTyeJn3zDxkhwa8MJ9Fxg3HQMlA3RiGmD/3UnJvheztkjjQAjA2T4LmUcpw==", "license": "MIT", "dependencies": { - "langium": "3.3.1" + "@chevrotain/types": "~11.1.2" } }, "node_modules/@napi-rs/keyring": { @@ -1483,85 +1477,42 @@ "node": ">= 10" } }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.5.tgz", - "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.1.tgz", - "integrity": "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.1.tgz", - "integrity": "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw==", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.2.tgz", - "integrity": "sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==", - "license": "BSD-3-Clause" - }, "node_modules/@puppeteer/browsers": { - "version": "2.13.0", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.2.6.tgz", + "integrity": "sha512-MJP29gVoHznmqmwhH1tlZqzfeQ3aylTpSSa6WKZXtkwYUH02i9imBmWGTyZrbnAou5paX78SE4jMAUqnEPf8ug==", "license": "Apache-2.0", "dependencies": { - "debug": "^4.4.3", - "extract-zip": "^2.0.1", - "progress": "^2.0.3", - "proxy-agent": "^6.5.0", - "semver": "^7.7.4", - "tar-fs": "^3.1.1", - "yargs": "^17.7.2" + "modern-tar": "^0.8.6", + "yargs": "^18.0.0" }, "bin": { - "browsers": "lib/cjs/main-cli.js" + "browsers": "lib/main-cli.js" }, "engines": { - "node": ">=18" + "node": ">=22.12.0" + }, + "peerDependencies": { + "proxy-agent": ">=8.0.1", + "yauzl": "^2.10.0 || ^3.4.0" + }, + "peerDependenciesMeta": { + "proxy-agent": { + "optional": true + }, + "yauzl": { + "optional": true + } } }, "node_modules/@replit/codemirror-vim": { - "version": "6.3.0", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@replit/codemirror-vim/-/codemirror-vim-6.4.0.tgz", + "integrity": "sha512-t9UMDNhkmeAkl0uRbiJVotv97bGD6mf4GyJJoEbrjUqa/Pov0s9eL+4AaI0Xto3OGri17i9qwIpT0JbVlVXt8A==", "license": "MIT", + "dependencies": { + "@replit/codemirror-vim-core": "^0.1.0" + }, "peerDependencies": { "@codemirror/commands": "6.x.x", "@codemirror/language": "6.x.x", @@ -1570,6 +1521,12 @@ "@codemirror/view": "6.x.x" } }, + "node_modules/@replit/codemirror-vim-core": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@replit/codemirror-vim-core/-/codemirror-vim-core-0.1.0.tgz", + "integrity": "sha512-1i6EBKpcNfDKvTmTh6N6g9lL6udD5t+uFNh4JCqozRnVlvUGOps7h/QzS2ne4zcvPUjvApKpmcP7Grc3fNbZiQ==", + "license": "MIT" + }, "node_modules/@secretlint/core": { "version": "10.2.2", "resolved": "https://registry.npmjs.org/@secretlint/core/-/core-10.2.2.tgz", @@ -1641,29 +1598,29 @@ } }, "node_modules/@shikijs/core": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.3.0.tgz", - "integrity": "sha512-EooU3i9F6IAE8kEu+AnGf9DFZWkQBZ+hJn3tLVbsH+61mtQiva5biai66fAA6nvFPXkLgvrh7BrR7YcJU83xQQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.6.0.tgz", + "integrity": "sha512-bfd4OKgvoyXYiYmMRuleA656P4V7M/Du9lcTl38Ngm6KszMj7bq4J1IGZwSYR4c95Tv5UQALtYNWUwaI9UT3xw==", "license": "MIT", "dependencies": { - "@shikijs/primitive": "4.3.0", - "@shikijs/types": "4.3.0", - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.4", - "hast-util-to-html": "^9.0.5" + "@shikijs/primitive": "4.6.0", + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0", + "@types/hast": "^3.0.5", + "hast-util-to-html": "^9.0.6" }, "engines": { "node": ">=20" } }, "node_modules/@shikijs/engine-javascript": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.3.0.tgz", - "integrity": "sha512-hTv/KiFf2tpiqlACPiztGGurEARWIutB8YUhcrA1pUC7VzzwKO+g5crUocrLztrZ5ro5Z4hbXg7bYclETn3gSQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.6.0.tgz", + "integrity": "sha512-K0oqxFoL+kEMdz89mHLFO15Tsbv3kFZ6WR1cXZKMvLSc+oqaM00A6pyga1qSeXB22dP0tTiSApRcGBaKWsEccg==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.3.0", - "@shikijs/vscode-textmate": "^10.0.2", + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0", "oniguruma-to-es": "^4.3.6" }, "engines": { @@ -1671,77 +1628,73 @@ } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.3.0.tgz", - "integrity": "sha512-1vMdN3gHfnKfLYwecUI2ITJI4RhHt96xEaJumVn7Heb0IlJ8WQMIH0Voak+2j22BpSNKdnOfB/pCTPnPm2gq7A==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.6.0.tgz", + "integrity": "sha512-aggd6Q7SuJOXNnsUbfG2XesxBJKBMAw/PDTUo9PyRjMaaJJ2dNrI+q0C+25ARXAK9yLHAlwxc9oRT2u68YKZ7w==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.3.0", - "@shikijs/vscode-textmate": "^10.0.2" + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0" }, "engines": { "node": ">=20" } }, "node_modules/@shikijs/langs": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.3.0.tgz", - "integrity": "sha512-rnlqFbBRSys9bT4gl/5rw9RnS0W/I84ZldXPkO7cvlEMoV85TyF/aU01N7/NbSR776RNLjrJKjfFUXJR6wN1Cg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.6.0.tgz", + "integrity": "sha512-1yMEX3oCVV54LUq/ovfpRkDQoYDkcvjSWFFa/YLUDMiSoRzMi2uxLJYbv41ahT8Lu9lFMaa7hecd3Q39trqUyg==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.3.0" + "@shikijs/types": "4.6.0" }, "engines": { "node": ">=20" } }, "node_modules/@shikijs/primitive": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.3.0.tgz", - "integrity": "sha512-CPkz64PTa5diRW1ggzMZH9VM/du4RNChYgVtgqrFcgruvIybmCvySv8GkiHSczUHXYuuR8TdKEwFx+UnZMpgdg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.6.0.tgz", + "integrity": "sha512-c54+TQEo9ToqgfL/AU8FpjnV09+GA9Oa7M5ROkkXteZfp5XzpAJGXjjvZQFQioJOwm/w/6Z3lIzQstAkl8coag==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.3.0", - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.4" + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0", + "@types/hast": "^3.0.5" }, "engines": { "node": ">=20" } }, "node_modules/@shikijs/themes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.3.0.tgz", - "integrity": "sha512-Avgt05YiT+Y3prjIc9lmQxhJzHBcCfR6cjiFW4OyaMBbt2A6trX5rfjUzx+Vj/mE9qpArYjatnqo9XPjQNW/AQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.6.0.tgz", + "integrity": "sha512-qHAVAs80RiGD+IRuH9G+JPDOEc9A/kHsng4EzCUCwB9bLzW6Z0y9WETh2YyCcADJBmfrIaJ1Jp7KBNP6FHkgtQ==", "license": "MIT", "dependencies": { - "@shikijs/types": "4.3.0" + "@shikijs/types": "4.6.0" }, "engines": { "node": ">=20" } }, "node_modules/@shikijs/types": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.3.0.tgz", - "integrity": "sha512-oc8b9U2SYvofKZk8e/737nIX0qwf6eV2vHFATeObAu7r+mUVpLs8Re0BmVkIjAWAYgkmG/CzLNo7rzuBzRu/wQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.6.0.tgz", + "integrity": "sha512-+ENG1adsKt/X7cRYw1Nl7BEpBmPOjmQ7bR/eGmHuMlT8gtOFf3KEi5l31DJYyAWhW6Y6bjP1plU7FmaxWGENFw==", "license": "MIT", "dependencies": { - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.4" + "@shikijs/vscode-textmate": "^10.1.0", + "@types/hast": "^3.0.5" }, "engines": { "node": ">=20" } }, "node_modules/@shikijs/vscode-textmate": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", - "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", - "license": "MIT" - }, - "node_modules/@tootallnate/quickjs-emscripten": { - "version": "0.23.0", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.1.0.tgz", + "integrity": "sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ==", "license": "MIT" }, "node_modules/@types/d3": { @@ -1957,9 +1910,9 @@ "license": "MIT" }, "node_modules/@types/hast": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", - "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz", + "integrity": "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==", "license": "MIT", "dependencies": { "@types/unist": "*" @@ -2017,6 +1970,7 @@ }, "node_modules/@types/node": { "version": "25.3.0", + "dev": true, "license": "MIT", "dependencies": { "undici-types": "~7.18.0" @@ -2032,6 +1986,8 @@ }, "node_modules/@types/trusted-types": { "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", "license": "MIT", "optional": true }, @@ -2062,14 +2018,6 @@ "@types/node": "*" } }, - "node_modules/@types/yauzl": { - "version": "2.10.3", - "license": "MIT", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@typespec/ts-http-runtime": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.9.tgz", @@ -2086,15 +2034,25 @@ } }, "node_modules/@ungap/structured-clone": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.2.tgz", - "integrity": "sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", + "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", "license": "ISC" }, + "node_modules/@upsetjs/venn.js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@upsetjs/venn.js/-/venn.js-2.0.0.tgz", + "integrity": "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==", + "license": "MIT", + "optionalDependencies": { + "d3-selection": "^3.0.0", + "d3-transition": "^3.0.1" + } + }, "node_modules/@vscode/vsce": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-4.0.0.tgz", - "integrity": "sha512-NImwuLaenMmb5D5Jer9/lzi/F9ZQUBOp8Azhj/BVYcTFgixv8KehFXqEUDjQlD2tAiw2E6dDGyjTuAB//di60A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-4.1.0.tgz", + "integrity": "sha512-iWNykEfLWTAU7FC2iBiE0vJvnJDpGm3GlL89dsBtRs62F+8tkPtq80Imi0QSFHjNBWu4QIdYII+3F9v/ZQRExw==", "dev": true, "license": "MIT", "dependencies": { @@ -2323,28 +2281,43 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/agent-base": { "version": "7.1.4", + "dev": true, "license": "MIT", "engines": { "node": ">= 14" } }, "node_modules/ansi-regex": { - "version": "5.0.1", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.5.0.tgz", + "integrity": "sha512-zhvbbbdt1kbw7EJ9OQoxmQcuaNR9P5kTj7e/YdmOSU10aHWbycofJxA6jKfoEy3vlLdctOF9ZHaxLtmSm998wQ==", "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { - "version": "4.3.0", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -2360,16 +2333,6 @@ "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", "license": "MIT" }, - "node_modules/ast-types": { - "version": "0.13.4", - "license": "MIT", - "dependencies": { - "tslib": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/azure-devops-node-api": { "version": "12.5.0", "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz", @@ -2381,18 +2344,6 @@ "typed-rest-client": "^1.8.4" } }, - "node_modules/b4a": { - "version": "1.8.0", - "license": "Apache-2.0", - "peerDependencies": { - "react-native-b4a": "*" - }, - "peerDependenciesMeta": { - "react-native-b4a": { - "optional": true - } - } - }, "node_modules/bail": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", @@ -2413,93 +2364,6 @@ "node": "18 || 20 || >=22" } }, - "node_modules/bare-events": { - "version": "2.8.2", - "license": "Apache-2.0", - "peerDependencies": { - "bare-abort-controller": "*" - }, - "peerDependenciesMeta": { - "bare-abort-controller": { - "optional": true - } - } - }, - "node_modules/bare-fs": { - "version": "4.5.4", - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "bare-events": "^2.5.4", - "bare-path": "^3.0.0", - "bare-stream": "^2.6.4", - "bare-url": "^2.2.2", - "fast-fifo": "^1.3.2" - }, - "engines": { - "bare": ">=1.16.0" - }, - "peerDependencies": { - "bare-buffer": "*" - }, - "peerDependenciesMeta": { - "bare-buffer": { - "optional": true - } - } - }, - "node_modules/bare-os": { - "version": "3.6.2", - "license": "Apache-2.0", - "optional": true, - "engines": { - "bare": ">=1.14.0" - } - }, - "node_modules/bare-path": { - "version": "3.0.0", - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "bare-os": "^3.0.1" - } - }, - "node_modules/bare-stream": { - "version": "2.8.0", - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "streamx": "^2.21.0", - "teex": "^1.0.1" - }, - "peerDependencies": { - "bare-buffer": "*", - "bare-events": "*" - }, - "peerDependenciesMeta": { - "bare-buffer": { - "optional": true - }, - "bare-events": { - "optional": true - } - } - }, - "node_modules/bare-url": { - "version": "2.3.2", - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "bare-path": "^3.0.0" - } - }, - "node_modules/basic-ftp": { - "version": "5.1.0", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/binaryextensions": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-6.11.0.tgz", @@ -2516,6 +2380,13 @@ "url": "https://bevry.me/fund" } }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true, + "license": "MIT" + }, "node_modules/boundary": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", @@ -2538,6 +2409,7 @@ }, "node_modules/buffer-crc32": { "version": "0.2.13", + "dev": true, "license": "MIT", "engines": { "node": "*" @@ -2610,6 +2482,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.15" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/ccount": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", @@ -2660,53 +2545,51 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/chevrotain": { - "version": "11.0.3", - "license": "Apache-2.0", - "dependencies": { - "@chevrotain/cst-dts-gen": "11.0.3", - "@chevrotain/gast": "11.0.3", - "@chevrotain/regexp-to-ast": "11.0.3", - "@chevrotain/types": "11.0.3", - "@chevrotain/utils": "11.0.3", - "lodash-es": "4.17.21" - } - }, - "node_modules/chevrotain-allstar": { - "version": "0.3.1", - "license": "MIT", - "dependencies": { - "lodash-es": "^4.17.21" - }, - "peerDependencies": { - "chevrotain": "^11.0.0" - } - }, - "node_modules/chevrotain/node_modules/lodash-es": { - "version": "4.17.21", - "license": "MIT" - }, "node_modules/chromium-bidi": { - "version": "14.0.0", + "version": "157.0.8090-0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-157.0.8090-0.tgz", + "integrity": "sha512-KJw7IQgqXwxpJgJlEIPg5mr2ZoqA+jkTRtc5EABI7sUJ3bu3cpI7NuEBoj4Gn1AsF78CaT9So5WQWspK3/wYag==", "license": "Apache-2.0", "dependencies": { "mitt": "^3.0.1", - "zod": "^3.24.1" + "zod": "^4.6.5" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0" }, "peerDependencies": { "devtools-protocol": "*" } }, "node_modules/cliui": { - "version": "8.0.1", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", "license": "ISC", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "engines": { - "node": ">=12" + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cockatiel": { @@ -2719,20 +2602,6 @@ "node": ">=16" } }, - "node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, "node_modules/comma-separated-tokens": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", @@ -2744,10 +2613,12 @@ } }, "node_modules/commander": { - "version": "8.3.0", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz", + "integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==", "license": "MIT", "engines": { - "node": ">= 12" + "node": ">=22.12.0" } }, "node_modules/comment-json": { @@ -2779,57 +2650,57 @@ "license": "MIT" }, "node_modules/cspell-config-lib": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-10.0.1.tgz", - "integrity": "sha512-hMpo/0j6k7pbiqrLDOLJKD2IGP9XwhjKf2miiM6p84Xeo4nyuFZaxxDCQ68R851HSYFrrdltgpoipMbj1h2Tnw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-10.4.0.tgz", + "integrity": "sha512-1P0xmWIlGqwsHf8he9BWNdqV2bvRBkxCv5ctj3oHBraRFS6CPjdJBptyjuM0dgTwxmxPFcuWhTG8miTvFMje5g==", "license": "MIT", "dependencies": { - "@cspell/cspell-types": "10.0.1", + "@cspell/cspell-types": "10.4.0", "comment-json": "^5.0.0", - "smol-toml": "^1.6.1", - "yaml": "^2.9.0" + "smol-toml": "^1.9.1", + "yaml": "^2.9.1" }, "engines": { "node": ">=22.18.0" } }, "node_modules/cspell-dictionary": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-10.0.1.tgz", - "integrity": "sha512-3cZ659vgsZWkzGQJR/sNqGDVt/OnvTSieLKI76V++4t1bHJfochb9ZrrwsuMsb1VPGiyqClUP1/O6WrefF/FVg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-10.4.0.tgz", + "integrity": "sha512-FwCQBzqOxjAg+GhymrY288As9DmJqHVrkAr++0tCQ1wWFVw2Nt1W3cCKn9W987Dr+giSuNREdQFpGbQ/cHluTg==", "license": "MIT", "dependencies": { - "@cspell/cspell-performance-monitor": "10.0.1", - "@cspell/cspell-pipe": "10.0.1", - "@cspell/cspell-types": "10.0.1", - "cspell-trie-lib": "10.0.1", - "fast-equals": "^6.0.0" + "@cspell/cspell-performance-monitor": "10.4.0", + "@cspell/cspell-pipe": "10.4.0", + "@cspell/cspell-types": "10.4.0", + "cspell-trie-lib": "10.4.0", + "fast-equals": "^6.1.1" }, "engines": { "node": ">=22.18.0" } }, "node_modules/cspell-glob": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-10.0.1.tgz", - "integrity": "sha512-7bII9J3aSSpZDwhx7w+zfQXbMxHZQ3be0ilUp5bHrsjz6o07v/NqOHMGcwKdPn1sw2dxDz9sv057xE5pqXnSdw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-10.4.0.tgz", + "integrity": "sha512-XnctlpRbhln7dTmJyISw7HdsXM38CW+S7Ygm5kkAEixSyceim8RJfRj2rhtofL7B6Ra6YdRmJnm2/PWDOIVzLw==", "license": "MIT", "dependencies": { - "@cspell/url": "10.0.1", - "picomatch": "^4.0.4" + "@cspell/url": "10.4.0", + "picomatch": "^4.0.7" }, "engines": { "node": ">=22.18.0" } }, "node_modules/cspell-grammar": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-10.0.1.tgz", - "integrity": "sha512-xC9AFYmaI9wsO//a7S5tdDGKGJVD5UEEsTg+Up2fi7lPfXIryisYmV6tePNL1SEg0idYss4ja8LUZ3Mib09BjQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-10.4.0.tgz", + "integrity": "sha512-zWxN9g0oh2tzJDM3C11prpsqF2nTw5AHpXtOslTm3D5d4ZL4BfBHRj5PFxbz3Px4fKz/KptPhxSP5yGDCNtjJg==", "license": "MIT", "dependencies": { - "@cspell/cspell-pipe": "10.0.1", - "@cspell/cspell-types": "10.0.1" + "@cspell/cspell-pipe": "10.4.0", + "@cspell/cspell-types": "10.4.0" }, "bin": { "cspell-grammar": "bin.mjs" @@ -2839,68 +2710,62 @@ } }, "node_modules/cspell-io": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-10.0.1.tgz", - "integrity": "sha512-8C2ka07faxflnaqEBO3pektS21XViE/SEHT7F5ZD1ou7FyMR5u3xawTBJSczClfsxLt/WYeztBYrpmGAjmjksw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-10.4.0.tgz", + "integrity": "sha512-EunMcHZbgA7PYj6172t2nPFVVWo0L7xi4awIhMay27c3vYGiA+ajowIBtIdy2MLOTSqL+XOfcjkuahXh8L8BzQ==", "license": "MIT", "dependencies": { - "@cspell/cspell-service-bus": "10.0.1", - "@cspell/url": "10.0.1" + "@cspell/cspell-service-bus": "10.4.0", + "@cspell/url": "10.4.0" }, "engines": { "node": ">=22.18.0" } }, "node_modules/cspell-lib": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-10.0.1.tgz", - "integrity": "sha512-RpsIPiLzc4/YMW8BMRKpyJ81x439qjYWcqgdKeXnMkbKM88J9PexzutfFf/4v97v96KzfNitEzMpbI0uj8OeUg==", - "license": "MIT", - "dependencies": { - "@cspell/cspell-bundled-dicts": "10.0.1", - "@cspell/cspell-performance-monitor": "10.0.1", - "@cspell/cspell-pipe": "10.0.1", - "@cspell/cspell-resolver": "10.0.1", - "@cspell/cspell-types": "10.0.1", - "@cspell/dynamic-import": "10.0.1", - "@cspell/filetypes": "10.0.1", - "@cspell/rpc": "10.0.1", - "@cspell/strong-weak-map": "10.0.1", - "@cspell/url": "10.0.1", - "cspell-config-lib": "10.0.1", - "cspell-dictionary": "10.0.1", - "cspell-glob": "10.0.1", - "cspell-grammar": "10.0.1", - "cspell-io": "10.0.1", - "cspell-trie-lib": "10.0.1", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-10.4.0.tgz", + "integrity": "sha512-wfqmn19pfEUjWy7UJ4xPeRwyb/LFXHxFVJ6maX87OLRuSE9fTP+cr74VANpKycd/rieuB2ffKta7l38n+Xhj/Q==", + "license": "MIT", + "dependencies": { + "@cspell/cspell-bundled-dicts": "10.4.0", + "@cspell/cspell-performance-monitor": "10.4.0", + "@cspell/cspell-pipe": "10.4.0", + "@cspell/cspell-resolver": "10.4.0", + "@cspell/cspell-types": "10.4.0", + "@cspell/dynamic-import": "10.4.0", + "@cspell/filetypes": "10.4.0", + "@cspell/rpc": "10.4.0", + "@cspell/strong-weak-map": "10.4.0", + "@cspell/url": "10.4.0", + "cspell-config-lib": "10.4.0", + "cspell-dictionary": "10.4.0", + "cspell-glob": "10.4.0", + "cspell-grammar": "10.4.0", + "cspell-io": "10.4.0", + "cspell-trie-lib": "10.4.0", "env-paths": "^4.0.0", "gensequence": "^8.0.8", - "import-fresh": "^4.0.0", + "import-fresh": "^4.0.1", "resolve-from": "^5.0.0", - "vscode-languageserver-textdocument": "^1.0.12", - "vscode-uri": "^3.1.0", + "vscode-languageserver-textdocument": "^1.0.15", + "vscode-uri": "^3.2.0", "xdg-basedir": "^5.1.0" }, "engines": { "node": ">=22.18.0" } }, - "node_modules/cspell-lib/node_modules/vscode-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", - "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", - "license": "MIT" - }, "node_modules/cspell-trie-lib": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-10.0.1.tgz", - "integrity": "sha512-BFvhalSkRQFjKrZ//FKK7fRGrZFpifnxB5AwCkzsIsBZqicsfafcQ1xP21qpb0QqyV/IomjNgviG+tRJs+0rMw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-10.4.0.tgz", + "integrity": "sha512-3APfmYOrYEcoiDjupm3JsxLWvqa6IbJ76CqUTuIgXQH2EK0nOJ5SRKSTNP6AplDtalCs0o6VllbiRX6S81g8yw==", "license": "MIT", "engines": { "node": ">=22.18.0" }, "peerDependencies": { - "@cspell/cspell-types": "10.0.1" + "@cspell/cspell-types": "10.4.0" } }, "node_modules/cytoscape": { @@ -2946,46 +2811,50 @@ "license": "MIT" }, "node_modules/d3": { - "version": "7.9.0", + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.2.tgz", + "integrity": "sha512-ZKb/mONPVKzaO5UlcWcwN8bS4ezvQaYu+bsou+XgNABdGC800kwH651ADTbbTxMPHW13UlvbQafdmJQDk1w7Mg==", "license": "ISC", "dependencies": { - "d3-array": "3", - "d3-axis": "3", - "d3-brush": "3", - "d3-chord": "3", - "d3-color": "3", - "d3-contour": "4", - "d3-delaunay": "6", - "d3-dispatch": "3", - "d3-drag": "3", - "d3-dsv": "3", - "d3-ease": "3", - "d3-fetch": "3", - "d3-force": "3", - "d3-format": "3", - "d3-geo": "3", - "d3-hierarchy": "3", - "d3-interpolate": "3", - "d3-path": "3", - "d3-polygon": "3", - "d3-quadtree": "3", - "d3-random": "3", - "d3-scale": "4", - "d3-scale-chromatic": "3", - "d3-selection": "3", - "d3-shape": "3", - "d3-time": "3", - "d3-time-format": "4", - "d3-timer": "3", - "d3-transition": "3", - "d3-zoom": "3" + "d3-array": "^3.2.5", + "d3-axis": "^3.0.1", + "d3-brush": "^3.0.1", + "d3-chord": "^3.0.2", + "d3-color": "^3.1.1", + "d3-contour": "^4.0.3", + "d3-delaunay": "^6.0.6", + "d3-dispatch": "^3.0.2", + "d3-drag": "^3.0.1", + "d3-dsv": "^3.0.2", + "d3-ease": "^3.0.2", + "d3-fetch": "^3.0.2", + "d3-force": "^3.0.1", + "d3-format": "^3.1.3", + "d3-geo": "^3.1.2", + "d3-hierarchy": "^3.1.3", + "d3-interpolate": "^3.0.2", + "d3-path": "^3.1.1", + "d3-polygon": "^3.0.2", + "d3-quadtree": "^3.0.2", + "d3-random": "^3.0.2", + "d3-scale": "^4.0.3", + "d3-scale-chromatic": "^3.1.1", + "d3-selection": "^3.0.1", + "d3-shape": "^3.2.1", + "d3-time": "^3.1.1", + "d3-time-format": "^4.1.1", + "d3-timer": "^3.0.2", + "d3-transition": "^3.0.2", + "d3-zoom": "^3.0.1" }, "engines": { "node": ">=12" } }, "node_modules/d3-array": { - "version": "3.2.4", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.5.tgz", + "integrity": "sha512-Th8qGXoBalmWsstpkuhmBuTsBQIFqYOJtjlBvNVvBfJ8E3uYusBUwUR8HU20U0qKKQkgCvKyR1YjiozWadk5QA==", "license": "ISC", "dependencies": { "internmap": "1 - 2" @@ -2995,14 +2864,18 @@ } }, "node_modules/d3-axis": { - "version": "3.0.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.1.tgz", + "integrity": "sha512-E5QCXfaf/uJZEHHiqoWRq+bQEm2PzoVFv2rDC7CZ3wwI0MjfMW3w83J3ubobG4IJj3lShAI5eiPJhOu/8wHofA==", "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/d3-brush": { - "version": "3.0.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.1.tgz", + "integrity": "sha512-L5Glqa/Gb7LU3ndIOMtA5mDzlJ0aXKp5ELP2X09ctWF23jO7+faIUVDbmaIi+D6k3EemXFWn1F3lkfguExoVhA==", "license": "ISC", "dependencies": { "d3-dispatch": "1 - 3", @@ -3016,7 +2889,9 @@ } }, "node_modules/d3-chord": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.2.tgz", + "integrity": "sha512-cGmADo5M2PTi3ewJZ2lcE32eURd4JmHtQ5JwRIUcas5L1SXqufG9yPyjWp8fW0gRi7aZi9bgbZPFZO1eyZ+1CQ==", "license": "ISC", "dependencies": { "d3-path": "1 - 3" @@ -3026,24 +2901,30 @@ } }, "node_modules/d3-color": { - "version": "3.1.0", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.1.tgz", + "integrity": "sha512-lfab8x0Bj0UO7SNsY8dZSbNIA6ipbkE3X0NG9nqjCu6CfCHZseuDnOSJY7hidKrjpP++i1M2qT+FlAdPKYRilA==", "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/d3-contour": { - "version": "4.0.2", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.3.tgz", + "integrity": "sha512-5DYURc8KwXPOhSUBblU0P9rVcArsSPxPOxsfO0Eud0s28oU0sB2e80aRHRL9AZW3usT8ikFKyIHpHHLNWLdRVA==", "license": "ISC", "dependencies": { - "d3-array": "^3.2.0" + "d3-array": "^3.2.4" }, "engines": { "node": ">=12" } }, "node_modules/d3-delaunay": { - "version": "6.0.4", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.6.tgz", + "integrity": "sha512-DMQIEvSJhZCB6pwedcXaAlQ+MeKU5LlM2XakKtc73b/VM+RBiI1SRXycOEOKg2jsKj4zZ9F0KGYG6nCGwwWu/g==", "license": "ISC", "dependencies": { "delaunator": "5" @@ -3053,7 +2934,9 @@ } }, "node_modules/d3-dispatch": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.2.tgz", + "integrity": "sha512-sAzH4Y4nsLo8eSqw5jKiZt+LU2wZmL/qS+OkxQGjhwazB/D7TY34R/QK1eshfGr7cZEKymKZ/Haem7m+lu98Sg==", "license": "ISC", "engines": { "node": ">=12" @@ -3073,7 +2956,9 @@ } }, "node_modules/d3-dsv": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.2.tgz", + "integrity": "sha512-FUnXhX7I4/AXyRCZzwfZTDGSq8PGZ4oR0tiCBqNGOZMsDrQ+6sIWNQnBzcCGhzJKZ6uCvCezTwflUqI209RRiQ==", "license": "ISC", "dependencies": { "commander": "7", @@ -3097,20 +2982,26 @@ }, "node_modules/d3-dsv/node_modules/commander": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "license": "MIT", "engines": { "node": ">= 10" } }, "node_modules/d3-ease": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-B5znKqRmKROAN4oHWQ50W/qisVjA9GXh2WMsVKdFVp4DxWmcrOsweqgUOUVsv5th96kwaZlokU6SlV4J3gak1w==", "license": "BSD-3-Clause", "engines": { "node": ">=12" } }, "node_modules/d3-fetch": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.2.tgz", + "integrity": "sha512-1wGF62bgjMRbF6mqbD+6rRWBL2hwWVYQjFO2UP3Wm1nIAvJZKaQxXM5caVY7athoCa8wIq9lCf7g44lPWFk50g==", "license": "ISC", "dependencies": { "d3-dsv": "1 - 3" @@ -3134,14 +3025,18 @@ } }, "node_modules/d3-format": { - "version": "3.1.2", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.3.tgz", + "integrity": "sha512-+F+/49swqmGuQJmSKnVMIDH/QkEFV5li9QRj0xm/KhyAUBv099O5PrvpQFxBp24PYph17Mnvt9mjKQV0ii0nMA==", "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/d3-geo": { - "version": "3.1.1", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.2.tgz", + "integrity": "sha512-5R8ZgDQorIxmauv7R6gpE/ndz+Z0qAZssigq0aXFdvPHdY41RqtW02jrRUQAL724NdPABYXo1+gQEGBBr7uKNg==", "license": "ISC", "dependencies": { "d3-array": "2.5.0 - 3" @@ -3151,14 +3046,18 @@ } }, "node_modules/d3-hierarchy": { - "version": "3.1.2", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.3.tgz", + "integrity": "sha512-GRajN5ZcnEwYFWqqdzhG1qJ3+fDg6WWzk47TJg7ePY7yvYAgRfD2r1mUx+wviBOWuCwamCUzjwMSdato43jbGA==", "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/d3-interpolate": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.2.tgz", + "integrity": "sha512-IRzGU62DtxhvsnSTWMQIdnoZ6gA+BCWwBon1EJI6SjoN595799b6z/QRBzXfFhE8iupUPp3042yBNo0STPqnzQ==", "license": "ISC", "dependencies": { "d3-color": "1 - 3" @@ -3168,28 +3067,36 @@ } }, "node_modules/d3-path": { - "version": "3.1.0", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-jsbgV8zIT38ReB9O7X7gcLndTQRONSqNNd+oGIaTBdUug4r5jFmp0N6RY9R5GWbdUDucn0qoTGyfjapT4tDhcg==", "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/d3-polygon": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.2.tgz", + "integrity": "sha512-WAUvPudGU1Dn4mDPfb6+JnnbeVEV53hG/BoT+bxts6AkZsOpTEiV1jHYX+2vtwCICNFG9Wxv8QS+eW1zE/Dwfg==", "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/d3-quadtree": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.2.tgz", + "integrity": "sha512-9Lu9mqJKRbIk0d6mKDjpvPURaPdwHVK5CYbcdd0/4vBgz4ldz/7TIOse3kNERsByGNfld58KEco507AztJWyTQ==", "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/d3-random": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.2.tgz", + "integrity": "sha512-PxJi9LNV+7mulaYO77nd+oGurXGL1fhedXjHnB3pWLUcqDnQtF4VASoqnQGHgoXLByVdv5QJ/2kfwkGn5HTS8g==", "license": "ISC", "engines": { "node": ">=12" @@ -3226,7 +3133,9 @@ "license": "BSD-3-Clause" }, "node_modules/d3-scale": { - "version": "4.0.2", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.3.tgz", + "integrity": "sha512-66cWobCNzcMvlfoaDHCxuIv9TBUWG1BLOWdv9kHHFuCr1JdqAWPvTmsaEYDD5NRMyWZ5+7u0GqiCDfMXMqh3hg==", "license": "ISC", "dependencies": { "d3-array": "2.10.0 - 3", @@ -3240,11 +3149,14 @@ } }, "node_modules/d3-scale-chromatic": { - "version": "3.1.0", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.1.tgz", + "integrity": "sha512-lA5gfN2yMvmChubmptnDiBfeGpHD7Yb1EbvCz0TZE0WHXhyR6W2allPuhKtzV5ILQRqeOdefF0qYtERReLUBDg==", "license": "ISC", "dependencies": { "d3-color": "1 - 3", - "d3-interpolate": "1 - 3" + "d3-interpolate": "1 - 3", + "d3-scale": "1 - 4" }, "engines": { "node": ">=12" @@ -3260,17 +3172,21 @@ } }, "node_modules/d3-shape": { - "version": "3.2.0", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.1.tgz", + "integrity": "sha512-dm2o+lbKdzg9tY7GEag/dB9hcbodLfwkE/DkvqbELJXaMz0yKzWWhZqhbI7CKubukA7HnRyz0avdtvi7EPxPvw==", "license": "ISC", "dependencies": { - "d3-path": "^3.1.0" + "d3-path": "^3.1.1" }, "engines": { "node": ">=12" } }, "node_modules/d3-time": { - "version": "3.1.0", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.1.tgz", + "integrity": "sha512-Ze7rjrhMzdeulh0/hjcfFj7XLAHOfowtEMfsoG6DU866HPynQNW7Wfen6hzXcqKTv8XzxvF6Hzr5XD6bMHr2ug==", "license": "ISC", "dependencies": { "d3-array": "2 - 3" @@ -3280,7 +3196,9 @@ } }, "node_modules/d3-time-format": { - "version": "4.1.0", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.1.tgz", + "integrity": "sha512-22XaqjyCjpqgda20erhsOjGmC3vvYwTNYniKAd45W5UWLDF43moeOuV9qYpRqobIlsnK0UhnKZjUUJm3VgORUA==", "license": "ISC", "dependencies": { "d3-time": "1 - 3" @@ -3290,14 +3208,18 @@ } }, "node_modules/d3-timer": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-1Il1aliroVSErrv5aulRBxAY+7+DnaoLIWGd1C6SsBTWDeobWiP/V69vwb8vT6abR1kKwaNe1196pmaQ1fK90A==", "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/d3-transition": { - "version": "3.0.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.2.tgz", + "integrity": "sha512-RcjCsdFgyFoDB+QXLC5m60ZkTN0k9zH+ovoLlTdJnDS1AbfbcuowiM4pCKSTOclNibS4f4J4cbv2m7O7y8NTOQ==", "license": "ISC", "dependencies": { "d3-color": "1 - 3", @@ -3329,23 +3251,72 @@ "node": ">=12" } }, + "node_modules/d3/node_modules/d3-drag": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.1.tgz", + "integrity": "sha512-OWeoayCq8J69hUIjvL+Mb6Q6Oaj/fyHV5XaXByEUAG+JUjIfTGDnk3qGpcXrD3VmQ3BSV96fcbM6fqq7C0tbPA==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-selection": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3/node_modules/d3-force": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.1.tgz", + "integrity": "sha512-kAaaHLFebBYwgi5cYBXAI8vKrQFMCD2MEswj2QuPKKbdU1wYLc8WXtS7O8F/b6POCIe3gJjY6hkDstHi1yMETQ==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-quadtree": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3/node_modules/d3-selection": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.1.tgz", + "integrity": "sha512-ODSf35vqCrlCfp7hrm0eZjvOosSXSYLjqvIlhMBV9q9VOx7EBJG6pc+uXBswEZNJgCGJ+qnKYcWutbZDIxe/Xg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3/node_modules/d3-zoom": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.1.tgz", + "integrity": "sha512-kfjD3BDQu/FOatpZ6JdMSyIoDwTxIpI29ySTI2J5ZlDaH1WbuJGQJ2Q9oJkWTEZEW98j6idezoomSD3Cn2zwiw==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "2 - 3", + "d3-transition": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/dagre-d3-es": { - "version": "7.0.13", + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.14.tgz", + "integrity": "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==", "license": "MIT", "dependencies": { "d3": "^7.9.0", "lodash-es": "^4.17.21" } }, - "node_modules/data-uri-to-buffer": { - "version": "6.0.2", - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, "node_modules/dayjs": { - "version": "1.11.19", + "version": "1.11.23", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.23.tgz", + "integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==", "license": "MIT" }, "node_modules/debug": { @@ -3376,13 +3347,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/deepmerge": { - "version": "4.3.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/default-browser": { "version": "5.5.1", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.1.tgz", @@ -3426,20 +3390,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/degenerator": { - "version": "5.0.1", - "license": "MIT", - "dependencies": { - "ast-types": "^0.13.4", - "escodegen": "^2.1.0", - "esprima": "^4.0.1" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/delaunator": { - "version": "5.0.1", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz", + "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==", "license": "ISC", "dependencies": { "robust-predicates": "^3.0.2" @@ -3468,11 +3422,14 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1566079", + "version": "0.0.1704951", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1704951.tgz", + "integrity": "sha512-GQhQOs9u/Mvm1zMtJIH872JS4AskuZdUSsPNPk4ChahtWAUqgz6atEtIsMt+nO7MqF1Ic4HxII/k8Cu36JivNg==", "license": "BSD-3-Clause" }, "node_modules/dom-serializer": { "version": "2.0.0", + "dev": true, "license": "MIT", "dependencies": { "domelementtype": "^2.3.0", @@ -3485,6 +3442,7 @@ }, "node_modules/domelementtype": { "version": "2.3.0", + "dev": true, "funding": [ { "type": "github", @@ -3495,6 +3453,7 @@ }, "node_modules/domhandler": { "version": "5.0.3", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "domelementtype": "^2.3.0" @@ -3507,7 +3466,9 @@ } }, "node_modules/dompurify": { - "version": "3.3.1", + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.17.tgz", + "integrity": "sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" @@ -3515,6 +3476,7 @@ }, "node_modules/domutils": { "version": "3.2.2", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "dom-serializer": "^2.0.0", @@ -3568,16 +3530,11 @@ } }, "node_modules/emoji-regex": { - "version": "8.0.0", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", "license": "MIT" }, - "node_modules/end-of-stream": { - "version": "1.4.5", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/entities": { "version": "4.5.0", "license": "BSD-2-Clause", @@ -3636,8 +3593,22 @@ "node": ">= 0.4" } }, + "node_modules/es-toolkit": { + "version": "1.53.1", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.53.1.tgz", + "integrity": "sha512-VhMc6IXmexu8iYFfL2aaAww6IvJTdHlqBLruLoEUs33YD4IcP5DdZcLOybMsMmmLsiy1c8PsiLsrM0DdIuuRUA==", + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks", + "tests/types", + "tests/browser-compat" + ] + }, "node_modules/escalade": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "license": "MIT", "engines": { "node": ">=6" @@ -3655,6 +3626,9 @@ }, "node_modules/escodegen": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", @@ -3672,8 +3646,41 @@ "source-map": "~0.6.1" } }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/esprima": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", @@ -3685,6 +3692,9 @@ }, "node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -3692,54 +3702,37 @@ }, "node_modules/esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, - "node_modules/events-universal": { - "version": "1.0.1", - "license": "Apache-2.0", - "dependencies": { - "bare-events": "^2.7.0" - } - }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "license": "MIT" }, - "node_modules/extract-zip": { - "version": "2.0.1", - "license": "BSD-2-Clause", - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, "node_modules/fast-equals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-6.0.0.tgz", - "integrity": "sha512-PFhhIGgdM79r5Uztdj9Zb6Tt1zKafqVfdMGwVca1z5z6fbX7DmsySSuJd8HiP6I1j505DCS83cLxo5rmSNeVEA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-6.2.2.tgz", + "integrity": "sha512-n+XqoarWCgcar0O3om3DeNYx6xTuLWGTUF1bRZ9iuO00tsPepzP1L4V7rqtxxZ4PEya34UCESReimFvxmEVwIA==", "license": "MIT", "engines": { "node": ">=6.0.0" } }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "license": "MIT" + "node_modules/fastdom": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastdom/-/fastdom-1.0.12.tgz", + "integrity": "sha512-LB+xjSTEbjHE1cWsxu+tN2Xqr1kpi+V9aADI7sVM5ZMaXyYGPHULQMzpJMYqOTULK/73pUkWVzzObFRBkPr+hg==", + "license": "MIT", + "dependencies": { + "strictdom": "^1.0.1" + } }, "node_modules/fault": { "version": "2.0.1", @@ -3754,13 +3747,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "pend": "~1.2.0" - } - }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -3787,6 +3773,13 @@ "node": ">=0.4.x" } }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -3808,11 +3801,25 @@ }, "node_modules/get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.7.0.tgz", + "integrity": "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -3852,29 +3859,55 @@ "node": ">= 0.4" } }, - "node_modules/get-stream": { - "version": "5.2.0", - "license": "MIT", + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", "dependencies": { - "pump": "^3.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/get-uri": { - "version": "6.0.5", + "node_modules/glob/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", + "dev": true, "license": "MIT", "dependencies": { - "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^6.0.2", - "debug": "^4.3.4" + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">= 14" + "node": ">=10" } }, "node_modules/global-directory": { @@ -3917,9 +3950,9 @@ "license": "MIT" }, "node_modules/happy-dom": { - "version": "21.0.1", - "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-21.0.1.tgz", - "integrity": "sha512-pRBs/u9fhrncyByOl58DMex0R2uAj6ZPKWIjV5j5yNGZBqLw3P6BTRhlc0DD5b/Ht4/6JYTMuE2LJhUWRC6SGw==", + "version": "21.0.4", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-21.0.4.tgz", + "integrity": "sha512-tFm+GaLBgo6o0awHnvHaNoraVo27qJ+2tZEtZ+cIa08hXbeitrxAJajLI05hsUy/2/YTKcUjQYzHe5mCcraLBw==", "dev": true, "license": "MIT", "dependencies": { @@ -3975,9 +4008,9 @@ } }, "node_modules/hast-util-to-html": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz", - "integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==", + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.6.tgz", + "integrity": "sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", @@ -4011,7 +4044,9 @@ } }, "node_modules/highlight.js": { - "version": "11.11.1", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.12.0.tgz", + "integrity": "sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==", "license": "BSD-3-Clause", "engines": { "node": ">=12.0.0" @@ -4055,6 +4090,7 @@ }, "node_modules/htmlparser2": { "version": "8.0.2", + "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", { @@ -4072,6 +4108,7 @@ }, "node_modules/http-proxy-agent": { "version": "7.0.2", + "dev": true, "license": "MIT", "dependencies": { "agent-base": "^7.1.0", @@ -4083,6 +4120,7 @@ }, "node_modules/https-proxy-agent": { "version": "7.0.6", + "dev": true, "license": "MIT", "dependencies": { "agent-base": "^7.1.2", @@ -4094,6 +4132,8 @@ }, "node_modules/iconv-lite": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -4103,9 +4143,9 @@ } }, "node_modules/import-fresh": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-4.0.0.tgz", - "integrity": "sha512-Fpi660c7VPDM3fPKYovStd9IP1CPOikf6v/dGxJJMmHPcwYQIMJ4W7kO1avBYEpMqkCh+Dx3Ln6H7VYqgztLjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-4.0.1.tgz", + "integrity": "sha512-/XFeXYgkuWgbtqPC7qPKvciXTvhtz7WMNQKQsAM1Kz+j0I5OWJDrybfiya6QtHF9oEvPkLwTHmC9+4OR/MmfIA==", "license": "MIT", "engines": { "node": ">=22.15" @@ -4124,6 +4164,25 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, "node_modules/ini": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz", @@ -4135,18 +4194,13 @@ }, "node_modules/internmap": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", "license": "ISC", "engines": { "node": ">=12" } }, - "node_modules/ip-address": { - "version": "10.1.0", - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, "node_modules/is-alphabetical": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", @@ -4197,13 +4251,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-hexadecimal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", @@ -4246,7 +4293,9 @@ } }, "node_modules/is-plain-object": { - "version": "5.0.0", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.1.0.tgz", + "integrity": "sha512-bUi/yjmtKYcRVUtWRGr0UA6xEFh2I6zWUwMrUXB3s7bmYCaZ8a+0ZsTRkrawh/mzlSD1Y0Ph8bp/U+TvBpWDNw==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -4298,6 +4347,69 @@ "url": "https://bevry.me/fund" } }, + "node_modules/js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "xmlcreate": "^2.0.4" + } + }, + "node_modules/jsdoc": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.5.tgz", + "integrity": "sha512-P4C6MWP9yIlMiK8nwoZvxN84vb6MsnXcHuy7XzVOvQoCizWX5JFCBsWIIWKXBltpoRZXddUOVQmCTOZt9yDj9g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@babel/parser": "^7.20.15", + "@jsdoc/salty": "^0.2.1", + "@types/markdown-it": "^14.1.1", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.2", + "klaw": "^3.0.0", + "markdown-it": "^14.1.0", + "markdown-it-anchor": "^8.6.7", + "marked": "^4.0.10", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "underscore": "~1.13.2" + }, + "bin": { + "jsdoc": "jsdoc.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/jsdoc/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jsdoc/node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/jsonc-parser": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", @@ -4352,14 +4464,16 @@ } }, "node_modules/katex": { - "version": "0.16.28", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.19.1.tgz", + "integrity": "sha512-jG8uKntjSEcm2EpQOh0XturpPuuC9r3Sq5HLHdsFdWZT27E672SF19QEi+of0/YeOy15lDgRhKvr5614uRrEfA==", "funding": [ "https://opencollective.com/katex", "https://github.com/sponsors/katex" ], "license": "MIT", "dependencies": { - "commander": "^8.3.0" + "commander": "^15.0.0" }, "bin": { "katex": "cli.js" @@ -4368,18 +4482,23 @@ "node_modules/khroma": { "version": "2.1.0" }, - "node_modules/langium": { - "version": "3.3.1", + "node_modules/klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dev": true, "license": "MIT", "dependencies": { - "chevrotain": "~11.0.3", - "chevrotain-allstar": "~0.3.0", - "vscode-languageserver": "~9.0.1", - "vscode-languageserver-textdocument": "~1.0.11", - "vscode-uri": "~3.0.8" - }, - "engines": { - "node": ">=16.0.0" + "graceful-fs": "^4.1.9" + } + }, + "node_modules/launder": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/launder/-/launder-1.7.2.tgz", + "integrity": "sha512-DLg3HPnHUfBi5/MxMLmJD12dmlMpFEC2HgMW6vkZ/9JR0RU00kXoRGvDxAvFmdO0o610OA77i4FgNTLucmhDVg==", + "license": "MIT", + "dependencies": { + "dayjs": "^1.11.23" } }, "node_modules/layout-base": { @@ -4387,20 +4506,35 @@ "license": "MIT" }, "node_modules/linkify-it": { - "version": "5.0.0", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz", + "integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], "license": "MIT", "dependencies": { "uc.micro": "^2.0.0" } }, - "node_modules/lodash-es": { - "version": "4.17.23", + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "dev": true, "license": "MIT" }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "node_modules/lodash-es": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz", + "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==", "license": "MIT" }, "node_modules/lodash.includes": { @@ -4468,24 +4602,29 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/lru-cache": { - "version": "7.18.3", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, "node_modules/lucide": { "version": "0.564.0", "license": "ISC" }, "node_modules/markdown-it": { - "version": "14.1.1", + "version": "14.3.3", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.3.tgz", + "integrity": "sha512-L//tDAkjTjJCU6pBUSBTgs3Kg4InVaZuUZog/b6V12UKhcDQ7S78877ibbCanRExwPuYP1CZD7Gd2dxSy1GXRg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/markdown-it" + } + ], "license": "MIT", "dependencies": { "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.0", + "entities": "^4.5.0", + "linkify-it": "^5.0.2", "mdurl": "^2.0.0", "punycode.js": "^2.3.1", "uc.micro": "^2.1.0" @@ -4494,10 +4633,21 @@ "markdown-it": "bin/markdown-it.mjs" } }, + "node_modules/markdown-it-anchor": { + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", + "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", + "dev": true, + "license": "Unlicense", + "peerDependencies": { + "@types/markdown-it": "*", + "markdown-it": "*" + } + }, "node_modules/markdown-it-emoji": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-3.0.0.tgz", - "integrity": "sha512-+rUD93bXHubA4arpEZO3q80so0qgoFJEKRkRbjKX8RTdca89v2kfyF+xR3i2sQTwql9tpPZPOQN5B+PunspXRg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-3.1.0.tgz", + "integrity": "sha512-NhmMEH2ywduD4Nty1E8uB5NqfLhAT1VR0dyvoJyStKOqCzbZmVdn/+8wj7zpDsb/fLBikpCPsWwxqKlvMmbz4g==", "license": "MIT" }, "node_modules/marked": { @@ -4672,29 +4822,33 @@ "license": "MIT" }, "node_modules/mermaid": { - "version": "11.12.2", + "version": "11.17.2", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.17.2.tgz", + "integrity": "sha512-V6K3C8EBdEsPFZXSKMJe6ppQOENxuHARr9GvHX4hh47lAbhMRD9qf4oEK7LoaRQxULMa80/qt5gHO73aCleBBg==", "license": "MIT", "dependencies": { - "@braintree/sanitize-url": "^7.1.1", - "@iconify/utils": "^3.0.1", - "@mermaid-js/parser": "^0.6.3", + "@braintree/sanitize-url": "^7.1.2", + "@iconify/utils": "^3.0.2", + "@mermaid-js/parser": "^1.2.1", "@types/d3": "^7.4.3", - "cytoscape": "^3.29.3", + "@upsetjs/venn.js": "^2.0.0", + "cytoscape": "^3.34.0", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", - "dagre-d3-es": "7.0.13", - "dayjs": "^1.11.18", - "dompurify": "^3.2.5", - "katex": "^0.16.22", + "dagre-d3-es": "7.0.14", + "dayjs": "^1.11.21", + "dompurify": "^3.3.3", + "es-toolkit": "^1.45.1", + "fastdom": "1.0.12", + "katex": "^0.16.47", "khroma": "^2.1.0", - "lodash-es": "^4.17.21", - "marked": "^16.2.1", + "marked": "^16.3.0", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0", - "uuid": "^11.1.0" + "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" } }, "node_modules/micromark": { @@ -5224,10 +5378,35 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/mitt": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", "license": "MIT" }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/mlly": { "version": "1.8.0", "license": "MIT", @@ -5238,6 +5417,15 @@ "ufo": "^1.6.1" } }, + "node_modules/modern-tar": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.8.6.tgz", + "integrity": "sha512-LYSks0tNVqbtez/9OB0YFP6qLRSqkdAxJWOQpVaR67lNTbj2zNLyYpowkRMia5lXLCZKzxwoxkxH2MbbBR2aEg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ms": { "version": "2.1.3", "license": "MIT" @@ -5250,7 +5438,9 @@ "license": "ISC" }, "node_modules/nanoid": { - "version": "3.3.11", + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", "funding": [ { "type": "github", @@ -5265,15 +5455,8 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/netmask": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/nodeatomic": { - "resolved": "../nodeatomic", + "resolved": "vendor/nodeatomic", "link": true }, "node_modules/object-inspect": { @@ -5291,6 +5474,9 @@ }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -5332,34 +5518,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pac-proxy-agent": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.1.2", - "debug": "^4.3.4", - "get-uri": "^6.0.1", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.6", - "pac-resolver": "^7.0.1", - "socks-proxy-agent": "^8.0.5" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-resolver": { - "version": "7.0.1", - "license": "MIT", - "dependencies": { - "degenerator": "^5.0.0", - "netmask": "^2.0.2" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/package-manager-detector": { "version": "1.6.0", "license": "MIT" @@ -5429,16 +5587,19 @@ }, "node_modules/pend": { "version": "1.2.0", + "dev": true, "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "license": "MIT", "engines": { "node": ">=12" @@ -5469,7 +5630,9 @@ } }, "node_modules/postcss": { - "version": "8.5.6", + "version": "8.5.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", + "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", "funding": [ { "type": "opencollective", @@ -5486,21 +5649,14 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.11", + "nanoid": "^3.3.20", "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" + "source-map-js": "^1.2.2" }, "engines": { "node": "^10 || ^12 || >=14" } }, - "node_modules/progress": { - "version": "2.0.3", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/proper-lockfile": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", @@ -5524,55 +5680,42 @@ } }, "node_modules/protobufjs": { - "version": "7.6.6", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.6.tgz", - "integrity": "sha512-dYDWdjSl5RNb7SgPxGQcRU+GtvP7s2fpkrY0r432PcOIaZ0/rBcxEZnQN67iJhFuQiVw754JDoPruPCNdGsbjg==", - "hasInstallScript": true, + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-8.8.1.tgz", + "integrity": "sha512-d9e9179bjXSJdpJ3+R9fP8hzXsnKLyxTjHLG1dUzje8a27pPyXCe6PrcRtgx2rjoM3IZzHd2vAs+6J/BsO1k7Q==", "license": "BSD-3-Clause", "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.5", - "@protobufjs/eventemitter": "^1.1.1", - "@protobufjs/fetch": "^1.1.1", - "@protobufjs/float": "^1.0.2", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.1", - "@types/node": ">=13.7.0", "long": "^5.3.2" }, "engines": { "node": ">=12.0.0" } }, - "node_modules/proxy-agent": { - "version": "6.5.0", - "license": "MIT", + "node_modules/protobufjs-cli": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/protobufjs-cli/-/protobufjs-cli-2.7.1.tgz", + "integrity": "sha512-qYCu9hK0Gkm5RwaVgkUoVe9cEME/DKS1yK6ibMy+3fBxlIuxy5HjEtLzg/S/GEl1AyAHZL1/ho3m7WdsgatwNw==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "agent-base": "^7.1.2", - "debug": "^4.3.4", - "http-proxy-agent": "^7.0.1", - "https-proxy-agent": "^7.0.6", - "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.1.0", - "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.5" + "escodegen": "^2.0.0", + "espree": "^9.6.1", + "estraverse": "^5.1.0", + "glob": "^8.1.0", + "jsdoc": "^4.0.5", + "minimist": "^1.2.8", + "tmp": "^0.2.7" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts", + "protoc-gen-pbjs": "bin/protoc-gen-pbjs" }, "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "license": "MIT" - }, - "node_modules/pump": { - "version": "3.0.3", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "node": ">=12.0.0" + }, + "peerDependencies": { + "protobufjs": "^8.8.1" } }, "node_modules/punycode.js": { @@ -5583,19 +5726,20 @@ } }, "node_modules/puppeteer-core": { - "version": "24.37.5", + "version": "25.16.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.16.0.tgz", + "integrity": "sha512-VA5Pf54N8shfopNkZZXCdiiwfnnY8ZJYAMqFQRhlH5mGUhfwf53Ar770GPtdpTDLUqvQeYpIBtC9/G2Jij2IJw==", "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.13.0", - "chromium-bidi": "14.0.0", - "debug": "^4.4.3", - "devtools-protocol": "0.0.1566079", - "typed-query-selector": "^2.12.0", - "webdriver-bidi-protocol": "0.4.1", - "ws": "^8.19.0" + "@puppeteer/browsers": "3.2.6", + "chromium-bidi": "157.0.8090-0", + "devtools-protocol": "0.0.1704951", + "typed-query-selector": "^2.12.3", + "webdriver-bidi-protocol": "1.0.1", + "ws": "^8.22.0" }, "engines": { - "node": ">=18" + "node": ">=22.12.0" } }, "node_modules/qs": { @@ -5700,11 +5844,14 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/require-directory": { - "version": "2.1.1", + "node_modules/requizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", + "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", + "dev": true, "license": "MIT", - "engines": { - "node": ">=0.10.0" + "dependencies": { + "lodash": "^4.17.21" } }, "node_modules/resolve-from": { @@ -5727,7 +5874,9 @@ } }, "node_modules/robust-predicates": { - "version": "3.0.2", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz", + "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==", "license": "Unlicense" }, "node_modules/roughjs": { @@ -5755,6 +5904,8 @@ }, "node_modules/rw": { "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", "license": "BSD-3-Clause" }, "node_modules/safe-buffer": { @@ -5780,18 +5931,126 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, "node_modules/sanitize-html": { - "version": "2.17.1", + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.18.1.tgz", + "integrity": "sha512-2X5lC8fYla8YaT8g73Nj+HcLWXan5dLyCWLgVvaOmfw7JI78IRsyNtIDytTHdn7hBQbIkCah7Zbmd5jabzeDig==", "license": "MIT", "dependencies": { - "deepmerge": "^4.2.2", "escape-string-regexp": "^4.0.0", - "htmlparser2": "^8.0.0", - "is-plain-object": "^5.0.0", + "htmlparser2": "^12.0.0", + "is-plain-object": "^5.1.0", + "launder": "^1.7.2", "parse-srcset": "^1.0.2", - "postcss": "^8.3.11" + "postcss": "^8.5.27" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/sanitize-html/node_modules/dom-serializer": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-3.1.1.tgz", + "integrity": "sha512-4MEa38/QexBob6gFNwu+EGdWvhJ1OKuNwdYY3Y3NyeWDQfnGeDYQUDfIRzWu5B5gsv03so2Uxd28YC6zrsx3Lw==", + "license": "MIT", + "dependencies": { + "domelementtype": "^3.0.0", + "domhandler": "^6.0.0", + "entities": "^8.0.0" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/sanitize-html/node_modules/domelementtype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-3.0.0.tgz", + "integrity": "sha512-umCQid3jKbDmVjx8jGaW7uUykm4DEUeyV21hPxNMo2nV955DhUThwqyOIDtreepP31hl84X7G5U9ZfsWvIB3Pg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause", + "engines": { + "node": ">=20.19.0" + } + }, + "node_modules/sanitize-html/node_modules/domhandler": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-6.0.1.tgz", + "integrity": "sha512-gYzvtM72ZtxQO0T048kd6HWSbbGCNOUwcnfQ01cqIJ4X2IYKFFHZ5mKvrQETcFXxsRObZulDaKmy//R7TPtsBg==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^3.0.0" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/sanitize-html/node_modules/domutils": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-4.0.2.tgz", + "integrity": "sha512-qI4JLRKnSzqFqr7hAlS5xQDusBCjKSEG4t4+7aNrIQMHBcsC2TGEhuyABJdYkgSewL57PNLYEiibY2iPKhKpaA==", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^3.0.0", + "domelementtype": "^3.0.0", + "domhandler": "^6.0.0" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/sanitize-html/node_modules/entities": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-8.1.0.tgz", + "integrity": "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/sanitize-html/node_modules/htmlparser2": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-12.0.0.tgz", + "integrity": "sha512-Tz7u1i95/g2x2jz81+x0FBVhBhY5aRTvD3tXXdFaljuNdzDLJ8UGNRrTcj2cgQvAg3iW/h77Fz15nLW0L0CrZw==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^3.0.0", + "domhandler": "^6.0.0", + "domutils": "^4.0.2", + "entities": "^8.0.0" + }, + "engines": { + "node": ">=20.19.0" } }, "node_modules/sax": { @@ -5808,6 +6067,7 @@ "version": "7.8.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -5817,19 +6077,19 @@ } }, "node_modules/shiki": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.3.0.tgz", - "integrity": "sha512-NKKjWzR6LIGL3sXBrWDw9sDS9cxx42/DkysaNqJEeOWE8Kix5gpak0bc00OfDVEO4oyXSyz8+aRaqKoBD1yo7A==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.6.0.tgz", + "integrity": "sha512-imjLsVHgPuWhvpU3P+zOekvMYqnel7QmKsFC4Sn0fCuAvaaalBsxwKEsrU8Ko5BdFnZA6Go/8a0RzahS634UgA==", "license": "MIT", "dependencies": { - "@shikijs/core": "4.3.0", - "@shikijs/engine-javascript": "4.3.0", - "@shikijs/engine-oniguruma": "4.3.0", - "@shikijs/langs": "4.3.0", - "@shikijs/themes": "4.3.0", - "@shikijs/types": "4.3.0", - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.4" + "@shikijs/core": "4.6.0", + "@shikijs/engine-javascript": "4.6.0", + "@shikijs/engine-oniguruma": "4.6.0", + "@shikijs/langs": "4.6.0", + "@shikijs/themes": "4.6.0", + "@shikijs/types": "4.6.0", + "@shikijs/vscode-textmate": "^10.1.0", + "@types/hast": "^3.0.5" }, "engines": { "node": ">=20" @@ -5918,18 +6178,10 @@ "dev": true, "license": "ISC" }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "license": "MIT", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, "node_modules/smol-toml": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.7.0.tgz", - "integrity": "sha512-aqVvWoyO21L23mb+drl4RmMXbf6N7FdHjAhTRA9ZBL7apWBgfWC16KjrASI+1p9GAroljyMHj6fK67i0UiTNvQ==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.9.1.tgz", + "integrity": "sha512-j7WyPdf0CJoutMzMoPLF/bVXHtKZIT9Rb4eGeEbWw8X2t5oirjPgpL+OpaENZrILYaXqYwnVH+qgUwVbl+pUJQ==", "license": "BSD-3-Clause", "engines": { "node": ">= 18" @@ -5938,32 +6190,11 @@ "url": "https://github.com/sponsors/cyyynthia" } }, - "node_modules/socks": { - "version": "2.8.7", - "license": "MIT", - "dependencies": { - "ip-address": "^10.0.1", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "8.0.5", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "^4.3.4", - "socks": "^2.8.3" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, "license": "BSD-3-Clause", "optional": true, "engines": { @@ -5971,7 +6202,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.1", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -5987,25 +6220,26 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/streamx": { - "version": "2.23.0", - "license": "MIT", - "dependencies": { - "events-universal": "^1.0.0", - "fast-fifo": "^1.3.2", - "text-decoder": "^1.1.0" - } + "node_modules/strictdom": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strictdom/-/strictdom-1.0.1.tgz", + "integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==", + "license": "MIT" }, "node_modules/string-width": { - "version": "4.2.3", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", + "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", "license": "MIT", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" }, "engines": { - "node": ">=8" + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/stringify-entities": { @@ -6023,13 +6257,31 @@ } }, "node_modules/strip-ansi": { - "version": "6.0.1", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^6.2.2" }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/structured-source": { @@ -6050,42 +6302,6 @@ "version": "4.3.6", "license": "MIT" }, - "node_modules/tar-fs": { - "version": "3.1.1", - "license": "MIT", - "dependencies": { - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - }, - "optionalDependencies": { - "bare-fs": "^4.0.1", - "bare-path": "^3.0.0" - } - }, - "node_modules/tar-stream": { - "version": "3.1.7", - "license": "MIT", - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, - "node_modules/teex": { - "version": "1.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "streamx": "^2.12.5" - } - }, - "node_modules/text-decoder": { - "version": "1.2.7", - "license": "Apache-2.0", - "dependencies": { - "b4a": "^1.6.4" - } - }, "node_modules/textextensions": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-6.11.0.tgz", @@ -6126,6 +6342,16 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, + "node_modules/tmp": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.7.tgz", + "integrity": "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, "node_modules/trim-lines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", @@ -6155,6 +6381,7 @@ }, "node_modules/tslib": { "version": "2.8.1", + "dev": true, "license": "0BSD" }, "node_modules/tunnel": { @@ -6168,7 +6395,9 @@ } }, "node_modules/typed-query-selector": { - "version": "2.12.0", + "version": "2.12.3", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.3.tgz", + "integrity": "sha512-/dtuMZyutHLlrxWhhC1uib00ELUr2dZ8C9B8YzZYsJmeE3V56OxRblrSM2UaF142pcMtak7ehZ6+poWGeehNIg==", "license": "MIT" }, "node_modules/typed-rest-client": { @@ -6197,6 +6426,8 @@ }, "node_modules/uc.micro": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "license": "MIT" }, "node_modules/ufo": { @@ -6212,6 +6443,7 @@ }, "node_modules/undici-types": { "version": "7.18.2", + "dev": true, "license": "MIT" }, "node_modules/unified": { @@ -6309,7 +6541,9 @@ "license": "MIT" }, "node_modules/uuid": { - "version": "11.1.0", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -6360,41 +6594,16 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/vscode-jsonrpc": { - "version": "8.2.0", - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/vscode-languageserver": { - "version": "9.0.1", - "license": "MIT", - "dependencies": { - "vscode-languageserver-protocol": "3.17.5" - }, - "bin": { - "installServerIntoExtension": "bin/installServerIntoExtension" - } - }, - "node_modules/vscode-languageserver-protocol": { - "version": "3.17.5", - "license": "MIT", - "dependencies": { - "vscode-jsonrpc": "8.2.0", - "vscode-languageserver-types": "3.17.5" - } - }, "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.12", - "license": "MIT" - }, - "node_modules/vscode-languageserver-types": { - "version": "3.17.5", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.16.tgz", + "integrity": "sha512-qeNEuOi9a3qkqRf7Gfez2WL2VwlBTLCNekHBGO9kxPVUp9XuY15yfTJ9jwvOwKI0I2MhUUfZq95NSp+LK1CLQg==", "license": "MIT" }, "node_modules/vscode-uri": { - "version": "3.0.8", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.2.0.tgz", + "integrity": "sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==", "license": "MIT" }, "node_modules/w3c-keyname": { @@ -6402,7 +6611,9 @@ "license": "MIT" }, "node_modules/webdriver-bidi-protocol": { - "version": "0.4.1", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-1.0.1.tgz", + "integrity": "sha512-WXWs/aXF2a6Al1Z2/V/7Gp2oPZOAAmHjJOTmv4KCXRJ122IMj3tSSMc6a4q3K4QOmhQbse/Ahr+oTVJOU2dUiw==", "license": "Apache-2.0" }, "node_modules/whatwg-mimetype": { @@ -6416,22 +6627,44 @@ } }, "node_modules/wrap-ansi": { - "version": "7.0.0", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/wrappy": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, "license": "ISC" }, "node_modules/ws": { @@ -6507,8 +6740,17 @@ "node": ">=4.0" } }, + "node_modules/xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "license": "ISC", "engines": { "node": ">=10" @@ -6537,34 +6779,29 @@ } }, "node_modules/yargs": { - "version": "17.7.2", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.2.0.tgz", + "integrity": "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==", "license": "MIT", "dependencies": { - "cliui": "^8.0.1", + "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^8.2.1", "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "yargs-parser": "^22.0.0" }, "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yargs-parser": { - "version": "21.1.1", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", "license": "ISC", "engines": { - "node": ">=12" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "license": "MIT", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" + "node": "^20.19.0 || ^22.12.0 || >=23" } }, "node_modules/yazl": { @@ -6578,7 +6815,9 @@ } }, "node_modules/zod": { - "version": "3.25.76", + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -6593,6 +6832,38 @@ "type": "github", "url": "https://github.com/sponsors/wooorm" } + }, + "vendor/nodeatomic": { + "version": "0.1.0", + "license": "MIT OR Apache-2.0", + "dependencies": { + "protobufjs": "^8.8.1" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "protobufjs-cli": "^2.7.1", + "typescript": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "vendor/nodeatomic/node_modules/@types/node": { + "version": "22.20.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.5.tgz", + "integrity": "sha512-U2+DNr+wSjpsTS/wZGYHq7GcwfuSmKiKvoPvK22zwTlRhU91yOniN4qRR5KhIjvif7ysw/dz/hKmfDH0Ris4aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "vendor/nodeatomic/node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" } } } diff --git a/package.json b/package.json index 429c9f2..fba926c 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,9 @@ "name": "atomic-sherpa", "displayName": "Atomic Sherpa", "description": "Connect intent to source code with Atomic: edit intent tickets, manage Draft and Shared views, inspect change history, and explore code blast radius.", - "version": "0.2.12", + "version": "1.0.0", "publisher": "atomicdotdev", "license": "MIT", - "private": true, "icon": "backpack.png", "engines": { "vscode": "^1.97.0" @@ -28,7 +27,9 @@ "agent" ], "main": "./dist/extension.js", - "extensionKind": ["workspace"], + "extensionKind": [ + "workspace" + ], "activationEvents": [ "onStartupFinished" ], @@ -62,17 +63,61 @@ } ], "commands": [ - { "command": "sherpaAtomic.openGraph", "title": "Atomic: Inspect View Changes", "icon": "$(history)" }, - { "command": "sherpaAtomic.refresh", "title": "Atomic: Refresh Version Control", "icon": "$(refresh)" }, - { "command": "sherpaAtomic.record", "title": "Atomic: Record Tracked Changes", "icon": "$(check)" }, - { "command": "sherpaAtomic.add", "title": "Atomic: Add File", "icon": "$(add)" }, - { "command": "sherpaAtomic.createView", "title": "Atomic: Create View", "icon": "$(add)" }, - { "command": "sherpaAtomic.switchView", "title": "Atomic: Switch View", "icon": "$(versions)" }, - { "command": "sherpaAtomic.deleteView", "title": "Atomic: Delete View", "icon": "$(trash)" }, - { "command": "sherpaAtomic.push", "title": "Atomic: Push View", "icon": "$(cloud-upload)" }, - { "command": "sherpaAtomic.pull", "title": "Atomic: Pull View", "icon": "$(cloud-download)" }, - { "command": "sherpaAtomic.insertView", "title": "Atomic: Insert View Into View", "icon": "$(arrow-right)" }, - { "command": "sherpaAtomic.addRemote", "title": "Atomic: Add Remote", "icon": "$(plug)" }, + { + "command": "sherpaAtomic.openGraph", + "title": "Atomic: Inspect View Changes", + "icon": "$(history)" + }, + { + "command": "sherpaAtomic.refresh", + "title": "Atomic: Refresh Version Control", + "icon": "$(refresh)" + }, + { + "command": "sherpaAtomic.record", + "title": "Atomic: Record Tracked Changes", + "icon": "$(check)" + }, + { + "command": "sherpaAtomic.add", + "title": "Atomic: Add File", + "icon": "$(add)" + }, + { + "command": "sherpaAtomic.createView", + "title": "Atomic: Create View", + "icon": "$(add)" + }, + { + "command": "sherpaAtomic.switchView", + "title": "Atomic: Switch View", + "icon": "$(versions)" + }, + { + "command": "sherpaAtomic.deleteView", + "title": "Atomic: Delete View", + "icon": "$(trash)" + }, + { + "command": "sherpaAtomic.push", + "title": "Atomic: Push View", + "icon": "$(cloud-upload)" + }, + { + "command": "sherpaAtomic.pull", + "title": "Atomic: Pull View", + "icon": "$(cloud-download)" + }, + { + "command": "sherpaAtomic.insertView", + "title": "Atomic: Insert View Into View", + "icon": "$(arrow-right)" + }, + { + "command": "sherpaAtomic.addRemote", + "title": "Atomic: Add Remote", + "icon": "$(plug)" + }, { "command": "sherpaIntent.open", "title": "Atomic: Open Intent as Ticket", @@ -168,29 +213,88 @@ ], "menus": { "view/title": [ - { "command": "sherpaAtomic.refresh", "when": "view == sherpaAtomic.repository", "group": "navigation" } + { + "command": "sherpaAtomic.refresh", + "when": "view == sherpaAtomic.repository", + "group": "navigation" + } ], "view/item/context": [ - { "command": "sherpaAtomic.openGraph", "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", "group": "navigation" }, - { "command": "sherpaAtomic.createView", "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", "group": "atomic" }, - { "command": "sherpaAtomic.switchView", "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", "group": "atomic" }, - { "command": "sherpaAtomic.deleteView", "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", "group": "atomic" }, - { "command": "sherpaAtomic.push", "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", "group": "atomic" }, - { "command": "sherpaAtomic.pull", "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", "group": "atomic" }, - { "command": "sherpaAtomic.insertView", "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", "group": "atomic" }, - { "command": "sherpaAtomic.addRemote", "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", "group": "atomic" } + { + "command": "sherpaAtomic.openGraph", + "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", + "group": "navigation" + }, + { + "command": "sherpaAtomic.createView", + "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", + "group": "atomic" + }, + { + "command": "sherpaAtomic.switchView", + "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", + "group": "atomic" + }, + { + "command": "sherpaAtomic.deleteView", + "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", + "group": "atomic" + }, + { + "command": "sherpaAtomic.push", + "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", + "group": "atomic" + }, + { + "command": "sherpaAtomic.pull", + "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", + "group": "atomic" + }, + { + "command": "sherpaAtomic.insertView", + "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", + "group": "atomic" + }, + { + "command": "sherpaAtomic.addRemote", + "when": "view == sherpaAtomic.repository && viewItem == atomicRepository", + "group": "atomic" + } ], "scm/title": [ - { "command": "sherpaAtomic.record", "when": "scmProvider == atomic", "group": "navigation" }, - { "command": "sherpaAtomic.push", "when": "scmProvider == atomic", "group": "navigation" }, - { "command": "sherpaAtomic.pull", "when": "scmProvider == atomic", "group": "navigation" }, - { "command": "sherpaAtomic.refresh", "when": "scmProvider == atomic", "group": "navigation" } + { + "command": "sherpaAtomic.record", + "when": "scmProvider == atomic", + "group": "navigation" + }, + { + "command": "sherpaAtomic.push", + "when": "scmProvider == atomic", + "group": "navigation" + }, + { + "command": "sherpaAtomic.pull", + "when": "scmProvider == atomic", + "group": "navigation" + }, + { + "command": "sherpaAtomic.refresh", + "when": "scmProvider == atomic", + "group": "navigation" + } ], "scm/resourceState/context": [ - { "command": "sherpaAtomic.add", "when": "scmProvider == atomic && scmResourceState == atomicUntracked", "group": "inline" } + { + "command": "sherpaAtomic.add", + "when": "scmProvider == atomic && scmResourceState == atomicUntracked", + "group": "inline" + } ], "commandPalette": [ - { "command": "sherpaAtomic.add", "when": "false" } + { + "command": "sherpaAtomic.add", + "when": "false" + } ], "explorer/context": [ { @@ -834,17 +938,18 @@ "typecheck": "tsc --noEmit && tsc -p webview/tsconfig.json --noEmit", "typecheck:webview": "tsc -p webview/tsconfig.json --noEmit", "build": "bun run build:webview && bun run build:extension", - "build:webview": "rm -rf webview/dist && mkdir -p webview/dist webview/dist/katex && bun build webview/src/index.ts --target=browser --format=esm --splitting --minify --outdir=webview/dist && cp webview/src/styles.css webview/dist/index.css && cp node_modules/mermaid/dist/mermaid.min.js webview/dist/mermaid.min.js && cp node_modules/katex/dist/katex.min.css webview/dist/katex/katex.min.css && cp -R node_modules/katex/dist/fonts webview/dist/katex/fonts", - "build:extension": "bun run build:extension:graph && bun run build:extension:atomic && bun run build:extension:main && bun run build:extension:export-runtime && bun run build:extension:puppeteer-runtime", - "build:extension:graph": "bun build webview/src/atomicGraph.ts --target=browser --format=iife --minify --outfile=dist/atomic-graph.js && cp webview/src/atomicGraph.css dist/atomic-graph.css", + "build:webview": "bun scripts/build-webview.mjs", + "build:extension": "bun scripts/clean-dist.mjs && bun run build:extension:graph && bun run build:extension:atomic && bun run build:extension:main && bun run build:extension:export-runtime && bun run build:extension:puppeteer-runtime", + "build:extension:graph": "bun scripts/build-graph.mjs", "build:extension:atomic": "bun scripts/build-nodeatomic.mjs", "build:extension:main": "bun build src/extension.ts --target=node --format=cjs --minify --outfile=dist/extension.js -e vscode", "build:extension:main:debug": "bun build src/extension.ts --target=node --format=cjs --minify --outfile=dist/extension.js -e vscode --sourcemap=inline", "build:extension:export-runtime": "bun build src/export/runtime.ts --target=node --format=cjs --minify --outfile=dist/export-runtime.js", - "build:extension:puppeteer-runtime": "bun build src/export/puppeteerRuntime.ts --target=node --format=cjs --minify --outfile=dist/puppeteer-runtime.js", + "build:extension:puppeteer-runtime": "bun build src/export/puppeteerRuntime.mts --target=node --format=esm --minify --outfile=dist/puppeteer-runtime.mjs", "release:prep": "bun scripts/release-prep.mjs", "release:finalize": "bun scripts/release-prep.mjs finalize", - "vscode:publish": "npm run package:vsix" + "vscode:publish": "npm run package:vsix", + "ci:verify": "npm run typecheck && npm test && npm run build && npm run package:vsix && node scripts/verify-universal-vsix.mjs" }, "dependencies": { "@codemirror/commands": "6.8.1", @@ -863,29 +968,27 @@ "@codemirror/search": "6.6.0", "@codemirror/state": "6.5.2", "@codemirror/view": "6.36.4", - "@grpc/grpc-js": "^1.14.6", - "@grpc/proto-loader": "^0.8.1", - "@lezer/highlight": "^1.2.3", - "@replit/codemirror-vim": "^6.3.0", + "@lezer/highlight": "^1.2.5", + "@replit/codemirror-vim": "^6.4.0", "@types/vscode": "^1.109.0", - "cspell-lib": "^10.0.1", + "cspell-lib": "^10.4.0", "d3-drag": "3.0.0", "d3-force": "3.0.0", "d3-selection": "3.0.0", "d3-zoom": "3.0.0", - "highlight.js": "^11.11.1", - "katex": "^0.16.28", + "highlight.js": "^11.12.0", + "katex": "^0.19.1", "lucide": "^0.564.0", - "markdown-it": "^14.1.0", - "markdown-it-emoji": "^3.0.0", - "mermaid": "^11.4.1", - "nodeatomic": "file:../nodeatomic", - "puppeteer-core": "^24.1.1", + "markdown-it": "^14.3.3", + "markdown-it-emoji": "^3.1.0", + "mermaid": "^11.17.2", + "nodeatomic": "file:vendor/nodeatomic", + "puppeteer-core": "^25.16.0", "remark-directive": "^4.0.0", "remark-frontmatter": "^5.0.0", "remark-parse": "^11.0.0", - "sanitize-html": "^2.17.0", - "shiki": "^4.2.0", + "sanitize-html": "^2.18.1", + "shiki": "^4.6.0", "unified": "^11.0.5", "yaml": "^2.9.1" }, @@ -897,8 +1000,20 @@ "@types/markdown-it": "^14.1.2", "@types/markdown-it-emoji": "^3.0.1", "@types/sanitize-html": "^2.16.0", - "@vscode/vsce": "^4.0.0", - "happy-dom": "^21.0.1", + "@vscode/vsce": "^4.1.0", + "happy-dom": "^21.0.4", "typescript": "^5.9.3" + }, + "overrides": { + "katex": "^0.19.1", + "uuid": "^11.1.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/atomicdotdev/sherpa-vscode.git" + }, + "homepage": "https://github.com/atomicdotdev/sherpa-vscode#readme", + "bugs": { + "url": "https://github.com/atomicdotdev/sherpa-vscode/issues" } } diff --git a/scripts/atomicCli.test.mjs b/scripts/atomicCli.test.mjs index 9a4e203..5274d2a 100644 --- a/scripts/atomicCli.test.mjs +++ b/scripts/atomicCli.test.mjs @@ -1,15 +1,25 @@ import { expect, test } from 'bun:test'; +import { fileURLToPath } from 'node:url'; import { AtomicCliError, runAtomicCli } from '../src/atomic/syncCli.ts'; -test('runs the installed Atomic CLI without a shell', async () => { - const result = await runAtomicCli(['--version'], { cwd: process.cwd(), timeoutMs: 10_000 }); +const fixture = fileURLToPath(new URL('./fixtures/fakeAtomic.mjs', import.meta.url)); +const options = { + cwd: process.cwd(), + timeoutMs: 10_000, + executable: process.execPath, + argsPrefix: [fixture] +}; + + +test('runs the configured Atomic CLI without a shell', async () => { + const result = await runAtomicCli(['--version'], options); expect(result.stdout).toContain('atomic'); }); test('surfaces CLI failures with captured output', async () => { let failure; try { - await runAtomicCli(['definitely-not-a-command'], { cwd: process.cwd(), timeoutMs: 10_000 }); + await runAtomicCli(['definitely-not-a-command'], options); } catch (error) { failure = error; } diff --git a/scripts/atomicDraftView.test.mjs b/scripts/atomicDraftView.test.mjs index a26bdd1..6968dd1 100644 --- a/scripts/atomicDraftView.test.mjs +++ b/scripts/atomicDraftView.test.mjs @@ -1,4 +1,5 @@ import { describe, expect, test } from 'bun:test'; +import path from 'node:path'; import { Window } from 'happy-dom'; import { EvidenceExplorer } from '../src/atomic/evidenceExplorer.ts'; import { summarizeView, viewTreeDescription } from '../src/atomic/model.ts'; @@ -9,6 +10,7 @@ import { readAtomicWhy } from '../webview/src/helpers/atomicIntentDocument.ts'; import { displayChangeHash } from '../src/shared/atomicHash.ts'; const bytes = (n) => new Uint8Array(32).fill(n), hex = (n) => Buffer.from(bytes(n)).toString('hex'); +const repo = path.resolve('/repo'); const graph = (index = 1, count = 2) => ({ version: 3, session_id: `session-${index}`, agent_name: 'OpenCode', plan_id: 'TEST::1', nodes: Array.from({ length: count }, (_, n) => ({ id: `${index}-${n}`, kind: n % 2 ? 'execution' : 'exploration', summary: `Action ${index}-${n}`, tool_name: n % 2 ? 'shell' : 'read', timestamp: 1000 + index * 100 + n, duration_ms: n, detail: '{"path":"read-only/context.ts"}' })), edges: [] }); @@ -26,7 +28,7 @@ function fixture(scope = 1) { vault: { listIntents: async () => { throw new Error('Never list unrelated repository intents'); }, getIntent: async (id) => { calls.push(['getIntent', id]); return { entry: { id, title: 'Improve session handling', body: ':::why\nUsers need predictable sessions.\n:::', vaultPath: '.vault/intents/test/intent.md' } }; }, getSignedIntent: async () => ({}) } }; - return { client, calls, events, views, explorer: new EvidenceExplorer('/repo', client, (op) => op(), (event) => events.push(event), (snapshot) => paths.push(snapshot)) }; + return { client, calls, events, views, explorer: new EvidenceExplorer(repo, client, (op) => op(), (event) => events.push(event), (snapshot) => paths.push(snapshot)) }; } describe('Authoritative view classification and draft routing', () => { @@ -43,7 +45,7 @@ describe('Authoritative view classification and draft routing', () => { expect(calls.filter(([name]) => name === 'change')).toHaveLength(1); expect(calls.filter(([name]) => name === 'getIntent')).toEqual([['getIntent', 'TEST::1']]); expect(events.at(-1).selection.id).toBe(hex(2)); - expect(explorer.intentFile('TEST::1')).toBe('/repo/.vault/intents/test/intent.md'); + expect(explorer.intentFile('TEST::1')).toBe(path.join(repo, '.vault/intents/test/intent.md')); }); test('navigation fences an in-flight explicit hash read', async () => { const { explorer, client, events } = fixture(); @@ -83,7 +85,7 @@ describe('Authoritative view classification and draft routing', () => { expect(calls.filter(([name]) => name === 'change')).toHaveLength(4); expect(calls.filter(([name]) => name === 'change').every(([, , options]) => options.includeFileContents === true)).toBe(true); expect(calls.filter(([name]) => name === 'getIntent')).toEqual([['getIntent', 'TEST::1']]); - expect(explorer.intentFile('TEST::1')).toBe('/repo/.vault/intents/test/intent.md'); + expect(explorer.intentFile('TEST::1')).toBe(path.join(repo, '.vault/intents/test/intent.md')); await explorer.inspectView('main'); expect(explorer.intentFile('TEST::1')).toBeUndefined(); }); diff --git a/scripts/atomicIntentView.test.mjs b/scripts/atomicIntentView.test.mjs index 729f4a2..1903d8d 100644 --- a/scripts/atomicIntentView.test.mjs +++ b/scripts/atomicIntentView.test.mjs @@ -250,7 +250,7 @@ test('unsafe prose blocks source switching rather than silently losing a draft', test('the actual MEO editor preserves the supplied fixture through live/source switching', async () => { const { createEditor } = await import('../webview/src/editor.ts'); - const fixture = readFileSync(new URL('../examples/sherpa.intent.md', import.meta.url), 'utf8'); + const fixture = readFileSync(new URL('../examples/sherpa.intent.md', import.meta.url), 'utf8').replace(/\r\n/g, '\n'); const outgoing = []; const parent = document.createElement('div'); document.body.append(parent); diff --git a/scripts/atomicPlanContext.test.mjs b/scripts/atomicPlanContext.test.mjs index f3f1f99..f8bb8ee 100644 --- a/scripts/atomicPlanContext.test.mjs +++ b/scripts/atomicPlanContext.test.mjs @@ -1,4 +1,5 @@ import { describe, test, expect } from 'bun:test'; +import nodePath from 'node:path'; import { Window } from 'happy-dom'; import { readChangeIntentContext } from '../src/atomic/changeIntentContext.ts'; import { intentReferences } from '../src/shared/changeIntentContext.ts'; @@ -70,9 +71,10 @@ describe('Native change-local plan and intent context', () => { change: async () => ({ change: { hash: { value: bytes(1) }, message: 'Legacy hello', authors: [], dependencies: [] }, provenanceLedger: [{ schema: 'atomic.prov.graph.v1', payload: Buffer.from(JSON.stringify(graph)) }], provenanceLedgerHashes: [{ value: bytes(2) }], intentContext: context() }), vault: { getIntent: async (reference) => { calls.push(reference); return { entry: { id: human, title: identity.title, body: ':::why\nBuild a runnable CLI.\n:::', vaultPath: null } }; } } }; - const explorer = new EvidenceExplorer('/repo', client, (op) => op(), (event) => events.push(event), () => {}); + const repo = nodePath.resolve('/repo'); + const explorer = new EvidenceExplorer(repo, client, (op) => op(), (event) => events.push(event), () => {}); await explorer.inspectView('main', true); await explorer.inspectHistoryHash(id); - expect(calls).toEqual([human]); expect(explorer.intentFile(human)).toBe(`/repo/${path}`); + expect(calls).toEqual([human]); expect(explorer.intentFile(human)).toBe(nodePath.join(repo, path)); expect(events.at(-1).selection.intentContext.planId).toBeUndefined(); const state = events.findLast((event) => event.type === 'state').state; expect(state.draft.intents[0].canOpenSource).toBe(true); diff --git a/scripts/atomicSourceControl.test.mjs b/scripts/atomicSourceControl.test.mjs index 427e1d0..bbf51c7 100644 --- a/scripts/atomicSourceControl.test.mjs +++ b/scripts/atomicSourceControl.test.mjs @@ -1,4 +1,5 @@ import { describe, expect, test } from 'bun:test'; +import path from 'node:path'; import { RepositorySession, resolveRepositoryPath, statusLabels } from '../src/atomic/model.ts'; function fixture() { @@ -11,14 +12,15 @@ function fixture() { views: { list: async () => { calls.push(['views']); return { views: [] }; } }, record: async (...args) => { calls.push(['record', ...args]); return {}; } }; - return { session: new RepositorySession('/repo', client), client, calls, status }; + return { session: new RepositorySession(path.resolve('/repo'), client), client, calls, status }; } describe('Atomic version control model', () => { test('validates repository-relative paths', () => { - expect(resolveRepositoryPath('/repo', 'src/intent.md')).toBe('/repo/src/intent.md'); + const repo = path.resolve('/repo'); + expect(resolveRepositoryPath(repo, 'src/intent.md')).toBe(path.join(repo, 'src/intent.md')); for (const file of ['', '.', '..', '../escape', '/absolute', 'src/../../escape']) { - expect(() => resolveRepositoryPath('/repo', file)).toThrow(); + expect(() => resolveRepositoryPath(repo, file)).toThrow(); } }); diff --git a/scripts/build-graph.mjs b/scripts/build-graph.mjs new file mode 100644 index 0000000..e96b248 --- /dev/null +++ b/scripts/build-graph.mjs @@ -0,0 +1,13 @@ +import { copyFile } from 'node:fs/promises'; + +const result = await Bun.build({ + entrypoints: ['webview/src/atomicGraph.ts'], + outdir: 'dist', + naming: 'atomic-graph.js', + target: 'browser', + format: 'iife', + minify: true +}); +if (!result.success) throw new AggregateError(result.logs, 'graph build failed'); + +await copyFile('webview/src/atomicGraph.css', 'dist/atomic-graph.css'); diff --git a/scripts/build-webview.mjs b/scripts/build-webview.mjs new file mode 100644 index 0000000..7b6a621 --- /dev/null +++ b/scripts/build-webview.mjs @@ -0,0 +1,19 @@ +import { cp, copyFile, mkdir, rm } from 'node:fs/promises'; + +await rm('webview/dist', { recursive: true, force: true }); +await mkdir('webview/dist/katex', { recursive: true }); + +const result = await Bun.build({ + entrypoints: ['webview/src/index.ts'], + outdir: 'webview/dist', + target: 'browser', + format: 'esm', + splitting: true, + minify: true +}); +if (!result.success) throw new AggregateError(result.logs, 'webview build failed'); + +await copyFile('webview/src/styles.css', 'webview/dist/index.css'); +await copyFile('node_modules/mermaid/dist/mermaid.min.js', 'webview/dist/mermaid.min.js'); +await copyFile('node_modules/katex/dist/katex.min.css', 'webview/dist/katex/katex.min.css'); +await cp('node_modules/katex/dist/fonts', 'webview/dist/katex/fonts', { recursive: true }); diff --git a/scripts/clean-dist.mjs b/scripts/clean-dist.mjs new file mode 100644 index 0000000..69fd9b9 --- /dev/null +++ b/scripts/clean-dist.mjs @@ -0,0 +1,3 @@ +import { rm } from 'node:fs/promises'; + +await rm('dist', { recursive: true, force: true }); diff --git a/scripts/exportImageEmbedding.test.mjs b/scripts/exportImageEmbedding.test.mjs index 426e576..d070ffd 100644 --- a/scripts/exportImageEmbedding.test.mjs +++ b/scripts/exportImageEmbedding.test.mjs @@ -2,6 +2,7 @@ import { afterAll, describe, expect, test } from 'bun:test'; import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; +import { pathToFileURL } from 'node:url'; import { rewriteExportImageSrc } from '../src/export/assetPaths.ts'; import { renderMarkdownToHtml } from '../src/export/renderMarkdown.ts'; @@ -50,8 +51,8 @@ describe('Export image embedding containment', () => { }); test('drops absolute and relative paths outside the workspace', () => { - expect(rewriteExportImageSrc(`file://${path.join(outside, 'secret.txt')}`, { ...base, target: 'html' })).toBe(''); - expect(rewriteExportImageSrc('../outside/pixel.png', { ...base, target: 'html' })).toBe(''); + expect(rewriteExportImageSrc(pathToFileURL(path.join(outside, 'secret.txt')).href, { ...base, target: 'html' })).toBe(''); + expect(rewriteExportImageSrc('../../outside/pixel.png', { ...base, target: 'html' })).toBe(''); }); test('drops symlinks that resolve outside the workspace', () => { @@ -60,8 +61,8 @@ describe('Export image embedding containment', () => { }); test('pdf and linked modes never expose an outside path', () => { - expect(rewriteExportImageSrc('../outside/pixel.png', { ...base, target: 'pdf' })).toBe(''); - expect(rewriteExportImageSrc('../outside/pixel.png', { ...base, target: 'html', htmlImageMode: 'linked' })).toBe(''); + expect(rewriteExportImageSrc('../../outside/pixel.png', { ...base, target: 'pdf' })).toBe(''); + expect(rewriteExportImageSrc('../../outside/pixel.png', { ...base, target: 'html', htmlImageMode: 'linked' })).toBe(''); }); test('linked mode keeps an inside workspace image as a relative link', () => { @@ -72,7 +73,7 @@ describe('Export image embedding containment', () => { test('markdown rendering applies the same containment rule', () => { const { html } = renderMarkdownToHtml({ - markdownText: '![inside](../assets/pixel.png)\n\n![outside](../outside/pixel.png)', + markdownText: '![inside](../assets/pixel.png)\n\n![outside](../../outside/pixel.png)', markdownFilePath: documentPath, workspaceRoot: workspace, outputFilePath: path.join(workspace, 'out.html'), diff --git a/scripts/fixtures/fakeAtomic.mjs b/scripts/fixtures/fakeAtomic.mjs new file mode 100644 index 0000000..9798ea6 --- /dev/null +++ b/scripts/fixtures/fakeAtomic.mjs @@ -0,0 +1,7 @@ +const args = process.argv.slice(2); +if (args[0] === '--version') { + process.stdout.write('atomic 0.0.0\n'); + process.exit(0); +} +process.stderr.write(`error: unknown-subcommand\ncmd: atomic\ngot: ${args[0] ?? ''}\n`); +process.exit(2); diff --git a/scripts/repositoryFiles.test.mjs b/scripts/repositoryFiles.test.mjs index c2e1f18..9c4e259 100644 --- a/scripts/repositoryFiles.test.mjs +++ b/scripts/repositoryFiles.test.mjs @@ -1,4 +1,5 @@ import { expect, test } from 'bun:test'; +import path from 'node:path'; import { partitionRepositoryFiles } from '../src/atomic/model.ts'; test('one malformed backend path does not discard valid SCM files', () => { @@ -9,10 +10,11 @@ test('one malformed backend path does not discard valid SCM files', () => { { path: '../escape.ts', status: 1 }, { path: 'src/../ok.ts', status: 1 } ]; - const { valid, invalid } = partitionRepositoryFiles('/repo', files); + const repo = path.resolve('/repo'); + const { valid, invalid } = partitionRepositoryFiles(repo, files); expect(valid.map(({ file, absolutePath }) => [file.path, absolutePath])).toEqual([ - ['src/a.ts', '/repo/src/a.ts'], - ['src/../ok.ts', '/repo/ok.ts'] + ['src/a.ts', path.join(repo, 'src/a.ts')], + ['src/../ok.ts', path.join(repo, 'ok.ts')] ]); expect(invalid).toHaveLength(3); expect(invalid.map(({ path }) => path)).toEqual(['', '/etc/passwd', '../escape.ts']); diff --git a/src/atomic/syncCli.ts b/src/atomic/syncCli.ts index e044848..6a683ff 100644 --- a/src/atomic/syncCli.ts +++ b/src/atomic/syncCli.ts @@ -10,12 +10,15 @@ export class AtomicCliError extends Error { } } -export type AtomicCliOptions = { cwd: string; timeoutMs?: number }; +export type AtomicCliOptions = { cwd: string; timeoutMs?: number; executable?: string; argsPrefix?: string[] }; /** Run the installed Atomic CLI for sync/remote workflows that need its identity and transport handling. */ export function runAtomicCli(args: string[], options: AtomicCliOptions): Promise<{ stdout: string; stderr: string }> { return new Promise((resolve, reject) => { - const child = spawn('atomic', args, { cwd: options.cwd, stdio: ['ignore', 'pipe', 'pipe'] }); + const child = spawn(options.executable ?? 'atomic', [...(options.argsPrefix ?? []), ...args], { + cwd: options.cwd, + stdio: ['ignore', 'pipe', 'pipe'] + }); const stdout: Buffer[] = []; const stderr: Buffer[] = []; let outputBytes = 0; diff --git a/src/export/pdfRenderer.ts b/src/export/pdfRenderer.ts index f76b221..2a131e4 100644 --- a/src/export/pdfRenderer.ts +++ b/src/export/pdfRenderer.ts @@ -126,7 +126,7 @@ async function withPreparedExportPage( async function loadBundledPuppeteerRuntime(explicitRuntimePath?: string): Promise { if (!puppeteerRuntimePromise) { - const runtimePath = explicitRuntimePath || path.join(__dirname, 'puppeteer-runtime.js'); + const runtimePath = explicitRuntimePath || path.join(__dirname, 'puppeteer-runtime.mjs'); const runtimeUrl = pathToFileURL(runtimePath).toString(); puppeteerRuntimePromise = import(runtimeUrl) .then((mod: any) => unwrapPuppeteerRuntime(mod)) diff --git a/src/export/puppeteerRuntime.ts b/src/export/puppeteerRuntime.mts similarity index 100% rename from src/export/puppeteerRuntime.ts rename to src/export/puppeteerRuntime.mts diff --git a/src/extension.ts b/src/extension.ts index ec3d10a..752358e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -919,7 +919,7 @@ class MarkdownWebviewProvider implements vscode.CustomEditorProvider native/libatomic.node (compiled by the Atomic project) + -> libatomic::LocalService + -> existing libatomic handlers + -> redb +``` + +Atomic owns both `libatomic/src/node.rs` (Node-API exports) and +`libatomic/src/local.rs` (local dispatch). Neither implementation resides here. +Its `node` feature is optional for ordinary Rust consumers. + +The service shares routing state and gates across calls and Node worker threads, +but it does not retain open databases. libatomic executes database work on its +Tokio blocking pool and drops repository handles per call. No close method is +needed for a resolved `AtomicRepository` reference. + +Invalid paths, non-repositories, malformed protobuf, unknown methods, and +contention timeouts reject the promise. `ATOMIC_SERVICE` and +`ATOMIC_DAEMON_SOCKET` do not select a backend here: calls are always local. + +## Existing service behavior + +The Status handler uses normal default options: untracked files are included, +but ignored untracked files are excluded according to `.atomicignore` and global +ignore rules. Already-tracked files remain subject to status checks. Filtering +happens in Atomic before ignored file contents are read or hashed, not in this +TypeScript wrapper. This package does not add reindexing or CLI presentation flags. + +The earlier handler incorrectly used `StatusOptions::all()` and scanned ignored +dependencies/build artifacts; that behavior is fixed and covered by regression +tests. This correction is not a general Git-like performance claim. + +redb's cross-process locks still apply. A writer in another process can delay +queries; libatomic uses its bounded wait controlled by `ATOMIC_DB_LOCK_WAIT_MS` +(currently defaults to 30 seconds). Existing upgrade/repair behavior can write +when recovery is necessary. Healthy queries are tested not to modify the DB. +This work does not evaluate redb v5 or change database topology. + +## Tests + +```sh +# After installing the addon: +npm test +ATOMIC_BIN=/path/to/atomic npm test +# Native service tests, in the Atomic project: +cd ~/Projects/atomic +cargo test --locked -p libatomic --test local_service_test +``` + +The integration tests require an installed Atomic CLI binary (`ATOMIC_BIN` or +`atomic` on PATH) only for temporary fixture setup, comparison, and verifying +that queries release handles. They do not compile it or require its source. +They configure an unusable daemon endpoint to ensure no service is needed; the +query itself never executes the CLI. Build-boundary tests run with an empty PATH +to prove that artifact installation/missing-addon errors don't need a toolchain. + +The npm package is private. Crate publication, npm publication, prebuilt platform +packages, other methods, and stable error codes are not implemented here. diff --git a/vendor/nodeatomic/dist/generated/proto.cjs b/vendor/nodeatomic/dist/generated/proto.cjs new file mode 100644 index 0000000..d1bf46e --- /dev/null +++ b/vendor/nodeatomic/dist/generated/proto.cjs @@ -0,0 +1,39215 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-mixed-operators, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, default-case, jsdoc/require-param*/ +"use strict"; + +var $protobuf = require("protobufjs/minimal"); + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; +var $Object = $util.global.Object, $undefined = $util.global.undefined, $Error = $util.global.Error, $RangeError = $util.global.RangeError, $TypeError = $util.global.TypeError, $String = $util.global.String, $Array = $util.global.Array, $Boolean = $util.global.Boolean, $Number = $util.global.Number, $parseInt = $util.global.parseInt, $BigInt = $util.global.BigInt, $isFinite = $util.global.isFinite; + +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +$root.atomic = (function() { + + /** + * Namespace atomic. + * @exports atomic + * @namespace + */ + var atomic = {}; + + atomic.ResolveRepositoryRequest = (function() { + + /** + * Properties of a ResolveRepositoryRequest. + * @typedef {Object} atomic.ResolveRepositoryRequest.$Properties + * @property {string|null} [path] ResolveRepositoryRequest path + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ResolveRepositoryRequest. + * @memberof atomic + * @interface IResolveRepositoryRequest + * @augments atomic.ResolveRepositoryRequest.$Properties + * @deprecated Use atomic.ResolveRepositoryRequest.$Properties instead. + */ + + /** + * Shape of a ResolveRepositoryRequest. + * @typedef {atomic.ResolveRepositoryRequest.$Properties} atomic.ResolveRepositoryRequest.$Shape + */ + + /** + * Constructs a new ResolveRepositoryRequest. + * @memberof atomic + * @classdesc Represents a ResolveRepositoryRequest. + * @constructor + * @param {atomic.ResolveRepositoryRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ResolveRepositoryRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ResolveRepositoryRequest path. + * @member {string} path + * @memberof atomic.ResolveRepositoryRequest + * @instance + */ + ResolveRepositoryRequest.prototype.path = ""; + + /** + * Creates a new ResolveRepositoryRequest instance using the specified properties. + * @function create + * @memberof atomic.ResolveRepositoryRequest + * @static + * @param {atomic.ResolveRepositoryRequest.$Properties=} [properties] Properties to set + * @returns {atomic.ResolveRepositoryRequest} ResolveRepositoryRequest instance + * @type {{ + * (properties: atomic.ResolveRepositoryRequest.$Shape): atomic.ResolveRepositoryRequest & atomic.ResolveRepositoryRequest.$Shape; + * (properties?: atomic.ResolveRepositoryRequest.$Properties): atomic.ResolveRepositoryRequest; + * }} + */ + ResolveRepositoryRequest.create = function(properties) { + return new ResolveRepositoryRequest(properties); + }; + + /** + * Encodes the specified ResolveRepositoryRequest message. Does not implicitly {@link atomic.ResolveRepositoryRequest.verify|verify} messages. + * @function encode + * @memberof atomic.ResolveRepositoryRequest + * @static + * @param {atomic.ResolveRepositoryRequest.$Properties} message ResolveRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResolveRepositoryRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ResolveRepositoryRequest message, length delimited. Does not implicitly {@link atomic.ResolveRepositoryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ResolveRepositoryRequest + * @static + * @param {atomic.ResolveRepositoryRequest.$Properties} message ResolveRepositoryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResolveRepositoryRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ResolveRepositoryRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.ResolveRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ResolveRepositoryRequest & atomic.ResolveRepositoryRequest.$Shape} ResolveRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResolveRepositoryRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ResolveRepositoryRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ResolveRepositoryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ResolveRepositoryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ResolveRepositoryRequest & atomic.ResolveRepositoryRequest.$Shape} ResolveRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResolveRepositoryRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ResolveRepositoryRequest message. + * @function verify + * @memberof atomic.ResolveRepositoryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResolveRepositoryRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a ResolveRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ResolveRepositoryRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.ResolveRepositoryRequest} ResolveRepositoryRequest + */ + ResolveRepositoryRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ResolveRepositoryRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ResolveRepositoryRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ResolveRepositoryRequest(); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + return message; + }; + + /** + * Creates a plain object from a ResolveRepositoryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ResolveRepositoryRequest + * @static + * @param {atomic.ResolveRepositoryRequest} message ResolveRepositoryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResolveRepositoryRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.path = ""; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + return object; + }; + + /** + * Converts this ResolveRepositoryRequest to JSON. + * @function toJSON + * @memberof atomic.ResolveRepositoryRequest + * @instance + * @returns {Object.} JSON object + */ + ResolveRepositoryRequest.prototype.toJSON = function() { + return ResolveRepositoryRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ResolveRepositoryRequest + * @function getTypeUrl + * @memberof atomic.ResolveRepositoryRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ResolveRepositoryRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ResolveRepositoryRequest"; + }; + + return ResolveRepositoryRequest; + })(); + + atomic.ResolveRepositoryResponse = (function() { + + /** + * Properties of a ResolveRepositoryResponse. + * @typedef {Object} atomic.ResolveRepositoryResponse.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] ResolveRepositoryResponse repository + * @property {atomic.WorkspaceInfo.$Properties|null} [workspace] ResolveRepositoryResponse workspace + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ResolveRepositoryResponse. + * @memberof atomic + * @interface IResolveRepositoryResponse + * @augments atomic.ResolveRepositoryResponse.$Properties + * @deprecated Use atomic.ResolveRepositoryResponse.$Properties instead. + */ + + /** + * Shape of a ResolveRepositoryResponse. + * @typedef {atomic.ResolveRepositoryResponse.$Properties} atomic.ResolveRepositoryResponse.$Shape + */ + + /** + * Constructs a new ResolveRepositoryResponse. + * @memberof atomic + * @classdesc Represents a ResolveRepositoryResponse. + * @constructor + * @param {atomic.ResolveRepositoryResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ResolveRepositoryResponse = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ResolveRepositoryResponse repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.ResolveRepositoryResponse + * @instance + */ + ResolveRepositoryResponse.prototype.repository = null; + + /** + * ResolveRepositoryResponse workspace. + * @member {atomic.WorkspaceInfo.$Properties|null|undefined} workspace + * @memberof atomic.ResolveRepositoryResponse + * @instance + */ + ResolveRepositoryResponse.prototype.workspace = null; + + /** + * Creates a new ResolveRepositoryResponse instance using the specified properties. + * @function create + * @memberof atomic.ResolveRepositoryResponse + * @static + * @param {atomic.ResolveRepositoryResponse.$Properties=} [properties] Properties to set + * @returns {atomic.ResolveRepositoryResponse} ResolveRepositoryResponse instance + * @type {{ + * (properties: atomic.ResolveRepositoryResponse.$Shape): atomic.ResolveRepositoryResponse & atomic.ResolveRepositoryResponse.$Shape; + * (properties?: atomic.ResolveRepositoryResponse.$Properties): atomic.ResolveRepositoryResponse; + * }} + */ + ResolveRepositoryResponse.create = function(properties) { + return new ResolveRepositoryResponse(properties); + }; + + /** + * Encodes the specified ResolveRepositoryResponse message. Does not implicitly {@link atomic.ResolveRepositoryResponse.verify|verify} messages. + * @function encode + * @memberof atomic.ResolveRepositoryResponse + * @static + * @param {atomic.ResolveRepositoryResponse.$Properties} message ResolveRepositoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResolveRepositoryResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.workspace != null && $Object.hasOwnProperty.call(message, "workspace")) + $root.atomic.WorkspaceInfo.encode(message.workspace, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ResolveRepositoryResponse message, length delimited. Does not implicitly {@link atomic.ResolveRepositoryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ResolveRepositoryResponse + * @static + * @param {atomic.ResolveRepositoryResponse.$Properties} message ResolveRepositoryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResolveRepositoryResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ResolveRepositoryResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.ResolveRepositoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ResolveRepositoryResponse & atomic.ResolveRepositoryResponse.$Shape} ResolveRepositoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResolveRepositoryResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ResolveRepositoryResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.workspace = $root.atomic.WorkspaceInfo.decode(reader, reader.size(), $undefined, _depth + 1, message.workspace); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ResolveRepositoryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ResolveRepositoryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ResolveRepositoryResponse & atomic.ResolveRepositoryResponse.$Shape} ResolveRepositoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResolveRepositoryResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ResolveRepositoryResponse message. + * @function verify + * @memberof atomic.ResolveRepositoryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResolveRepositoryResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.workspace != null && $Object.hasOwnProperty.call(message, "workspace")) { + var error = $root.atomic.WorkspaceInfo.verify(message.workspace, _depth + 1); + if (error) + return "workspace." + error; + } + return null; + }; + + /** + * Creates a ResolveRepositoryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ResolveRepositoryResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.ResolveRepositoryResponse} ResolveRepositoryResponse + */ + ResolveRepositoryResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ResolveRepositoryResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ResolveRepositoryResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ResolveRepositoryResponse(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.ResolveRepositoryResponse.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.workspace != null) { + if (!$util.isObject(object.workspace)) + throw $TypeError(".atomic.ResolveRepositoryResponse.workspace: object expected"); + message.workspace = $root.atomic.WorkspaceInfo.fromObject(object.workspace, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ResolveRepositoryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ResolveRepositoryResponse + * @static + * @param {atomic.ResolveRepositoryResponse} message ResolveRepositoryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResolveRepositoryResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.workspace = null; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.workspace != null && $Object.hasOwnProperty.call(message, "workspace")) + object.workspace = $root.atomic.WorkspaceInfo.toObject(message.workspace, options, _depth + 1); + return object; + }; + + /** + * Converts this ResolveRepositoryResponse to JSON. + * @function toJSON + * @memberof atomic.ResolveRepositoryResponse + * @instance + * @returns {Object.} JSON object + */ + ResolveRepositoryResponse.prototype.toJSON = function() { + return ResolveRepositoryResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ResolveRepositoryResponse + * @function getTypeUrl + * @memberof atomic.ResolveRepositoryResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ResolveRepositoryResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ResolveRepositoryResponse"; + }; + + return ResolveRepositoryResponse; + })(); + + atomic.RepositoryRef = (function() { + + /** + * Properties of a RepositoryRef. + * @typedef {Object} atomic.RepositoryRef.$Properties + * @property {string|null} [authority] RepositoryRef authority + * @property {Uint8Array|null} [repositoryId] RepositoryRef repositoryId + * @property {string|null} [workspaceId] RepositoryRef workspaceId + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RepositoryRef. + * @memberof atomic + * @interface IRepositoryRef + * @augments atomic.RepositoryRef.$Properties + * @deprecated Use atomic.RepositoryRef.$Properties instead. + */ + + /** + * Shape of a RepositoryRef. + * @typedef {atomic.RepositoryRef.$Properties} atomic.RepositoryRef.$Shape + */ + + /** + * Constructs a new RepositoryRef. + * @memberof atomic + * @classdesc Represents a RepositoryRef. + * @constructor + * @param {atomic.RepositoryRef.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var RepositoryRef = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * RepositoryRef authority. + * @member {string} authority + * @memberof atomic.RepositoryRef + * @instance + */ + RepositoryRef.prototype.authority = ""; + + /** + * RepositoryRef repositoryId. + * @member {Uint8Array} repositoryId + * @memberof atomic.RepositoryRef + * @instance + */ + RepositoryRef.prototype.repositoryId = $util.newBuffer([]); + + /** + * RepositoryRef workspaceId. + * @member {string|null|undefined} workspaceId + * @memberof atomic.RepositoryRef + * @instance + */ + RepositoryRef.prototype.workspaceId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RepositoryRef.prototype, "_workspace_id", { + get: $util.oneOfGetter($oneOfFields = ["workspaceId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RepositoryRef instance using the specified properties. + * @function create + * @memberof atomic.RepositoryRef + * @static + * @param {atomic.RepositoryRef.$Properties=} [properties] Properties to set + * @returns {atomic.RepositoryRef} RepositoryRef instance + * @type {{ + * (properties: atomic.RepositoryRef.$Shape): atomic.RepositoryRef & atomic.RepositoryRef.$Shape; + * (properties?: atomic.RepositoryRef.$Properties): atomic.RepositoryRef; + * }} + */ + RepositoryRef.create = function(properties) { + return new RepositoryRef(properties); + }; + + /** + * Encodes the specified RepositoryRef message. Does not implicitly {@link atomic.RepositoryRef.verify|verify} messages. + * @function encode + * @memberof atomic.RepositoryRef + * @static + * @param {atomic.RepositoryRef.$Properties} message RepositoryRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepositoryRef.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.authority != null && $Object.hasOwnProperty.call(message, "authority") && message.authority !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); + if (message.repositoryId != null && $Object.hasOwnProperty.call(message, "repositoryId") && message.repositoryId.length) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.repositoryId); + if (message.workspaceId != null && $Object.hasOwnProperty.call(message, "workspaceId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workspaceId); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified RepositoryRef message, length delimited. Does not implicitly {@link atomic.RepositoryRef.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.RepositoryRef + * @static + * @param {atomic.RepositoryRef.$Properties} message RepositoryRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepositoryRef.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a RepositoryRef message from the specified reader or buffer. + * @function decode + * @memberof atomic.RepositoryRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.RepositoryRef & atomic.RepositoryRef.$Shape} RepositoryRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepositoryRef.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.RepositoryRef(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.authority = value; + else + delete message.authority; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.bytes()).length) + message.repositoryId = value; + else + delete message.repositoryId; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.workspaceId = reader.stringVerify(); + message._workspace_id = "workspaceId"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a RepositoryRef message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.RepositoryRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.RepositoryRef & atomic.RepositoryRef.$Shape} RepositoryRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepositoryRef.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a RepositoryRef message. + * @function verify + * @memberof atomic.RepositoryRef + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RepositoryRef.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.authority != null && $Object.hasOwnProperty.call(message, "authority")) + if (!$util.isString(message.authority)) + return "authority: string expected"; + if (message.repositoryId != null && $Object.hasOwnProperty.call(message, "repositoryId")) + if (!(message.repositoryId && typeof message.repositoryId.length === "number" || $util.isString(message.repositoryId))) + return "repositoryId: buffer expected"; + if (message.workspaceId != null && $Object.hasOwnProperty.call(message, "workspaceId")) { + properties._workspace_id = 1; + if (!$util.isString(message.workspaceId)) + return "workspaceId: string expected"; + } + return null; + }; + + /** + * Creates a RepositoryRef message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.RepositoryRef + * @static + * @param {Object.} object Plain object + * @returns {atomic.RepositoryRef} RepositoryRef + */ + RepositoryRef.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.RepositoryRef) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.RepositoryRef: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.RepositoryRef(); + if (object.authority != null) + if (typeof object.authority !== "string" || object.authority.length) + message.authority = $String(object.authority); + if (object.repositoryId != null) + if (object.repositoryId.length) + if (typeof object.repositoryId === "string") + $util.base64.decode(object.repositoryId, message.repositoryId = $util.newBuffer($util.base64.length(object.repositoryId)), 0); + else if (object.repositoryId.length >= 0) + message.repositoryId = object.repositoryId; + if (object.workspaceId != null) + message.workspaceId = $String(object.workspaceId); + return message; + }; + + /** + * Creates a plain object from a RepositoryRef message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.RepositoryRef + * @static + * @param {atomic.RepositoryRef} message RepositoryRef + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RepositoryRef.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.authority = ""; + if (options.bytes === $String) + object.repositoryId = ""; + else { + object.repositoryId = []; + if (options.bytes !== $Array) + object.repositoryId = $util.newBuffer(object.repositoryId); + } + } + if (message.authority != null && $Object.hasOwnProperty.call(message, "authority")) + object.authority = message.authority; + if (message.repositoryId != null && $Object.hasOwnProperty.call(message, "repositoryId")) + object.repositoryId = options.bytes === $String ? $util.base64.encode(message.repositoryId, 0, message.repositoryId.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.repositoryId) : message.repositoryId; + if (message.workspaceId != null && $Object.hasOwnProperty.call(message, "workspaceId")) + object.workspaceId = message.workspaceId; + return object; + }; + + /** + * Converts this RepositoryRef to JSON. + * @function toJSON + * @memberof atomic.RepositoryRef + * @instance + * @returns {Object.} JSON object + */ + RepositoryRef.prototype.toJSON = function() { + return RepositoryRef.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RepositoryRef + * @function getTypeUrl + * @memberof atomic.RepositoryRef + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RepositoryRef.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.RepositoryRef"; + }; + + return RepositoryRef; + })(); + + atomic.WorkspaceInfo = (function() { + + /** + * Properties of a WorkspaceInfo. + * @typedef {Object} atomic.WorkspaceInfo.$Properties + * @property {string|null} [workspaceId] WorkspaceInfo workspaceId + * @property {string|null} [rootPath] WorkspaceInfo rootPath + * @property {string|null} [relativeCwd] WorkspaceInfo relativeCwd + * @property {atomic.ViewRef.$Properties|null} [currentView] WorkspaceInfo currentView + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a WorkspaceInfo. + * @memberof atomic + * @interface IWorkspaceInfo + * @augments atomic.WorkspaceInfo.$Properties + * @deprecated Use atomic.WorkspaceInfo.$Properties instead. + */ + + /** + * Shape of a WorkspaceInfo. + * @typedef {atomic.WorkspaceInfo.$Properties} atomic.WorkspaceInfo.$Shape + */ + + /** + * Constructs a new WorkspaceInfo. + * @memberof atomic + * @classdesc Represents a WorkspaceInfo. + * @constructor + * @param {atomic.WorkspaceInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var WorkspaceInfo = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * WorkspaceInfo workspaceId. + * @member {string} workspaceId + * @memberof atomic.WorkspaceInfo + * @instance + */ + WorkspaceInfo.prototype.workspaceId = ""; + + /** + * WorkspaceInfo rootPath. + * @member {string} rootPath + * @memberof atomic.WorkspaceInfo + * @instance + */ + WorkspaceInfo.prototype.rootPath = ""; + + /** + * WorkspaceInfo relativeCwd. + * @member {string} relativeCwd + * @memberof atomic.WorkspaceInfo + * @instance + */ + WorkspaceInfo.prototype.relativeCwd = ""; + + /** + * WorkspaceInfo currentView. + * @member {atomic.ViewRef.$Properties|null|undefined} currentView + * @memberof atomic.WorkspaceInfo + * @instance + */ + WorkspaceInfo.prototype.currentView = null; + + /** + * Creates a new WorkspaceInfo instance using the specified properties. + * @function create + * @memberof atomic.WorkspaceInfo + * @static + * @param {atomic.WorkspaceInfo.$Properties=} [properties] Properties to set + * @returns {atomic.WorkspaceInfo} WorkspaceInfo instance + * @type {{ + * (properties: atomic.WorkspaceInfo.$Shape): atomic.WorkspaceInfo & atomic.WorkspaceInfo.$Shape; + * (properties?: atomic.WorkspaceInfo.$Properties): atomic.WorkspaceInfo; + * }} + */ + WorkspaceInfo.create = function(properties) { + return new WorkspaceInfo(properties); + }; + + /** + * Encodes the specified WorkspaceInfo message. Does not implicitly {@link atomic.WorkspaceInfo.verify|verify} messages. + * @function encode + * @memberof atomic.WorkspaceInfo + * @static + * @param {atomic.WorkspaceInfo.$Properties} message WorkspaceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkspaceInfo.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.workspaceId != null && $Object.hasOwnProperty.call(message, "workspaceId") && message.workspaceId !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workspaceId); + if (message.rootPath != null && $Object.hasOwnProperty.call(message, "rootPath") && message.rootPath !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rootPath); + if (message.relativeCwd != null && $Object.hasOwnProperty.call(message, "relativeCwd") && message.relativeCwd !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.relativeCwd); + if (message.currentView != null && $Object.hasOwnProperty.call(message, "currentView")) + $root.atomic.ViewRef.encode(message.currentView, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified WorkspaceInfo message, length delimited. Does not implicitly {@link atomic.WorkspaceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.WorkspaceInfo + * @static + * @param {atomic.WorkspaceInfo.$Properties} message WorkspaceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkspaceInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a WorkspaceInfo message from the specified reader or buffer. + * @function decode + * @memberof atomic.WorkspaceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.WorkspaceInfo & atomic.WorkspaceInfo.$Shape} WorkspaceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkspaceInfo.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.WorkspaceInfo(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.workspaceId = value; + else + delete message.workspaceId; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.rootPath = value; + else + delete message.rootPath; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.relativeCwd = value; + else + delete message.relativeCwd; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.currentView = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.currentView); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a WorkspaceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.WorkspaceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.WorkspaceInfo & atomic.WorkspaceInfo.$Shape} WorkspaceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkspaceInfo.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a WorkspaceInfo message. + * @function verify + * @memberof atomic.WorkspaceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkspaceInfo.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.workspaceId != null && $Object.hasOwnProperty.call(message, "workspaceId")) + if (!$util.isString(message.workspaceId)) + return "workspaceId: string expected"; + if (message.rootPath != null && $Object.hasOwnProperty.call(message, "rootPath")) + if (!$util.isString(message.rootPath)) + return "rootPath: string expected"; + if (message.relativeCwd != null && $Object.hasOwnProperty.call(message, "relativeCwd")) + if (!$util.isString(message.relativeCwd)) + return "relativeCwd: string expected"; + if (message.currentView != null && $Object.hasOwnProperty.call(message, "currentView")) { + var error = $root.atomic.ViewRef.verify(message.currentView, _depth + 1); + if (error) + return "currentView." + error; + } + return null; + }; + + /** + * Creates a WorkspaceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.WorkspaceInfo + * @static + * @param {Object.} object Plain object + * @returns {atomic.WorkspaceInfo} WorkspaceInfo + */ + WorkspaceInfo.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.WorkspaceInfo) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.WorkspaceInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.WorkspaceInfo(); + if (object.workspaceId != null) + if (typeof object.workspaceId !== "string" || object.workspaceId.length) + message.workspaceId = $String(object.workspaceId); + if (object.rootPath != null) + if (typeof object.rootPath !== "string" || object.rootPath.length) + message.rootPath = $String(object.rootPath); + if (object.relativeCwd != null) + if (typeof object.relativeCwd !== "string" || object.relativeCwd.length) + message.relativeCwd = $String(object.relativeCwd); + if (object.currentView != null) { + if (!$util.isObject(object.currentView)) + throw $TypeError(".atomic.WorkspaceInfo.currentView: object expected"); + message.currentView = $root.atomic.ViewRef.fromObject(object.currentView, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a WorkspaceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.WorkspaceInfo + * @static + * @param {atomic.WorkspaceInfo} message WorkspaceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkspaceInfo.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.workspaceId = ""; + object.rootPath = ""; + object.relativeCwd = ""; + object.currentView = null; + } + if (message.workspaceId != null && $Object.hasOwnProperty.call(message, "workspaceId")) + object.workspaceId = message.workspaceId; + if (message.rootPath != null && $Object.hasOwnProperty.call(message, "rootPath")) + object.rootPath = message.rootPath; + if (message.relativeCwd != null && $Object.hasOwnProperty.call(message, "relativeCwd")) + object.relativeCwd = message.relativeCwd; + if (message.currentView != null && $Object.hasOwnProperty.call(message, "currentView")) + object.currentView = $root.atomic.ViewRef.toObject(message.currentView, options, _depth + 1); + return object; + }; + + /** + * Converts this WorkspaceInfo to JSON. + * @function toJSON + * @memberof atomic.WorkspaceInfo + * @instance + * @returns {Object.} JSON object + */ + WorkspaceInfo.prototype.toJSON = function() { + return WorkspaceInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for WorkspaceInfo + * @function getTypeUrl + * @memberof atomic.WorkspaceInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + WorkspaceInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.WorkspaceInfo"; + }; + + return WorkspaceInfo; + })(); + + atomic.ViewRef = (function() { + + /** + * Properties of a ViewRef. + * @typedef {Object} atomic.ViewRef.$Properties + * @property {Uint8Array|null} [viewId] ViewRef viewId + * @property {string|null} [name] ViewRef name + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ViewRef. + * @memberof atomic + * @interface IViewRef + * @augments atomic.ViewRef.$Properties + * @deprecated Use atomic.ViewRef.$Properties instead. + */ + + /** + * Shape of a ViewRef. + * @typedef {atomic.ViewRef.$Properties} atomic.ViewRef.$Shape + */ + + /** + * Constructs a new ViewRef. + * @memberof atomic + * @classdesc Represents a ViewRef. + * @constructor + * @param {atomic.ViewRef.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ViewRef = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ViewRef viewId. + * @member {Uint8Array} viewId + * @memberof atomic.ViewRef + * @instance + */ + ViewRef.prototype.viewId = $util.newBuffer([]); + + /** + * ViewRef name. + * @member {string|null|undefined} name + * @memberof atomic.ViewRef + * @instance + */ + ViewRef.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ViewRef.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ViewRef instance using the specified properties. + * @function create + * @memberof atomic.ViewRef + * @static + * @param {atomic.ViewRef.$Properties=} [properties] Properties to set + * @returns {atomic.ViewRef} ViewRef instance + * @type {{ + * (properties: atomic.ViewRef.$Shape): atomic.ViewRef & atomic.ViewRef.$Shape; + * (properties?: atomic.ViewRef.$Properties): atomic.ViewRef; + * }} + */ + ViewRef.create = function(properties) { + return new ViewRef(properties); + }; + + /** + * Encodes the specified ViewRef message. Does not implicitly {@link atomic.ViewRef.verify|verify} messages. + * @function encode + * @memberof atomic.ViewRef + * @static + * @param {atomic.ViewRef.$Properties} message ViewRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewRef.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.viewId != null && $Object.hasOwnProperty.call(message, "viewId") && message.viewId.length) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.viewId); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ViewRef message, length delimited. Does not implicitly {@link atomic.ViewRef.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ViewRef + * @static + * @param {atomic.ViewRef.$Properties} message ViewRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewRef.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ViewRef message from the specified reader or buffer. + * @function decode + * @memberof atomic.ViewRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ViewRef & atomic.ViewRef.$Shape} ViewRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewRef.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ViewRef(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.bytes()).length) + message.viewId = value; + else + delete message.viewId; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.name = reader.stringVerify(); + message._name = "name"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ViewRef message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ViewRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ViewRef & atomic.ViewRef.$Shape} ViewRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewRef.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ViewRef message. + * @function verify + * @memberof atomic.ViewRef + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ViewRef.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.viewId != null && $Object.hasOwnProperty.call(message, "viewId")) + if (!(message.viewId && typeof message.viewId.length === "number" || $util.isString(message.viewId))) + return "viewId: buffer expected"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + return null; + }; + + /** + * Creates a ViewRef message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ViewRef + * @static + * @param {Object.} object Plain object + * @returns {atomic.ViewRef} ViewRef + */ + ViewRef.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ViewRef) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ViewRef: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ViewRef(); + if (object.viewId != null) + if (object.viewId.length) + if (typeof object.viewId === "string") + $util.base64.decode(object.viewId, message.viewId = $util.newBuffer($util.base64.length(object.viewId)), 0); + else if (object.viewId.length >= 0) + message.viewId = object.viewId; + if (object.name != null) + message.name = $String(object.name); + return message; + }; + + /** + * Creates a plain object from a ViewRef message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ViewRef + * @static + * @param {atomic.ViewRef} message ViewRef + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ViewRef.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if (options.bytes === $String) + object.viewId = ""; + else { + object.viewId = []; + if (options.bytes !== $Array) + object.viewId = $util.newBuffer(object.viewId); + } + if (message.viewId != null && $Object.hasOwnProperty.call(message, "viewId")) + object.viewId = options.bytes === $String ? $util.base64.encode(message.viewId, 0, message.viewId.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.viewId) : message.viewId; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ViewRef to JSON. + * @function toJSON + * @memberof atomic.ViewRef + * @instance + * @returns {Object.} JSON object + */ + ViewRef.prototype.toJSON = function() { + return ViewRef.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ViewRef + * @function getTypeUrl + * @memberof atomic.ViewRef + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ViewRef.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ViewRef"; + }; + + return ViewRef; + })(); + + atomic.StatusRequest = (function() { + + /** + * Properties of a StatusRequest. + * @typedef {Object} atomic.StatusRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] StatusRequest repository + * @property {atomic.StatusOptions.$Properties|null} [options] StatusRequest options + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a StatusRequest. + * @memberof atomic + * @interface IStatusRequest + * @augments atomic.StatusRequest.$Properties + * @deprecated Use atomic.StatusRequest.$Properties instead. + */ + + /** + * Shape of a StatusRequest. + * @typedef {atomic.StatusRequest.$Properties} atomic.StatusRequest.$Shape + */ + + /** + * Constructs a new StatusRequest. + * @memberof atomic + * @classdesc Represents a StatusRequest. + * @constructor + * @param {atomic.StatusRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var StatusRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * StatusRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.StatusRequest + * @instance + */ + StatusRequest.prototype.repository = null; + + /** + * StatusRequest options. + * @member {atomic.StatusOptions.$Properties|null|undefined} options + * @memberof atomic.StatusRequest + * @instance + */ + StatusRequest.prototype.options = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(StatusRequest.prototype, "_options", { + get: $util.oneOfGetter($oneOfFields = ["options"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StatusRequest instance using the specified properties. + * @function create + * @memberof atomic.StatusRequest + * @static + * @param {atomic.StatusRequest.$Properties=} [properties] Properties to set + * @returns {atomic.StatusRequest} StatusRequest instance + * @type {{ + * (properties: atomic.StatusRequest.$Shape): atomic.StatusRequest & atomic.StatusRequest.$Shape; + * (properties?: atomic.StatusRequest.$Properties): atomic.StatusRequest; + * }} + */ + StatusRequest.create = function(properties) { + return new StatusRequest(properties); + }; + + /** + * Encodes the specified StatusRequest message. Does not implicitly {@link atomic.StatusRequest.verify|verify} messages. + * @function encode + * @memberof atomic.StatusRequest + * @static + * @param {atomic.StatusRequest.$Properties} message StatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + $root.atomic.StatusOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified StatusRequest message, length delimited. Does not implicitly {@link atomic.StatusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.StatusRequest + * @static + * @param {atomic.StatusRequest.$Properties} message StatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a StatusRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.StatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.StatusRequest & atomic.StatusRequest.$Shape} StatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.StatusRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.options = $root.atomic.StatusOptions.decode(reader, reader.size(), $undefined, _depth + 1, message.options); + message._options = "options"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a StatusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.StatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.StatusRequest & atomic.StatusRequest.$Shape} StatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a StatusRequest message. + * @function verify + * @memberof atomic.StatusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatusRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) { + properties._options = 1; + { + var error = $root.atomic.StatusOptions.verify(message.options, _depth + 1); + if (error) + return "options." + error; + } + } + return null; + }; + + /** + * Creates a StatusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.StatusRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.StatusRequest} StatusRequest + */ + StatusRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.StatusRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.StatusRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.StatusRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.StatusRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.options != null) { + if (!$util.isObject(object.options)) + throw $TypeError(".atomic.StatusRequest.options: object expected"); + message.options = $root.atomic.StatusOptions.fromObject(object.options, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a StatusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.StatusRequest + * @static + * @param {atomic.StatusRequest} message StatusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatusRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.repository = null; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.options != null && $Object.hasOwnProperty.call(message, "options")) + object.options = $root.atomic.StatusOptions.toObject(message.options, options, _depth + 1); + return object; + }; + + /** + * Converts this StatusRequest to JSON. + * @function toJSON + * @memberof atomic.StatusRequest + * @instance + * @returns {Object.} JSON object + */ + StatusRequest.prototype.toJSON = function() { + return StatusRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for StatusRequest + * @function getTypeUrl + * @memberof atomic.StatusRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + StatusRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.StatusRequest"; + }; + + return StatusRequest; + })(); + + atomic.StatusOptions = (function() { + + /** + * Properties of a StatusOptions. + * @typedef {Object} atomic.StatusOptions.$Properties + * @property {boolean|null} [includeUntracked] StatusOptions includeUntracked + * @property {boolean|null} [includeIgnored] StatusOptions includeIgnored + * @property {boolean|null} [respectIgnoreFiles] StatusOptions respectIgnoreFiles + * @property {boolean|null} [hashContents] StatusOptions hashContents + * @property {Array.|null} [pathFilters] StatusOptions pathFilters + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a StatusOptions. + * @memberof atomic + * @interface IStatusOptions + * @augments atomic.StatusOptions.$Properties + * @deprecated Use atomic.StatusOptions.$Properties instead. + */ + + /** + * Shape of a StatusOptions. + * @typedef {atomic.StatusOptions.$Properties} atomic.StatusOptions.$Shape + */ + + /** + * Constructs a new StatusOptions. + * @memberof atomic + * @classdesc Represents a StatusOptions. + * @constructor + * @param {atomic.StatusOptions.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var StatusOptions = function (properties) { + this.pathFilters = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * StatusOptions includeUntracked. + * @member {boolean|null|undefined} includeUntracked + * @memberof atomic.StatusOptions + * @instance + */ + StatusOptions.prototype.includeUntracked = null; + + /** + * StatusOptions includeIgnored. + * @member {boolean|null|undefined} includeIgnored + * @memberof atomic.StatusOptions + * @instance + */ + StatusOptions.prototype.includeIgnored = null; + + /** + * StatusOptions respectIgnoreFiles. + * @member {boolean|null|undefined} respectIgnoreFiles + * @memberof atomic.StatusOptions + * @instance + */ + StatusOptions.prototype.respectIgnoreFiles = null; + + /** + * StatusOptions hashContents. + * @member {boolean|null|undefined} hashContents + * @memberof atomic.StatusOptions + * @instance + */ + StatusOptions.prototype.hashContents = null; + + /** + * StatusOptions pathFilters. + * @member {Array.} pathFilters + * @memberof atomic.StatusOptions + * @instance + */ + StatusOptions.prototype.pathFilters = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(StatusOptions.prototype, "_include_untracked", { + get: $util.oneOfGetter($oneOfFields = ["includeUntracked"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(StatusOptions.prototype, "_include_ignored", { + get: $util.oneOfGetter($oneOfFields = ["includeIgnored"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(StatusOptions.prototype, "_respect_ignore_files", { + get: $util.oneOfGetter($oneOfFields = ["respectIgnoreFiles"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(StatusOptions.prototype, "_hash_contents", { + get: $util.oneOfGetter($oneOfFields = ["hashContents"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StatusOptions instance using the specified properties. + * @function create + * @memberof atomic.StatusOptions + * @static + * @param {atomic.StatusOptions.$Properties=} [properties] Properties to set + * @returns {atomic.StatusOptions} StatusOptions instance + * @type {{ + * (properties: atomic.StatusOptions.$Shape): atomic.StatusOptions & atomic.StatusOptions.$Shape; + * (properties?: atomic.StatusOptions.$Properties): atomic.StatusOptions; + * }} + */ + StatusOptions.create = function(properties) { + return new StatusOptions(properties); + }; + + /** + * Encodes the specified StatusOptions message. Does not implicitly {@link atomic.StatusOptions.verify|verify} messages. + * @function encode + * @memberof atomic.StatusOptions + * @static + * @param {atomic.StatusOptions.$Properties} message StatusOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusOptions.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.includeUntracked != null && $Object.hasOwnProperty.call(message, "includeUntracked")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.includeUntracked); + if (message.includeIgnored != null && $Object.hasOwnProperty.call(message, "includeIgnored")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeIgnored); + if (message.respectIgnoreFiles != null && $Object.hasOwnProperty.call(message, "respectIgnoreFiles")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.respectIgnoreFiles); + if (message.hashContents != null && $Object.hasOwnProperty.call(message, "hashContents")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.hashContents); + if (message.pathFilters != null && message.pathFilters.length) + for (var i = 0; i < message.pathFilters.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pathFilters[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified StatusOptions message, length delimited. Does not implicitly {@link atomic.StatusOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.StatusOptions + * @static + * @param {atomic.StatusOptions.$Properties} message StatusOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusOptions.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a StatusOptions message from the specified reader or buffer. + * @function decode + * @memberof atomic.StatusOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.StatusOptions & atomic.StatusOptions.$Shape} StatusOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusOptions.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.StatusOptions(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.includeUntracked = reader.bool(); + message._include_untracked = "includeUntracked"; + continue; + } + case 2: { + if (wireType !== 0) + break; + message.includeIgnored = reader.bool(); + message._include_ignored = "includeIgnored"; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.respectIgnoreFiles = reader.bool(); + message._respect_ignore_files = "respectIgnoreFiles"; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.hashContents = reader.bool(); + message._hash_contents = "hashContents"; + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.pathFilters && message.pathFilters.length)) + message.pathFilters = []; + message.pathFilters.push(reader.stringVerify()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a StatusOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.StatusOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.StatusOptions & atomic.StatusOptions.$Shape} StatusOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusOptions.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a StatusOptions message. + * @function verify + * @memberof atomic.StatusOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatusOptions.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.includeUntracked != null && $Object.hasOwnProperty.call(message, "includeUntracked")) { + properties._include_untracked = 1; + if (typeof message.includeUntracked !== "boolean") + return "includeUntracked: boolean expected"; + } + if (message.includeIgnored != null && $Object.hasOwnProperty.call(message, "includeIgnored")) { + properties._include_ignored = 1; + if (typeof message.includeIgnored !== "boolean") + return "includeIgnored: boolean expected"; + } + if (message.respectIgnoreFiles != null && $Object.hasOwnProperty.call(message, "respectIgnoreFiles")) { + properties._respect_ignore_files = 1; + if (typeof message.respectIgnoreFiles !== "boolean") + return "respectIgnoreFiles: boolean expected"; + } + if (message.hashContents != null && $Object.hasOwnProperty.call(message, "hashContents")) { + properties._hash_contents = 1; + if (typeof message.hashContents !== "boolean") + return "hashContents: boolean expected"; + } + if (message.pathFilters != null && $Object.hasOwnProperty.call(message, "pathFilters")) { + if (!$Array.isArray(message.pathFilters)) + return "pathFilters: array expected"; + for (var i = 0; i < message.pathFilters.length; ++i) + if (!$util.isString(message.pathFilters[i])) + return "pathFilters: string[] expected"; + } + return null; + }; + + /** + * Creates a StatusOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.StatusOptions + * @static + * @param {Object.} object Plain object + * @returns {atomic.StatusOptions} StatusOptions + */ + StatusOptions.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.StatusOptions) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.StatusOptions: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.StatusOptions(); + if (object.includeUntracked != null) + message.includeUntracked = $Boolean(object.includeUntracked); + if (object.includeIgnored != null) + message.includeIgnored = $Boolean(object.includeIgnored); + if (object.respectIgnoreFiles != null) + message.respectIgnoreFiles = $Boolean(object.respectIgnoreFiles); + if (object.hashContents != null) + message.hashContents = $Boolean(object.hashContents); + if (object.pathFilters) { + if (!$Array.isArray(object.pathFilters)) + throw $TypeError(".atomic.StatusOptions.pathFilters: array expected"); + message.pathFilters = $Array(object.pathFilters.length); + for (var i = 0; i < object.pathFilters.length; ++i) + message.pathFilters[i] = $String(object.pathFilters[i]); + } + return message; + }; + + /** + * Creates a plain object from a StatusOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.StatusOptions + * @static + * @param {atomic.StatusOptions} message StatusOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatusOptions.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.pathFilters = []; + if (message.includeUntracked != null && $Object.hasOwnProperty.call(message, "includeUntracked")) + object.includeUntracked = message.includeUntracked; + if (message.includeIgnored != null && $Object.hasOwnProperty.call(message, "includeIgnored")) + object.includeIgnored = message.includeIgnored; + if (message.respectIgnoreFiles != null && $Object.hasOwnProperty.call(message, "respectIgnoreFiles")) + object.respectIgnoreFiles = message.respectIgnoreFiles; + if (message.hashContents != null && $Object.hasOwnProperty.call(message, "hashContents")) + object.hashContents = message.hashContents; + if (message.pathFilters && message.pathFilters.length) { + object.pathFilters = $Array(message.pathFilters.length); + for (var j = 0; j < message.pathFilters.length; ++j) + object.pathFilters[j] = message.pathFilters[j]; + } + return object; + }; + + /** + * Converts this StatusOptions to JSON. + * @function toJSON + * @memberof atomic.StatusOptions + * @instance + * @returns {Object.} JSON object + */ + StatusOptions.prototype.toJSON = function() { + return StatusOptions.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for StatusOptions + * @function getTypeUrl + * @memberof atomic.StatusOptions + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + StatusOptions.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.StatusOptions"; + }; + + return StatusOptions; + })(); + + atomic.StatusResponse = (function() { + + /** + * Properties of a StatusResponse. + * @typedef {Object} atomic.StatusResponse.$Properties + * @property {string|null} [view] StatusResponse view + * @property {atomic.Hash.$Properties|null} [viewMerkle] StatusResponse viewMerkle + * @property {Array.|null} [files] StatusResponse files + * @property {number|null} [modifiedCount] StatusResponse modifiedCount + * @property {number|null} [deletedCount] StatusResponse deletedCount + * @property {number|null} [untrackedCount] StatusResponse untrackedCount + * @property {number|null} [addedCount] StatusResponse addedCount + * @property {number|null} [conflictedCount] StatusResponse conflictedCount + * @property {number|null} [staleIndexCount] StatusResponse staleIndexCount + * @property {atomic.ViewSnapshot.$Properties|null} [snapshot] StatusResponse snapshot + * @property {boolean|null} [needsReindex] StatusResponse needsReindex + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a StatusResponse. + * @memberof atomic + * @interface IStatusResponse + * @augments atomic.StatusResponse.$Properties + * @deprecated Use atomic.StatusResponse.$Properties instead. + */ + + /** + * Shape of a StatusResponse. + * @typedef {atomic.StatusResponse.$Properties} atomic.StatusResponse.$Shape + */ + + /** + * Constructs a new StatusResponse. + * @memberof atomic + * @classdesc Represents a StatusResponse. + * @constructor + * @param {atomic.StatusResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var StatusResponse = function (properties) { + this.files = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * StatusResponse view. + * @member {string} view + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.view = ""; + + /** + * StatusResponse viewMerkle. + * @member {atomic.Hash.$Properties|null|undefined} viewMerkle + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.viewMerkle = null; + + /** + * StatusResponse files. + * @member {Array.} files + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.files = $util.emptyArray; + + /** + * StatusResponse modifiedCount. + * @member {number} modifiedCount + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.modifiedCount = 0; + + /** + * StatusResponse deletedCount. + * @member {number} deletedCount + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.deletedCount = 0; + + /** + * StatusResponse untrackedCount. + * @member {number} untrackedCount + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.untrackedCount = 0; + + /** + * StatusResponse addedCount. + * @member {number} addedCount + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.addedCount = 0; + + /** + * StatusResponse conflictedCount. + * @member {number} conflictedCount + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.conflictedCount = 0; + + /** + * StatusResponse staleIndexCount. + * @member {number} staleIndexCount + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.staleIndexCount = 0; + + /** + * StatusResponse snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.snapshot = null; + + /** + * StatusResponse needsReindex. + * @member {boolean} needsReindex + * @memberof atomic.StatusResponse + * @instance + */ + StatusResponse.prototype.needsReindex = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(StatusResponse.prototype, "_view_merkle", { + get: $util.oneOfGetter($oneOfFields = ["viewMerkle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StatusResponse instance using the specified properties. + * @function create + * @memberof atomic.StatusResponse + * @static + * @param {atomic.StatusResponse.$Properties=} [properties] Properties to set + * @returns {atomic.StatusResponse} StatusResponse instance + * @type {{ + * (properties: atomic.StatusResponse.$Shape): atomic.StatusResponse & atomic.StatusResponse.$Shape; + * (properties?: atomic.StatusResponse.$Properties): atomic.StatusResponse; + * }} + */ + StatusResponse.create = function(properties) { + return new StatusResponse(properties); + }; + + /** + * Encodes the specified StatusResponse message. Does not implicitly {@link atomic.StatusResponse.verify|verify} messages. + * @function encode + * @memberof atomic.StatusResponse + * @static + * @param {atomic.StatusResponse.$Properties} message StatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.view != null && $Object.hasOwnProperty.call(message, "view") && message.view !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.view); + if (message.viewMerkle != null && $Object.hasOwnProperty.call(message, "viewMerkle")) + $root.atomic.Hash.encode(message.viewMerkle, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.atomic.FileStatusEntry.encode(message.files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.modifiedCount != null && $Object.hasOwnProperty.call(message, "modifiedCount") && message.modifiedCount !== 0) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.modifiedCount); + if (message.deletedCount != null && $Object.hasOwnProperty.call(message, "deletedCount") && message.deletedCount !== 0) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.deletedCount); + if (message.untrackedCount != null && $Object.hasOwnProperty.call(message, "untrackedCount") && message.untrackedCount !== 0) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.untrackedCount); + if (message.addedCount != null && $Object.hasOwnProperty.call(message, "addedCount") && message.addedCount !== 0) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.addedCount); + if (message.conflictedCount != null && $Object.hasOwnProperty.call(message, "conflictedCount") && message.conflictedCount !== 0) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.conflictedCount); + if (message.staleIndexCount != null && $Object.hasOwnProperty.call(message, "staleIndexCount") && message.staleIndexCount !== 0) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.staleIndexCount); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + $root.atomic.ViewSnapshot.encode(message.snapshot, writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.needsReindex != null && $Object.hasOwnProperty.call(message, "needsReindex") && message.needsReindex !== false) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.needsReindex); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified StatusResponse message, length delimited. Does not implicitly {@link atomic.StatusResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.StatusResponse + * @static + * @param {atomic.StatusResponse.$Properties} message StatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a StatusResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.StatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.StatusResponse & atomic.StatusResponse.$Shape} StatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.StatusResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.view = value; + else + delete message.view; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.viewMerkle = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.viewMerkle); + message._view_merkle = "viewMerkle"; + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.atomic.FileStatusEntry.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.modifiedCount = value; + else + delete message.modifiedCount; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.deletedCount = value; + else + delete message.deletedCount; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.untrackedCount = value; + else + delete message.untrackedCount; + continue; + } + case 7: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.addedCount = value; + else + delete message.addedCount; + continue; + } + case 8: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.conflictedCount = value; + else + delete message.conflictedCount; + continue; + } + case 9: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.staleIndexCount = value; + else + delete message.staleIndexCount; + continue; + } + case 10: { + if (wireType !== 2) + break; + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + continue; + } + case 11: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.needsReindex = value; + else + delete message.needsReindex; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a StatusResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.StatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.StatusResponse & atomic.StatusResponse.$Shape} StatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a StatusResponse message. + * @function verify + * @memberof atomic.StatusResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatusResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + if (!$util.isString(message.view)) + return "view: string expected"; + if (message.viewMerkle != null && $Object.hasOwnProperty.call(message, "viewMerkle")) { + properties._view_merkle = 1; + { + var error = $root.atomic.Hash.verify(message.viewMerkle, _depth + 1); + if (error) + return "viewMerkle." + error; + } + } + if (message.files != null && $Object.hasOwnProperty.call(message, "files")) { + if (!$Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) { + var error = $root.atomic.FileStatusEntry.verify(message.files[i], _depth + 1); + if (error) + return "files." + error; + } + } + if (message.modifiedCount != null && $Object.hasOwnProperty.call(message, "modifiedCount")) + if (!$util.isInteger(message.modifiedCount)) + return "modifiedCount: integer expected"; + if (message.deletedCount != null && $Object.hasOwnProperty.call(message, "deletedCount")) + if (!$util.isInteger(message.deletedCount)) + return "deletedCount: integer expected"; + if (message.untrackedCount != null && $Object.hasOwnProperty.call(message, "untrackedCount")) + if (!$util.isInteger(message.untrackedCount)) + return "untrackedCount: integer expected"; + if (message.addedCount != null && $Object.hasOwnProperty.call(message, "addedCount")) + if (!$util.isInteger(message.addedCount)) + return "addedCount: integer expected"; + if (message.conflictedCount != null && $Object.hasOwnProperty.call(message, "conflictedCount")) + if (!$util.isInteger(message.conflictedCount)) + return "conflictedCount: integer expected"; + if (message.staleIndexCount != null && $Object.hasOwnProperty.call(message, "staleIndexCount")) + if (!$util.isInteger(message.staleIndexCount)) + return "staleIndexCount: integer expected"; + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { + var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); + if (error) + return "snapshot." + error; + } + if (message.needsReindex != null && $Object.hasOwnProperty.call(message, "needsReindex")) + if (typeof message.needsReindex !== "boolean") + return "needsReindex: boolean expected"; + return null; + }; + + /** + * Creates a StatusResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.StatusResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.StatusResponse} StatusResponse + */ + StatusResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.StatusResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.StatusResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.StatusResponse(); + if (object.view != null) + if (typeof object.view !== "string" || object.view.length) + message.view = $String(object.view); + if (object.viewMerkle != null) { + if (!$util.isObject(object.viewMerkle)) + throw $TypeError(".atomic.StatusResponse.viewMerkle: object expected"); + message.viewMerkle = $root.atomic.Hash.fromObject(object.viewMerkle, _depth + 1); + } + if (object.files) { + if (!$Array.isArray(object.files)) + throw $TypeError(".atomic.StatusResponse.files: array expected"); + message.files = $Array(object.files.length); + for (var i = 0; i < object.files.length; ++i) { + if (!$util.isObject(object.files[i])) + throw $TypeError(".atomic.StatusResponse.files: object expected"); + message.files[i] = $root.atomic.FileStatusEntry.fromObject(object.files[i], _depth + 1); + } + } + if (object.modifiedCount != null) + if ($Number(object.modifiedCount) !== 0) + message.modifiedCount = object.modifiedCount >>> 0; + if (object.deletedCount != null) + if ($Number(object.deletedCount) !== 0) + message.deletedCount = object.deletedCount >>> 0; + if (object.untrackedCount != null) + if ($Number(object.untrackedCount) !== 0) + message.untrackedCount = object.untrackedCount >>> 0; + if (object.addedCount != null) + if ($Number(object.addedCount) !== 0) + message.addedCount = object.addedCount >>> 0; + if (object.conflictedCount != null) + if ($Number(object.conflictedCount) !== 0) + message.conflictedCount = object.conflictedCount >>> 0; + if (object.staleIndexCount != null) + if ($Number(object.staleIndexCount) !== 0) + message.staleIndexCount = object.staleIndexCount >>> 0; + if (object.snapshot != null) { + if (!$util.isObject(object.snapshot)) + throw $TypeError(".atomic.StatusResponse.snapshot: object expected"); + message.snapshot = $root.atomic.ViewSnapshot.fromObject(object.snapshot, _depth + 1); + } + if (object.needsReindex != null) + if (object.needsReindex) + message.needsReindex = $Boolean(object.needsReindex); + return message; + }; + + /** + * Creates a plain object from a StatusResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.StatusResponse + * @static + * @param {atomic.StatusResponse} message StatusResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatusResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) { + object.view = ""; + object.modifiedCount = 0; + object.deletedCount = 0; + object.untrackedCount = 0; + object.addedCount = 0; + object.conflictedCount = 0; + object.staleIndexCount = 0; + object.snapshot = null; + object.needsReindex = false; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + if (message.viewMerkle != null && $Object.hasOwnProperty.call(message, "viewMerkle")) + object.viewMerkle = $root.atomic.Hash.toObject(message.viewMerkle, options, _depth + 1); + if (message.files && message.files.length) { + object.files = $Array(message.files.length); + for (var j = 0; j < message.files.length; ++j) + object.files[j] = $root.atomic.FileStatusEntry.toObject(message.files[j], options, _depth + 1); + } + if (message.modifiedCount != null && $Object.hasOwnProperty.call(message, "modifiedCount")) + object.modifiedCount = message.modifiedCount; + if (message.deletedCount != null && $Object.hasOwnProperty.call(message, "deletedCount")) + object.deletedCount = message.deletedCount; + if (message.untrackedCount != null && $Object.hasOwnProperty.call(message, "untrackedCount")) + object.untrackedCount = message.untrackedCount; + if (message.addedCount != null && $Object.hasOwnProperty.call(message, "addedCount")) + object.addedCount = message.addedCount; + if (message.conflictedCount != null && $Object.hasOwnProperty.call(message, "conflictedCount")) + object.conflictedCount = message.conflictedCount; + if (message.staleIndexCount != null && $Object.hasOwnProperty.call(message, "staleIndexCount")) + object.staleIndexCount = message.staleIndexCount; + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + object.snapshot = $root.atomic.ViewSnapshot.toObject(message.snapshot, options, _depth + 1); + if (message.needsReindex != null && $Object.hasOwnProperty.call(message, "needsReindex")) + object.needsReindex = message.needsReindex; + return object; + }; + + /** + * Converts this StatusResponse to JSON. + * @function toJSON + * @memberof atomic.StatusResponse + * @instance + * @returns {Object.} JSON object + */ + StatusResponse.prototype.toJSON = function() { + return StatusResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for StatusResponse + * @function getTypeUrl + * @memberof atomic.StatusResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + StatusResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.StatusResponse"; + }; + + return StatusResponse; + })(); + + atomic.Hash = (function() { + + /** + * Properties of a Hash. + * @typedef {Object} atomic.Hash.$Properties + * @property {Uint8Array|null} [value] Hash value + * @property {atomic.HashAlgorithm|null} [algorithm] Hash algorithm + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Hash. + * @memberof atomic + * @interface IHash + * @augments atomic.Hash.$Properties + * @deprecated Use atomic.Hash.$Properties instead. + */ + + /** + * Shape of a Hash. + * @typedef {atomic.Hash.$Properties} atomic.Hash.$Shape + */ + + /** + * Constructs a new Hash. + * @memberof atomic + * @classdesc Represents a Hash. + * @constructor + * @param {atomic.Hash.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var Hash = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * Hash value. + * @member {Uint8Array} value + * @memberof atomic.Hash + * @instance + */ + Hash.prototype.value = $util.newBuffer([]); + + /** + * Hash algorithm. + * @member {atomic.HashAlgorithm} algorithm + * @memberof atomic.Hash + * @instance + */ + Hash.prototype.algorithm = 0; + + /** + * Creates a new Hash instance using the specified properties. + * @function create + * @memberof atomic.Hash + * @static + * @param {atomic.Hash.$Properties=} [properties] Properties to set + * @returns {atomic.Hash} Hash instance + * @type {{ + * (properties: atomic.Hash.$Shape): atomic.Hash & atomic.Hash.$Shape; + * (properties?: atomic.Hash.$Properties): atomic.Hash; + * }} + */ + Hash.create = function(properties) { + return new Hash(properties); + }; + + /** + * Encodes the specified Hash message. Does not implicitly {@link atomic.Hash.verify|verify} messages. + * @function encode + * @memberof atomic.Hash + * @static + * @param {atomic.Hash.$Properties} message Hash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hash.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.value != null && $Object.hasOwnProperty.call(message, "value") && message.value.length) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + if (message.algorithm != null && $Object.hasOwnProperty.call(message, "algorithm") && message.algorithm !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.algorithm); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified Hash message, length delimited. Does not implicitly {@link atomic.Hash.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.Hash + * @static + * @param {atomic.Hash.$Properties} message Hash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hash.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @function decode + * @memberof atomic.Hash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.Hash & atomic.Hash.$Shape} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hash.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.Hash(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.bytes()).length) + message.value = value; + else + delete message.value; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.int32()) + message.algorithm = value; + else + delete message.algorithm; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.Hash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.Hash & atomic.Hash.$Shape} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hash.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a Hash message. + * @function verify + * @memberof atomic.Hash + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Hash.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.algorithm != null && $Object.hasOwnProperty.call(message, "algorithm")) + if (typeof message.algorithm !== "number" || (message.algorithm | 0) !== message.algorithm) + return "algorithm: enum value expected"; + return null; + }; + + /** + * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.Hash + * @static + * @param {Object.} object Plain object + * @returns {atomic.Hash} Hash + */ + Hash.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.Hash) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.Hash: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.Hash(); + if (object.value != null) + if (object.value.length) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + if (object.algorithm !== 0 && (typeof object.algorithm !== "string" || $root.atomic.HashAlgorithm[object.algorithm] !== 0)) + switch (object.algorithm) { + case "HASH_ALGORITHM_UNSPECIFIED": + case 0: + message.algorithm = 0; + break; + case "HASH_ALGORITHM_BLAKE3": + case 1: + message.algorithm = 1; + break; + default: + if (typeof object.algorithm === "number" && (object.algorithm | 0) === object.algorithm) + message.algorithm = object.algorithm; + } + return message; + }; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.Hash + * @static + * @param {atomic.Hash} message Hash + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Hash.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if (options.bytes === $String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== $Array) + object.value = $util.newBuffer(object.value); + } + object.algorithm = options.enums === $String ? "HASH_ALGORITHM_UNSPECIFIED" : 0; + } + if (message.value != null && $Object.hasOwnProperty.call(message, "value")) + object.value = options.bytes === $String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.value) : message.value; + if (message.algorithm != null && $Object.hasOwnProperty.call(message, "algorithm")) + object.algorithm = options.enums === $String ? $root.atomic.HashAlgorithm[message.algorithm] === $undefined ? message.algorithm : $root.atomic.HashAlgorithm[message.algorithm] : message.algorithm; + return object; + }; + + /** + * Converts this Hash to JSON. + * @function toJSON + * @memberof atomic.Hash + * @instance + * @returns {Object.} JSON object + */ + Hash.prototype.toJSON = function() { + return Hash.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Hash + * @function getTypeUrl + * @memberof atomic.Hash + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Hash.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.Hash"; + }; + + return Hash; + })(); + + /** + * HashAlgorithm enum. + * @name atomic.HashAlgorithm + * @enum {number} + * @property {number} HASH_ALGORITHM_UNSPECIFIED=0 HASH_ALGORITHM_UNSPECIFIED value + * @property {number} HASH_ALGORITHM_BLAKE3=1 HASH_ALGORITHM_BLAKE3 value + */ + atomic.HashAlgorithm = (function() { + var valuesById = $Object.create(null), values = $Object.create(valuesById); + values[valuesById[0] = "HASH_ALGORITHM_UNSPECIFIED"] = 0; + values[valuesById[1] = "HASH_ALGORITHM_BLAKE3"] = 1; + return values; + })(); + + atomic.FileStatusEntry = (function() { + + /** + * Properties of a FileStatusEntry. + * @typedef {Object} atomic.FileStatusEntry.$Properties + * @property {string|null} [path] FileStatusEntry path + * @property {atomic.FileStatus|null} [status] FileStatusEntry status + * @property {number|Long|null} [inode] FileStatusEntry inode + * @property {atomic.Hash.$Properties|null} [recordedHash] FileStatusEntry recordedHash + * @property {atomic.Hash.$Properties|null} [currentHash] FileStatusEntry currentHash + * @property {string|null} [details] FileStatusEntry details + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a FileStatusEntry. + * @memberof atomic + * @interface IFileStatusEntry + * @augments atomic.FileStatusEntry.$Properties + * @deprecated Use atomic.FileStatusEntry.$Properties instead. + */ + + /** + * Shape of a FileStatusEntry. + * @typedef {atomic.FileStatusEntry.$Properties} atomic.FileStatusEntry.$Shape + */ + + /** + * Constructs a new FileStatusEntry. + * @memberof atomic + * @classdesc Represents a FileStatusEntry. + * @constructor + * @param {atomic.FileStatusEntry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var FileStatusEntry = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * FileStatusEntry path. + * @member {string} path + * @memberof atomic.FileStatusEntry + * @instance + */ + FileStatusEntry.prototype.path = ""; + + /** + * FileStatusEntry status. + * @member {atomic.FileStatus} status + * @memberof atomic.FileStatusEntry + * @instance + */ + FileStatusEntry.prototype.status = 0; + + /** + * FileStatusEntry inode. + * @member {number|Long|null|undefined} inode + * @memberof atomic.FileStatusEntry + * @instance + */ + FileStatusEntry.prototype.inode = null; + + /** + * FileStatusEntry recordedHash. + * @member {atomic.Hash.$Properties|null|undefined} recordedHash + * @memberof atomic.FileStatusEntry + * @instance + */ + FileStatusEntry.prototype.recordedHash = null; + + /** + * FileStatusEntry currentHash. + * @member {atomic.Hash.$Properties|null|undefined} currentHash + * @memberof atomic.FileStatusEntry + * @instance + */ + FileStatusEntry.prototype.currentHash = null; + + /** + * FileStatusEntry details. + * @member {string|null|undefined} details + * @memberof atomic.FileStatusEntry + * @instance + */ + FileStatusEntry.prototype.details = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(FileStatusEntry.prototype, "_inode", { + get: $util.oneOfGetter($oneOfFields = ["inode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(FileStatusEntry.prototype, "_recorded_hash", { + get: $util.oneOfGetter($oneOfFields = ["recordedHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(FileStatusEntry.prototype, "_current_hash", { + get: $util.oneOfGetter($oneOfFields = ["currentHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(FileStatusEntry.prototype, "_details", { + get: $util.oneOfGetter($oneOfFields = ["details"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FileStatusEntry instance using the specified properties. + * @function create + * @memberof atomic.FileStatusEntry + * @static + * @param {atomic.FileStatusEntry.$Properties=} [properties] Properties to set + * @returns {atomic.FileStatusEntry} FileStatusEntry instance + * @type {{ + * (properties: atomic.FileStatusEntry.$Shape): atomic.FileStatusEntry & atomic.FileStatusEntry.$Shape; + * (properties?: atomic.FileStatusEntry.$Properties): atomic.FileStatusEntry; + * }} + */ + FileStatusEntry.create = function(properties) { + return new FileStatusEntry(properties); + }; + + /** + * Encodes the specified FileStatusEntry message. Does not implicitly {@link atomic.FileStatusEntry.verify|verify} messages. + * @function encode + * @memberof atomic.FileStatusEntry + * @static + * @param {atomic.FileStatusEntry.$Properties} message FileStatusEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStatusEntry.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.status != null && $Object.hasOwnProperty.call(message, "status") && message.status !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); + if (message.inode != null && $Object.hasOwnProperty.call(message, "inode")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.inode); + if (message.recordedHash != null && $Object.hasOwnProperty.call(message, "recordedHash")) + $root.atomic.Hash.encode(message.recordedHash, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.currentHash != null && $Object.hasOwnProperty.call(message, "currentHash")) + $root.atomic.Hash.encode(message.currentHash, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.details != null && $Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.details); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified FileStatusEntry message, length delimited. Does not implicitly {@link atomic.FileStatusEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.FileStatusEntry + * @static + * @param {atomic.FileStatusEntry.$Properties} message FileStatusEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStatusEntry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a FileStatusEntry message from the specified reader or buffer. + * @function decode + * @memberof atomic.FileStatusEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.FileStatusEntry & atomic.FileStatusEntry.$Shape} FileStatusEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStatusEntry.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.FileStatusEntry(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.int32()) + message.status = value; + else + delete message.status; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.inode = reader.uint64(); + message._inode = "inode"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.recordedHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.recordedHash); + message._recorded_hash = "recordedHash"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.currentHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.currentHash); + message._current_hash = "currentHash"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.details = reader.stringVerify(); + message._details = "details"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a FileStatusEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.FileStatusEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.FileStatusEntry & atomic.FileStatusEntry.$Shape} FileStatusEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStatusEntry.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a FileStatusEntry message. + * @function verify + * @memberof atomic.FileStatusEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileStatusEntry.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + if (typeof message.status !== "number" || (message.status | 0) !== message.status) + return "status: enum value expected"; + if (message.inode != null && $Object.hasOwnProperty.call(message, "inode")) { + properties._inode = 1; + if (!$util.isInteger(message.inode) && !(message.inode && $util.isInteger(message.inode.low) && $util.isInteger(message.inode.high))) + return "inode: integer|Long expected"; + } + if (message.recordedHash != null && $Object.hasOwnProperty.call(message, "recordedHash")) { + properties._recorded_hash = 1; + { + var error = $root.atomic.Hash.verify(message.recordedHash, _depth + 1); + if (error) + return "recordedHash." + error; + } + } + if (message.currentHash != null && $Object.hasOwnProperty.call(message, "currentHash")) { + properties._current_hash = 1; + { + var error = $root.atomic.Hash.verify(message.currentHash, _depth + 1); + if (error) + return "currentHash." + error; + } + } + if (message.details != null && $Object.hasOwnProperty.call(message, "details")) { + properties._details = 1; + if (!$util.isString(message.details)) + return "details: string expected"; + } + return null; + }; + + /** + * Creates a FileStatusEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.FileStatusEntry + * @static + * @param {Object.} object Plain object + * @returns {atomic.FileStatusEntry} FileStatusEntry + */ + FileStatusEntry.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.FileStatusEntry) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.FileStatusEntry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.FileStatusEntry(); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + if (object.status !== 0 && (typeof object.status !== "string" || $root.atomic.FileStatus[object.status] !== 0)) + switch (object.status) { + case "FILE_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "FILE_STATUS_MODIFIED": + case 1: + message.status = 1; + break; + case "FILE_STATUS_DELETED": + case 2: + message.status = 2; + break; + case "FILE_STATUS_UNTRACKED": + case 3: + message.status = 3; + break; + case "FILE_STATUS_ADDED": + case 4: + message.status = 4; + break; + case "FILE_STATUS_CONFLICTED": + case 5: + message.status = 5; + break; + default: + if (typeof object.status === "number" && (object.status | 0) === object.status) + message.status = object.status; + } + if (object.inode != null) + if ($util.Long) + message.inode = $util.Long.fromValue(object.inode, true); + else if (typeof object.inode === "string") + message.inode = $parseInt(object.inode, 10); + else if (typeof object.inode === "number") + message.inode = object.inode; + else if (typeof object.inode === "object") + message.inode = new $util.LongBits(object.inode.low >>> 0, object.inode.high >>> 0).toNumber(true); + if (object.recordedHash != null) { + if (!$util.isObject(object.recordedHash)) + throw $TypeError(".atomic.FileStatusEntry.recordedHash: object expected"); + message.recordedHash = $root.atomic.Hash.fromObject(object.recordedHash, _depth + 1); + } + if (object.currentHash != null) { + if (!$util.isObject(object.currentHash)) + throw $TypeError(".atomic.FileStatusEntry.currentHash: object expected"); + message.currentHash = $root.atomic.Hash.fromObject(object.currentHash, _depth + 1); + } + if (object.details != null) + message.details = $String(object.details); + return message; + }; + + /** + * Creates a plain object from a FileStatusEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.FileStatusEntry + * @static + * @param {atomic.FileStatusEntry} message FileStatusEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileStatusEntry.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.path = ""; + object.status = options.enums === $String ? "FILE_STATUS_UNSPECIFIED" : 0; + } + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + object.status = options.enums === $String ? $root.atomic.FileStatus[message.status] === $undefined ? message.status : $root.atomic.FileStatus[message.status] : message.status; + if (message.inode != null && $Object.hasOwnProperty.call(message, "inode")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.inode = typeof message.inode === "number" ? $BigInt(message.inode) : $util.Long.fromBits(message.inode.low >>> 0, message.inode.high >>> 0, true).toBigInt(); + else if (typeof message.inode === "number") + object.inode = options.longs === $String ? $String(message.inode) : message.inode; + else + object.inode = options.longs === $String ? $util.Long.prototype.toString.call(message.inode) : options.longs === $Number ? new $util.LongBits(message.inode.low >>> 0, message.inode.high >>> 0).toNumber(true) : message.inode; + if (message.recordedHash != null && $Object.hasOwnProperty.call(message, "recordedHash")) + object.recordedHash = $root.atomic.Hash.toObject(message.recordedHash, options, _depth + 1); + if (message.currentHash != null && $Object.hasOwnProperty.call(message, "currentHash")) + object.currentHash = $root.atomic.Hash.toObject(message.currentHash, options, _depth + 1); + if (message.details != null && $Object.hasOwnProperty.call(message, "details")) + object.details = message.details; + return object; + }; + + /** + * Converts this FileStatusEntry to JSON. + * @function toJSON + * @memberof atomic.FileStatusEntry + * @instance + * @returns {Object.} JSON object + */ + FileStatusEntry.prototype.toJSON = function() { + return FileStatusEntry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for FileStatusEntry + * @function getTypeUrl + * @memberof atomic.FileStatusEntry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + FileStatusEntry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.FileStatusEntry"; + }; + + return FileStatusEntry; + })(); + + /** + * FileStatus enum. + * @name atomic.FileStatus + * @enum {number} + * @property {number} FILE_STATUS_UNSPECIFIED=0 FILE_STATUS_UNSPECIFIED value + * @property {number} FILE_STATUS_MODIFIED=1 FILE_STATUS_MODIFIED value + * @property {number} FILE_STATUS_DELETED=2 FILE_STATUS_DELETED value + * @property {number} FILE_STATUS_UNTRACKED=3 FILE_STATUS_UNTRACKED value + * @property {number} FILE_STATUS_ADDED=4 FILE_STATUS_ADDED value + * @property {number} FILE_STATUS_CONFLICTED=5 FILE_STATUS_CONFLICTED value + */ + atomic.FileStatus = (function() { + var valuesById = $Object.create(null), values = $Object.create(valuesById); + values[valuesById[0] = "FILE_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "FILE_STATUS_MODIFIED"] = 1; + values[valuesById[2] = "FILE_STATUS_DELETED"] = 2; + values[valuesById[3] = "FILE_STATUS_UNTRACKED"] = 3; + values[valuesById[4] = "FILE_STATUS_ADDED"] = 4; + values[valuesById[5] = "FILE_STATUS_CONFLICTED"] = 5; + return values; + })(); + + atomic.ViewSnapshot = (function() { + + /** + * Properties of a ViewSnapshot. + * @typedef {Object} atomic.ViewSnapshot.$Properties + * @property {atomic.ViewRef.$Properties|null} [view] ViewSnapshot view + * @property {atomic.Hash.$Properties|null} [effectiveState] ViewSnapshot effectiveState + * @property {atomic.Hash.$Properties|null} [ownMerkle] ViewSnapshot ownMerkle + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ViewSnapshot. + * @memberof atomic + * @interface IViewSnapshot + * @augments atomic.ViewSnapshot.$Properties + * @deprecated Use atomic.ViewSnapshot.$Properties instead. + */ + + /** + * Shape of a ViewSnapshot. + * @typedef {atomic.ViewSnapshot.$Properties} atomic.ViewSnapshot.$Shape + */ + + /** + * Constructs a new ViewSnapshot. + * @memberof atomic + * @classdesc Represents a ViewSnapshot. + * @constructor + * @param {atomic.ViewSnapshot.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ViewSnapshot = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ViewSnapshot view. + * @member {atomic.ViewRef.$Properties|null|undefined} view + * @memberof atomic.ViewSnapshot + * @instance + */ + ViewSnapshot.prototype.view = null; + + /** + * ViewSnapshot effectiveState. + * @member {atomic.Hash.$Properties|null|undefined} effectiveState + * @memberof atomic.ViewSnapshot + * @instance + */ + ViewSnapshot.prototype.effectiveState = null; + + /** + * ViewSnapshot ownMerkle. + * @member {atomic.Hash.$Properties|null|undefined} ownMerkle + * @memberof atomic.ViewSnapshot + * @instance + */ + ViewSnapshot.prototype.ownMerkle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ViewSnapshot.prototype, "_own_merkle", { + get: $util.oneOfGetter($oneOfFields = ["ownMerkle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ViewSnapshot instance using the specified properties. + * @function create + * @memberof atomic.ViewSnapshot + * @static + * @param {atomic.ViewSnapshot.$Properties=} [properties] Properties to set + * @returns {atomic.ViewSnapshot} ViewSnapshot instance + * @type {{ + * (properties: atomic.ViewSnapshot.$Shape): atomic.ViewSnapshot & atomic.ViewSnapshot.$Shape; + * (properties?: atomic.ViewSnapshot.$Properties): atomic.ViewSnapshot; + * }} + */ + ViewSnapshot.create = function(properties) { + return new ViewSnapshot(properties); + }; + + /** + * Encodes the specified ViewSnapshot message. Does not implicitly {@link atomic.ViewSnapshot.verify|verify} messages. + * @function encode + * @memberof atomic.ViewSnapshot + * @static + * @param {atomic.ViewSnapshot.$Properties} message ViewSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewSnapshot.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + $root.atomic.ViewRef.encode(message.view, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.effectiveState != null && $Object.hasOwnProperty.call(message, "effectiveState")) + $root.atomic.Hash.encode(message.effectiveState, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.ownMerkle != null && $Object.hasOwnProperty.call(message, "ownMerkle")) + $root.atomic.Hash.encode(message.ownMerkle, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ViewSnapshot message, length delimited. Does not implicitly {@link atomic.ViewSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ViewSnapshot + * @static + * @param {atomic.ViewSnapshot.$Properties} message ViewSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewSnapshot.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ViewSnapshot message from the specified reader or buffer. + * @function decode + * @memberof atomic.ViewSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ViewSnapshot & atomic.ViewSnapshot.$Shape} ViewSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewSnapshot.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ViewSnapshot(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.effectiveState = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.effectiveState); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.ownMerkle = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.ownMerkle); + message._own_merkle = "ownMerkle"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ViewSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ViewSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ViewSnapshot & atomic.ViewSnapshot.$Shape} ViewSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewSnapshot.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ViewSnapshot message. + * @function verify + * @memberof atomic.ViewSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ViewSnapshot.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + var error = $root.atomic.ViewRef.verify(message.view, _depth + 1); + if (error) + return "view." + error; + } + if (message.effectiveState != null && $Object.hasOwnProperty.call(message, "effectiveState")) { + var error = $root.atomic.Hash.verify(message.effectiveState, _depth + 1); + if (error) + return "effectiveState." + error; + } + if (message.ownMerkle != null && $Object.hasOwnProperty.call(message, "ownMerkle")) { + properties._own_merkle = 1; + { + var error = $root.atomic.Hash.verify(message.ownMerkle, _depth + 1); + if (error) + return "ownMerkle." + error; + } + } + return null; + }; + + /** + * Creates a ViewSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ViewSnapshot + * @static + * @param {Object.} object Plain object + * @returns {atomic.ViewSnapshot} ViewSnapshot + */ + ViewSnapshot.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ViewSnapshot) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ViewSnapshot: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ViewSnapshot(); + if (object.view != null) { + if (!$util.isObject(object.view)) + throw $TypeError(".atomic.ViewSnapshot.view: object expected"); + message.view = $root.atomic.ViewRef.fromObject(object.view, _depth + 1); + } + if (object.effectiveState != null) { + if (!$util.isObject(object.effectiveState)) + throw $TypeError(".atomic.ViewSnapshot.effectiveState: object expected"); + message.effectiveState = $root.atomic.Hash.fromObject(object.effectiveState, _depth + 1); + } + if (object.ownMerkle != null) { + if (!$util.isObject(object.ownMerkle)) + throw $TypeError(".atomic.ViewSnapshot.ownMerkle: object expected"); + message.ownMerkle = $root.atomic.Hash.fromObject(object.ownMerkle, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ViewSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ViewSnapshot + * @static + * @param {atomic.ViewSnapshot} message ViewSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ViewSnapshot.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.view = null; + object.effectiveState = null; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = $root.atomic.ViewRef.toObject(message.view, options, _depth + 1); + if (message.effectiveState != null && $Object.hasOwnProperty.call(message, "effectiveState")) + object.effectiveState = $root.atomic.Hash.toObject(message.effectiveState, options, _depth + 1); + if (message.ownMerkle != null && $Object.hasOwnProperty.call(message, "ownMerkle")) + object.ownMerkle = $root.atomic.Hash.toObject(message.ownMerkle, options, _depth + 1); + return object; + }; + + /** + * Converts this ViewSnapshot to JSON. + * @function toJSON + * @memberof atomic.ViewSnapshot + * @instance + * @returns {Object.} JSON object + */ + ViewSnapshot.prototype.toJSON = function() { + return ViewSnapshot.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ViewSnapshot + * @function getTypeUrl + * @memberof atomic.ViewSnapshot + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ViewSnapshot.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ViewSnapshot"; + }; + + return ViewSnapshot; + })(); + + atomic.AddFilesRequest = (function() { + + /** + * Properties of an AddFilesRequest. + * @typedef {Object} atomic.AddFilesRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] AddFilesRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] AddFilesRequest meta + * @property {Array.|null} [paths] AddFilesRequest paths + * @property {atomic.ExpectedState.$Properties|null} [expected] AddFilesRequest expected + * @property {boolean|null} [dryRun] AddFilesRequest dryRun + * @property {boolean|null} [force] AddFilesRequest force + * @property {boolean|null} [directory] AddFilesRequest directory + * @property {boolean|null} [noRecursive] AddFilesRequest noRecursive + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an AddFilesRequest. + * @memberof atomic + * @interface IAddFilesRequest + * @augments atomic.AddFilesRequest.$Properties + * @deprecated Use atomic.AddFilesRequest.$Properties instead. + */ + + /** + * Shape of an AddFilesRequest. + * @typedef {{ + * repository?: atomic.RepositoryRef.$Shape|null; + * meta?: atomic.RequestMeta.$Shape|null; + * paths?: Array.|null; + * expected?: atomic.ExpectedState.$Shape|null; + * dryRun?: boolean|null; + * force?: boolean|null; + * directory?: boolean|null; + * noRecursive?: boolean|null; + * $unknowns?: Array.; + * }} atomic.AddFilesRequest.$Shape + */ + + /** + * Constructs a new AddFilesRequest. + * @memberof atomic + * @classdesc Represents an AddFilesRequest. + * @constructor + * @param {atomic.AddFilesRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var AddFilesRequest = function (properties) { + this.paths = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * AddFilesRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.AddFilesRequest + * @instance + */ + AddFilesRequest.prototype.repository = null; + + /** + * AddFilesRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.AddFilesRequest + * @instance + */ + AddFilesRequest.prototype.meta = null; + + /** + * AddFilesRequest paths. + * @member {Array.} paths + * @memberof atomic.AddFilesRequest + * @instance + */ + AddFilesRequest.prototype.paths = $util.emptyArray; + + /** + * AddFilesRequest expected. + * @member {atomic.ExpectedState.$Properties|null|undefined} expected + * @memberof atomic.AddFilesRequest + * @instance + */ + AddFilesRequest.prototype.expected = null; + + /** + * AddFilesRequest dryRun. + * @member {boolean} dryRun + * @memberof atomic.AddFilesRequest + * @instance + */ + AddFilesRequest.prototype.dryRun = false; + + /** + * AddFilesRequest force. + * @member {boolean} force + * @memberof atomic.AddFilesRequest + * @instance + */ + AddFilesRequest.prototype.force = false; + + /** + * AddFilesRequest directory. + * @member {boolean} directory + * @memberof atomic.AddFilesRequest + * @instance + */ + AddFilesRequest.prototype.directory = false; + + /** + * AddFilesRequest noRecursive. + * @member {boolean} noRecursive + * @memberof atomic.AddFilesRequest + * @instance + */ + AddFilesRequest.prototype.noRecursive = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(AddFilesRequest.prototype, "_expected", { + get: $util.oneOfGetter($oneOfFields = ["expected"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AddFilesRequest instance using the specified properties. + * @function create + * @memberof atomic.AddFilesRequest + * @static + * @param {atomic.AddFilesRequest.$Properties=} [properties] Properties to set + * @returns {atomic.AddFilesRequest} AddFilesRequest instance + * @type {{ + * (properties: atomic.AddFilesRequest.$Shape): atomic.AddFilesRequest & atomic.AddFilesRequest.$Shape; + * (properties?: atomic.AddFilesRequest.$Properties): atomic.AddFilesRequest; + * }} + */ + AddFilesRequest.create = function(properties) { + return new AddFilesRequest(properties); + }; + + /** + * Encodes the specified AddFilesRequest message. Does not implicitly {@link atomic.AddFilesRequest.verify|verify} messages. + * @function encode + * @memberof atomic.AddFilesRequest + * @static + * @param {atomic.AddFilesRequest.$Properties} message AddFilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFilesRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.RequestMeta.encode(message.meta, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.paths[i]); + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) + $root.atomic.ExpectedState.encode(message.expected, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun") && message.dryRun !== false) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.dryRun); + if (message.force != null && $Object.hasOwnProperty.call(message, "force") && message.force !== false) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.force); + if (message.directory != null && $Object.hasOwnProperty.call(message, "directory") && message.directory !== false) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.directory); + if (message.noRecursive != null && $Object.hasOwnProperty.call(message, "noRecursive") && message.noRecursive !== false) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.noRecursive); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified AddFilesRequest message, length delimited. Does not implicitly {@link atomic.AddFilesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.AddFilesRequest + * @static + * @param {atomic.AddFilesRequest.$Properties} message AddFilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFilesRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes an AddFilesRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.AddFilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.AddFilesRequest & atomic.AddFilesRequest.$Shape} AddFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFilesRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.AddFilesRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.meta = $root.atomic.RequestMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.stringVerify()); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.expected = $root.atomic.ExpectedState.decode(reader, reader.size(), $undefined, _depth + 1, message.expected); + message._expected = "expected"; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.dryRun = value; + else + delete message.dryRun; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.force = value; + else + delete message.force; + continue; + } + case 7: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.directory = value; + else + delete message.directory; + continue; + } + case 8: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.noRecursive = value; + else + delete message.noRecursive; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes an AddFilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.AddFilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.AddFilesRequest & atomic.AddFilesRequest.$Shape} AddFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFilesRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies an AddFilesRequest message. + * @function verify + * @memberof atomic.AddFilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddFilesRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.RequestMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + if (message.paths != null && $Object.hasOwnProperty.call(message, "paths")) { + if (!$Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) { + properties._expected = 1; + { + var error = $root.atomic.ExpectedState.verify(message.expected, _depth + 1); + if (error) + return "expected." + error; + } + } + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + if (message.force != null && $Object.hasOwnProperty.call(message, "force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.directory != null && $Object.hasOwnProperty.call(message, "directory")) + if (typeof message.directory !== "boolean") + return "directory: boolean expected"; + if (message.noRecursive != null && $Object.hasOwnProperty.call(message, "noRecursive")) + if (typeof message.noRecursive !== "boolean") + return "noRecursive: boolean expected"; + return null; + }; + + /** + * Creates an AddFilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.AddFilesRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.AddFilesRequest} AddFilesRequest + */ + AddFilesRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.AddFilesRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.AddFilesRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.AddFilesRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.AddFilesRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.AddFilesRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.paths) { + if (!$Array.isArray(object.paths)) + throw $TypeError(".atomic.AddFilesRequest.paths: array expected"); + message.paths = $Array(object.paths.length); + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = $String(object.paths[i]); + } + if (object.expected != null) { + if (!$util.isObject(object.expected)) + throw $TypeError(".atomic.AddFilesRequest.expected: object expected"); + message.expected = $root.atomic.ExpectedState.fromObject(object.expected, _depth + 1); + } + if (object.dryRun != null) + if (object.dryRun) + message.dryRun = $Boolean(object.dryRun); + if (object.force != null) + if (object.force) + message.force = $Boolean(object.force); + if (object.directory != null) + if (object.directory) + message.directory = $Boolean(object.directory); + if (object.noRecursive != null) + if (object.noRecursive) + message.noRecursive = $Boolean(object.noRecursive); + return message; + }; + + /** + * Creates a plain object from an AddFilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.AddFilesRequest + * @static + * @param {atomic.AddFilesRequest} message AddFilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddFilesRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.repository = null; + object.meta = null; + object.dryRun = false; + object.force = false; + object.directory = false; + object.noRecursive = false; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.RequestMeta.toObject(message.meta, options, _depth + 1); + if (message.paths && message.paths.length) { + object.paths = $Array(message.paths.length); + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) + object.expected = $root.atomic.ExpectedState.toObject(message.expected, options, _depth + 1); + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun")) + object.dryRun = message.dryRun; + if (message.force != null && $Object.hasOwnProperty.call(message, "force")) + object.force = message.force; + if (message.directory != null && $Object.hasOwnProperty.call(message, "directory")) + object.directory = message.directory; + if (message.noRecursive != null && $Object.hasOwnProperty.call(message, "noRecursive")) + object.noRecursive = message.noRecursive; + return object; + }; + + /** + * Converts this AddFilesRequest to JSON. + * @function toJSON + * @memberof atomic.AddFilesRequest + * @instance + * @returns {Object.} JSON object + */ + AddFilesRequest.prototype.toJSON = function() { + return AddFilesRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for AddFilesRequest + * @function getTypeUrl + * @memberof atomic.AddFilesRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + AddFilesRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.AddFilesRequest"; + }; + + return AddFilesRequest; + })(); + + atomic.RequestMeta = (function() { + + /** + * Properties of a RequestMeta. + * @typedef {Object} atomic.RequestMeta.$Properties + * @property {string|null} [requestId] RequestMeta requestId + * @property {google.protobuf.Timestamp.$Properties|null} [observedAt] RequestMeta observedAt + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RequestMeta. + * @memberof atomic + * @interface IRequestMeta + * @augments atomic.RequestMeta.$Properties + * @deprecated Use atomic.RequestMeta.$Properties instead. + */ + + /** + * Shape of a RequestMeta. + * @typedef {atomic.RequestMeta.$Properties} atomic.RequestMeta.$Shape + */ + + /** + * Constructs a new RequestMeta. + * @memberof atomic + * @classdesc Represents a RequestMeta. + * @constructor + * @param {atomic.RequestMeta.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var RequestMeta = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * RequestMeta requestId. + * @member {string} requestId + * @memberof atomic.RequestMeta + * @instance + */ + RequestMeta.prototype.requestId = ""; + + /** + * RequestMeta observedAt. + * @member {google.protobuf.Timestamp.$Properties|null|undefined} observedAt + * @memberof atomic.RequestMeta + * @instance + */ + RequestMeta.prototype.observedAt = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RequestMeta.prototype, "_observed_at", { + get: $util.oneOfGetter($oneOfFields = ["observedAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RequestMeta instance using the specified properties. + * @function create + * @memberof atomic.RequestMeta + * @static + * @param {atomic.RequestMeta.$Properties=} [properties] Properties to set + * @returns {atomic.RequestMeta} RequestMeta instance + * @type {{ + * (properties: atomic.RequestMeta.$Shape): atomic.RequestMeta & atomic.RequestMeta.$Shape; + * (properties?: atomic.RequestMeta.$Properties): atomic.RequestMeta; + * }} + */ + RequestMeta.create = function(properties) { + return new RequestMeta(properties); + }; + + /** + * Encodes the specified RequestMeta message. Does not implicitly {@link atomic.RequestMeta.verify|verify} messages. + * @function encode + * @memberof atomic.RequestMeta + * @static + * @param {atomic.RequestMeta.$Properties} message RequestMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMeta.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId") && message.requestId !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); + if (message.observedAt != null && $Object.hasOwnProperty.call(message, "observedAt")) + $root.google.protobuf.Timestamp.encode(message.observedAt, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified RequestMeta message, length delimited. Does not implicitly {@link atomic.RequestMeta.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.RequestMeta + * @static + * @param {atomic.RequestMeta.$Properties} message RequestMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestMeta.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a RequestMeta message from the specified reader or buffer. + * @function decode + * @memberof atomic.RequestMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.RequestMeta & atomic.RequestMeta.$Shape} RequestMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMeta.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.RequestMeta(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.requestId = value; + else + delete message.requestId; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.observedAt = $root.google.protobuf.Timestamp.decode(reader, reader.size(), $undefined, _depth + 1, message.observedAt); + message._observed_at = "observedAt"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a RequestMeta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.RequestMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.RequestMeta & atomic.RequestMeta.$Shape} RequestMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestMeta.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a RequestMeta message. + * @function verify + * @memberof atomic.RequestMeta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestMeta.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.observedAt != null && $Object.hasOwnProperty.call(message, "observedAt")) { + properties._observed_at = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.observedAt, _depth + 1); + if (error) + return "observedAt." + error; + } + } + return null; + }; + + /** + * Creates a RequestMeta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.RequestMeta + * @static + * @param {Object.} object Plain object + * @returns {atomic.RequestMeta} RequestMeta + */ + RequestMeta.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.RequestMeta) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.RequestMeta: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.RequestMeta(); + if (object.requestId != null) + if (typeof object.requestId !== "string" || object.requestId.length) + message.requestId = $String(object.requestId); + if (object.observedAt != null) { + if (!$util.isObject(object.observedAt)) + throw $TypeError(".atomic.RequestMeta.observedAt: object expected"); + message.observedAt = $root.google.protobuf.Timestamp.fromObject(object.observedAt, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a RequestMeta message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.RequestMeta + * @static + * @param {atomic.RequestMeta} message RequestMeta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestMeta.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.requestId = ""; + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) + object.requestId = message.requestId; + if (message.observedAt != null && $Object.hasOwnProperty.call(message, "observedAt")) + object.observedAt = $root.google.protobuf.Timestamp.toObject(message.observedAt, options, _depth + 1); + return object; + }; + + /** + * Converts this RequestMeta to JSON. + * @function toJSON + * @memberof atomic.RequestMeta + * @instance + * @returns {Object.} JSON object + */ + RequestMeta.prototype.toJSON = function() { + return RequestMeta.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RequestMeta + * @function getTypeUrl + * @memberof atomic.RequestMeta + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RequestMeta.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.RequestMeta"; + }; + + return RequestMeta; + })(); + + atomic.ExpectedState = (function() { + + /** + * Properties of an ExpectedState. + * @typedef {Object} atomic.ExpectedState.$Properties + * @property {number|Long|null} [generation] ExpectedState generation + * @property {atomic.Hash.$Properties|null} [merkleRoot] ExpectedState merkleRoot + * @property {number|Long|null} [sequence] ExpectedState sequence + * @property {atomic.ViewSnapshot.$Properties|null} [viewSnapshot] ExpectedState viewSnapshot + * @property {"generation"|"merkleRoot"|"sequence"|"viewSnapshot"} [kind] ExpectedState kind + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an ExpectedState. + * @memberof atomic + * @interface IExpectedState + * @augments atomic.ExpectedState.$Properties + * @deprecated Use atomic.ExpectedState.$Properties instead. + */ + + /** + * Narrowed shape of an ExpectedState. + * @typedef {{ + * generation?: number|Long|null; + * merkleRoot?: atomic.Hash.$Shape|null; + * sequence?: number|Long|null; + * viewSnapshot?: atomic.ViewSnapshot.$Shape|null; + * $unknowns?: Array.; + * } & ( + * ({ kind?: undefined; generation?: null; merkleRoot?: null; sequence?: null; viewSnapshot?: null }|{ kind?: "generation"; generation: number|Long; merkleRoot?: null; sequence?: null; viewSnapshot?: null }|{ kind?: "merkleRoot"; generation?: null; merkleRoot: atomic.Hash.$Shape; sequence?: null; viewSnapshot?: null }|{ kind?: "sequence"; generation?: null; merkleRoot?: null; sequence: number|Long; viewSnapshot?: null }|{ kind?: "viewSnapshot"; generation?: null; merkleRoot?: null; sequence?: null; viewSnapshot: atomic.ViewSnapshot.$Shape }) + * )} atomic.ExpectedState.$Shape + */ + + /** + * Constructs a new ExpectedState. + * @memberof atomic + * @classdesc Represents an ExpectedState. + * @constructor + * @param {atomic.ExpectedState.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ExpectedState = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ExpectedState generation. + * @member {number|Long|null|undefined} generation + * @memberof atomic.ExpectedState + * @instance + */ + ExpectedState.prototype.generation = null; + + /** + * ExpectedState merkleRoot. + * @member {atomic.Hash.$Properties|null|undefined} merkleRoot + * @memberof atomic.ExpectedState + * @instance + */ + ExpectedState.prototype.merkleRoot = null; + + /** + * ExpectedState sequence. + * @member {number|Long|null|undefined} sequence + * @memberof atomic.ExpectedState + * @instance + */ + ExpectedState.prototype.sequence = null; + + /** + * ExpectedState viewSnapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} viewSnapshot + * @memberof atomic.ExpectedState + * @instance + */ + ExpectedState.prototype.viewSnapshot = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExpectedState kind. + * @member {"generation"|"merkleRoot"|"sequence"|"viewSnapshot"|undefined} kind + * @memberof atomic.ExpectedState + * @instance + */ + $Object.defineProperty(ExpectedState.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["generation", "merkleRoot", "sequence", "viewSnapshot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExpectedState instance using the specified properties. + * @function create + * @memberof atomic.ExpectedState + * @static + * @param {atomic.ExpectedState.$Properties=} [properties] Properties to set + * @returns {atomic.ExpectedState} ExpectedState instance + * @type {{ + * (properties: atomic.ExpectedState.$Shape): atomic.ExpectedState & atomic.ExpectedState.$Shape; + * (properties?: atomic.ExpectedState.$Properties): atomic.ExpectedState; + * }} + */ + ExpectedState.create = function(properties) { + return new ExpectedState(properties); + }; + + /** + * Encodes the specified ExpectedState message. Does not implicitly {@link atomic.ExpectedState.verify|verify} messages. + * @function encode + * @memberof atomic.ExpectedState + * @static + * @param {atomic.ExpectedState.$Properties} message ExpectedState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExpectedState.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.generation != null && $Object.hasOwnProperty.call(message, "generation")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.generation); + if (message.merkleRoot != null && $Object.hasOwnProperty.call(message, "merkleRoot")) + $root.atomic.Hash.encode(message.merkleRoot, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + if (message.viewSnapshot != null && $Object.hasOwnProperty.call(message, "viewSnapshot")) + $root.atomic.ViewSnapshot.encode(message.viewSnapshot, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ExpectedState message, length delimited. Does not implicitly {@link atomic.ExpectedState.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ExpectedState + * @static + * @param {atomic.ExpectedState.$Properties} message ExpectedState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExpectedState.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes an ExpectedState message from the specified reader or buffer. + * @function decode + * @memberof atomic.ExpectedState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ExpectedState & atomic.ExpectedState.$Shape} ExpectedState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExpectedState.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ExpectedState(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.generation = reader.uint64(); + message.kind = "generation"; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.merkleRoot = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.merkleRoot); + message.kind = "merkleRoot"; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.sequence = reader.uint64(); + message.kind = "sequence"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.viewSnapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.viewSnapshot); + message.kind = "viewSnapshot"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes an ExpectedState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ExpectedState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ExpectedState & atomic.ExpectedState.$Shape} ExpectedState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExpectedState.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies an ExpectedState message. + * @function verify + * @memberof atomic.ExpectedState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExpectedState.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.generation != null && $Object.hasOwnProperty.call(message, "generation")) { + properties.kind = 1; + if (!$util.isInteger(message.generation) && !(message.generation && $util.isInteger(message.generation.low) && $util.isInteger(message.generation.high))) + return "generation: integer|Long expected"; + } + if (message.merkleRoot != null && $Object.hasOwnProperty.call(message, "merkleRoot")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.atomic.Hash.verify(message.merkleRoot, _depth + 1); + if (error) + return "merkleRoot." + error; + } + } + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + } + if (message.viewSnapshot != null && $Object.hasOwnProperty.call(message, "viewSnapshot")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.atomic.ViewSnapshot.verify(message.viewSnapshot, _depth + 1); + if (error) + return "viewSnapshot." + error; + } + } + return null; + }; + + /** + * Creates an ExpectedState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ExpectedState + * @static + * @param {Object.} object Plain object + * @returns {atomic.ExpectedState} ExpectedState + */ + ExpectedState.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ExpectedState) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ExpectedState: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ExpectedState(); + if (object.generation != null) + if ($util.Long) + message.generation = $util.Long.fromValue(object.generation, true); + else if (typeof object.generation === "string") + message.generation = $parseInt(object.generation, 10); + else if (typeof object.generation === "number") + message.generation = object.generation; + else if (typeof object.generation === "object") + message.generation = new $util.LongBits(object.generation.low >>> 0, object.generation.high >>> 0).toNumber(true); + if (object.merkleRoot != null) { + if (!$util.isObject(object.merkleRoot)) + throw $TypeError(".atomic.ExpectedState.merkleRoot: object expected"); + message.merkleRoot = $root.atomic.Hash.fromObject(object.merkleRoot, _depth + 1); + } + if (object.sequence != null) + if ($util.Long) + message.sequence = $util.Long.fromValue(object.sequence, true); + else if (typeof object.sequence === "string") + message.sequence = $parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + if (object.viewSnapshot != null) { + if (!$util.isObject(object.viewSnapshot)) + throw $TypeError(".atomic.ExpectedState.viewSnapshot: object expected"); + message.viewSnapshot = $root.atomic.ViewSnapshot.fromObject(object.viewSnapshot, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from an ExpectedState message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ExpectedState + * @static + * @param {atomic.ExpectedState} message ExpectedState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExpectedState.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (message.generation != null && $Object.hasOwnProperty.call(message, "generation")) { + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.generation = typeof message.generation === "number" ? $BigInt(message.generation) : $util.Long.fromBits(message.generation.low >>> 0, message.generation.high >>> 0, true).toBigInt(); + else if (typeof message.generation === "number") + object.generation = options.longs === $String ? $String(message.generation) : message.generation; + else + object.generation = options.longs === $String ? $util.Long.prototype.toString.call(message.generation) : options.longs === $Number ? new $util.LongBits(message.generation.low >>> 0, message.generation.high >>> 0).toNumber(true) : message.generation; + if (options.oneofs) + object.kind = "generation"; + } + if (message.merkleRoot != null && $Object.hasOwnProperty.call(message, "merkleRoot")) { + object.merkleRoot = $root.atomic.Hash.toObject(message.merkleRoot, options, _depth + 1); + if (options.oneofs) + object.kind = "merkleRoot"; + } + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) { + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sequence = typeof message.sequence === "number" ? $BigInt(message.sequence) : $util.Long.fromBits(message.sequence.low >>> 0, message.sequence.high >>> 0, true).toBigInt(); + else if (typeof message.sequence === "number") + object.sequence = options.longs === $String ? $String(message.sequence) : message.sequence; + else + object.sequence = options.longs === $String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === $Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + if (options.oneofs) + object.kind = "sequence"; + } + if (message.viewSnapshot != null && $Object.hasOwnProperty.call(message, "viewSnapshot")) { + object.viewSnapshot = $root.atomic.ViewSnapshot.toObject(message.viewSnapshot, options, _depth + 1); + if (options.oneofs) + object.kind = "viewSnapshot"; + } + return object; + }; + + /** + * Converts this ExpectedState to JSON. + * @function toJSON + * @memberof atomic.ExpectedState + * @instance + * @returns {Object.} JSON object + */ + ExpectedState.prototype.toJSON = function() { + return ExpectedState.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ExpectedState + * @function getTypeUrl + * @memberof atomic.ExpectedState + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ExpectedState.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ExpectedState"; + }; + + return ExpectedState; + })(); + + atomic.AddFilesResponse = (function() { + + /** + * Properties of an AddFilesResponse. + * @typedef {Object} atomic.AddFilesResponse.$Properties + * @property {number|null} [tracked] AddFilesResponse tracked + * @property {Array.|null} [wouldAdd] AddFilesResponse wouldAdd + * @property {Array.|null} [skippedTracked] AddFilesResponse skippedTracked + * @property {Array.|null} [skippedIgnored] AddFilesResponse skippedIgnored + * @property {Array.|null} [failedPaths] AddFilesResponse failedPaths + * @property {boolean|null} [dryRun] AddFilesResponse dryRun + * @property {atomic.ResponseMeta.$Properties|null} [meta] AddFilesResponse meta + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an AddFilesResponse. + * @memberof atomic + * @interface IAddFilesResponse + * @augments atomic.AddFilesResponse.$Properties + * @deprecated Use atomic.AddFilesResponse.$Properties instead. + */ + + /** + * Shape of an AddFilesResponse. + * @typedef {atomic.AddFilesResponse.$Properties} atomic.AddFilesResponse.$Shape + */ + + /** + * Constructs a new AddFilesResponse. + * @memberof atomic + * @classdesc Represents an AddFilesResponse. + * @constructor + * @param {atomic.AddFilesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var AddFilesResponse = function (properties) { + this.wouldAdd = []; + this.skippedTracked = []; + this.skippedIgnored = []; + this.failedPaths = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * AddFilesResponse tracked. + * @member {number} tracked + * @memberof atomic.AddFilesResponse + * @instance + */ + AddFilesResponse.prototype.tracked = 0; + + /** + * AddFilesResponse wouldAdd. + * @member {Array.} wouldAdd + * @memberof atomic.AddFilesResponse + * @instance + */ + AddFilesResponse.prototype.wouldAdd = $util.emptyArray; + + /** + * AddFilesResponse skippedTracked. + * @member {Array.} skippedTracked + * @memberof atomic.AddFilesResponse + * @instance + */ + AddFilesResponse.prototype.skippedTracked = $util.emptyArray; + + /** + * AddFilesResponse skippedIgnored. + * @member {Array.} skippedIgnored + * @memberof atomic.AddFilesResponse + * @instance + */ + AddFilesResponse.prototype.skippedIgnored = $util.emptyArray; + + /** + * AddFilesResponse failedPaths. + * @member {Array.} failedPaths + * @memberof atomic.AddFilesResponse + * @instance + */ + AddFilesResponse.prototype.failedPaths = $util.emptyArray; + + /** + * AddFilesResponse dryRun. + * @member {boolean} dryRun + * @memberof atomic.AddFilesResponse + * @instance + */ + AddFilesResponse.prototype.dryRun = false; + + /** + * AddFilesResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.AddFilesResponse + * @instance + */ + AddFilesResponse.prototype.meta = null; + + /** + * Creates a new AddFilesResponse instance using the specified properties. + * @function create + * @memberof atomic.AddFilesResponse + * @static + * @param {atomic.AddFilesResponse.$Properties=} [properties] Properties to set + * @returns {atomic.AddFilesResponse} AddFilesResponse instance + * @type {{ + * (properties: atomic.AddFilesResponse.$Shape): atomic.AddFilesResponse & atomic.AddFilesResponse.$Shape; + * (properties?: atomic.AddFilesResponse.$Properties): atomic.AddFilesResponse; + * }} + */ + AddFilesResponse.create = function(properties) { + return new AddFilesResponse(properties); + }; + + /** + * Encodes the specified AddFilesResponse message. Does not implicitly {@link atomic.AddFilesResponse.verify|verify} messages. + * @function encode + * @memberof atomic.AddFilesResponse + * @static + * @param {atomic.AddFilesResponse.$Properties} message AddFilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFilesResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.tracked != null && $Object.hasOwnProperty.call(message, "tracked") && message.tracked !== 0) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.tracked); + if (message.wouldAdd != null && message.wouldAdd.length) + for (var i = 0; i < message.wouldAdd.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.wouldAdd[i]); + if (message.skippedTracked != null && message.skippedTracked.length) + for (var i = 0; i < message.skippedTracked.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.skippedTracked[i]); + if (message.skippedIgnored != null && message.skippedIgnored.length) + for (var i = 0; i < message.skippedIgnored.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.skippedIgnored[i]); + if (message.failedPaths != null && message.failedPaths.length) + for (var i = 0; i < message.failedPaths.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.failedPaths[i]); + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun") && message.dryRun !== false) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.dryRun); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.ResponseMeta.encode(message.meta, writer.uint32(/* id 100, wireType 2 =*/802).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified AddFilesResponse message, length delimited. Does not implicitly {@link atomic.AddFilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.AddFilesResponse + * @static + * @param {atomic.AddFilesResponse.$Properties} message AddFilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFilesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes an AddFilesResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.AddFilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.AddFilesResponse & atomic.AddFilesResponse.$Shape} AddFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFilesResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.AddFilesResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.tracked = value; + else + delete message.tracked; + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.wouldAdd && message.wouldAdd.length)) + message.wouldAdd = []; + message.wouldAdd.push(reader.stringVerify()); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.skippedTracked && message.skippedTracked.length)) + message.skippedTracked = []; + message.skippedTracked.push(reader.stringVerify()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.skippedIgnored && message.skippedIgnored.length)) + message.skippedIgnored = []; + message.skippedIgnored.push(reader.stringVerify()); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.failedPaths && message.failedPaths.length)) + message.failedPaths = []; + message.failedPaths.push(reader.stringVerify()); + continue; + } + case 6: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.dryRun = value; + else + delete message.dryRun; + continue; + } + case 100: { + if (wireType !== 2) + break; + message.meta = $root.atomic.ResponseMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes an AddFilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.AddFilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.AddFilesResponse & atomic.AddFilesResponse.$Shape} AddFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFilesResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies an AddFilesResponse message. + * @function verify + * @memberof atomic.AddFilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddFilesResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.tracked != null && $Object.hasOwnProperty.call(message, "tracked")) + if (!$util.isInteger(message.tracked)) + return "tracked: integer expected"; + if (message.wouldAdd != null && $Object.hasOwnProperty.call(message, "wouldAdd")) { + if (!$Array.isArray(message.wouldAdd)) + return "wouldAdd: array expected"; + for (var i = 0; i < message.wouldAdd.length; ++i) + if (!$util.isString(message.wouldAdd[i])) + return "wouldAdd: string[] expected"; + } + if (message.skippedTracked != null && $Object.hasOwnProperty.call(message, "skippedTracked")) { + if (!$Array.isArray(message.skippedTracked)) + return "skippedTracked: array expected"; + for (var i = 0; i < message.skippedTracked.length; ++i) + if (!$util.isString(message.skippedTracked[i])) + return "skippedTracked: string[] expected"; + } + if (message.skippedIgnored != null && $Object.hasOwnProperty.call(message, "skippedIgnored")) { + if (!$Array.isArray(message.skippedIgnored)) + return "skippedIgnored: array expected"; + for (var i = 0; i < message.skippedIgnored.length; ++i) + if (!$util.isString(message.skippedIgnored[i])) + return "skippedIgnored: string[] expected"; + } + if (message.failedPaths != null && $Object.hasOwnProperty.call(message, "failedPaths")) { + if (!$Array.isArray(message.failedPaths)) + return "failedPaths: array expected"; + for (var i = 0; i < message.failedPaths.length; ++i) + if (!$util.isString(message.failedPaths[i])) + return "failedPaths: string[] expected"; + } + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.ResponseMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + return null; + }; + + /** + * Creates an AddFilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.AddFilesResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.AddFilesResponse} AddFilesResponse + */ + AddFilesResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.AddFilesResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.AddFilesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.AddFilesResponse(); + if (object.tracked != null) + if ($Number(object.tracked) !== 0) + message.tracked = object.tracked >>> 0; + if (object.wouldAdd) { + if (!$Array.isArray(object.wouldAdd)) + throw $TypeError(".atomic.AddFilesResponse.wouldAdd: array expected"); + message.wouldAdd = $Array(object.wouldAdd.length); + for (var i = 0; i < object.wouldAdd.length; ++i) + message.wouldAdd[i] = $String(object.wouldAdd[i]); + } + if (object.skippedTracked) { + if (!$Array.isArray(object.skippedTracked)) + throw $TypeError(".atomic.AddFilesResponse.skippedTracked: array expected"); + message.skippedTracked = $Array(object.skippedTracked.length); + for (var i = 0; i < object.skippedTracked.length; ++i) + message.skippedTracked[i] = $String(object.skippedTracked[i]); + } + if (object.skippedIgnored) { + if (!$Array.isArray(object.skippedIgnored)) + throw $TypeError(".atomic.AddFilesResponse.skippedIgnored: array expected"); + message.skippedIgnored = $Array(object.skippedIgnored.length); + for (var i = 0; i < object.skippedIgnored.length; ++i) + message.skippedIgnored[i] = $String(object.skippedIgnored[i]); + } + if (object.failedPaths) { + if (!$Array.isArray(object.failedPaths)) + throw $TypeError(".atomic.AddFilesResponse.failedPaths: array expected"); + message.failedPaths = $Array(object.failedPaths.length); + for (var i = 0; i < object.failedPaths.length; ++i) + message.failedPaths[i] = $String(object.failedPaths[i]); + } + if (object.dryRun != null) + if (object.dryRun) + message.dryRun = $Boolean(object.dryRun); + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.AddFilesResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from an AddFilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.AddFilesResponse + * @static + * @param {atomic.AddFilesResponse} message AddFilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddFilesResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.wouldAdd = []; + object.skippedTracked = []; + object.skippedIgnored = []; + object.failedPaths = []; + } + if (options.defaults) { + object.tracked = 0; + object.dryRun = false; + object.meta = null; + } + if (message.tracked != null && $Object.hasOwnProperty.call(message, "tracked")) + object.tracked = message.tracked; + if (message.wouldAdd && message.wouldAdd.length) { + object.wouldAdd = $Array(message.wouldAdd.length); + for (var j = 0; j < message.wouldAdd.length; ++j) + object.wouldAdd[j] = message.wouldAdd[j]; + } + if (message.skippedTracked && message.skippedTracked.length) { + object.skippedTracked = $Array(message.skippedTracked.length); + for (var j = 0; j < message.skippedTracked.length; ++j) + object.skippedTracked[j] = message.skippedTracked[j]; + } + if (message.skippedIgnored && message.skippedIgnored.length) { + object.skippedIgnored = $Array(message.skippedIgnored.length); + for (var j = 0; j < message.skippedIgnored.length; ++j) + object.skippedIgnored[j] = message.skippedIgnored[j]; + } + if (message.failedPaths && message.failedPaths.length) { + object.failedPaths = $Array(message.failedPaths.length); + for (var j = 0; j < message.failedPaths.length; ++j) + object.failedPaths[j] = message.failedPaths[j]; + } + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun")) + object.dryRun = message.dryRun; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.ResponseMeta.toObject(message.meta, options, _depth + 1); + return object; + }; + + /** + * Converts this AddFilesResponse to JSON. + * @function toJSON + * @memberof atomic.AddFilesResponse + * @instance + * @returns {Object.} JSON object + */ + AddFilesResponse.prototype.toJSON = function() { + return AddFilesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for AddFilesResponse + * @function getTypeUrl + * @memberof atomic.AddFilesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + AddFilesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.AddFilesResponse"; + }; + + return AddFilesResponse; + })(); + + atomic.ResponseMeta = (function() { + + /** + * Properties of a ResponseMeta. + * @typedef {Object} atomic.ResponseMeta.$Properties + * @property {string|null} [requestId] ResponseMeta requestId + * @property {boolean|null} [replayed] ResponseMeta replayed + * @property {atomic.ViewSnapshot.$Properties|null} [snapshot] ResponseMeta snapshot + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ResponseMeta. + * @memberof atomic + * @interface IResponseMeta + * @augments atomic.ResponseMeta.$Properties + * @deprecated Use atomic.ResponseMeta.$Properties instead. + */ + + /** + * Shape of a ResponseMeta. + * @typedef {atomic.ResponseMeta.$Properties} atomic.ResponseMeta.$Shape + */ + + /** + * Constructs a new ResponseMeta. + * @memberof atomic + * @classdesc Represents a ResponseMeta. + * @constructor + * @param {atomic.ResponseMeta.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ResponseMeta = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ResponseMeta requestId. + * @member {string} requestId + * @memberof atomic.ResponseMeta + * @instance + */ + ResponseMeta.prototype.requestId = ""; + + /** + * ResponseMeta replayed. + * @member {boolean} replayed + * @memberof atomic.ResponseMeta + * @instance + */ + ResponseMeta.prototype.replayed = false; + + /** + * ResponseMeta snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.ResponseMeta + * @instance + */ + ResponseMeta.prototype.snapshot = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ResponseMeta.prototype, "_snapshot", { + get: $util.oneOfGetter($oneOfFields = ["snapshot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseMeta instance using the specified properties. + * @function create + * @memberof atomic.ResponseMeta + * @static + * @param {atomic.ResponseMeta.$Properties=} [properties] Properties to set + * @returns {atomic.ResponseMeta} ResponseMeta instance + * @type {{ + * (properties: atomic.ResponseMeta.$Shape): atomic.ResponseMeta & atomic.ResponseMeta.$Shape; + * (properties?: atomic.ResponseMeta.$Properties): atomic.ResponseMeta; + * }} + */ + ResponseMeta.create = function(properties) { + return new ResponseMeta(properties); + }; + + /** + * Encodes the specified ResponseMeta message. Does not implicitly {@link atomic.ResponseMeta.verify|verify} messages. + * @function encode + * @memberof atomic.ResponseMeta + * @static + * @param {atomic.ResponseMeta.$Properties} message ResponseMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMeta.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId") && message.requestId !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); + if (message.replayed != null && $Object.hasOwnProperty.call(message, "replayed") && message.replayed !== false) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.replayed); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + $root.atomic.ViewSnapshot.encode(message.snapshot, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ResponseMeta message, length delimited. Does not implicitly {@link atomic.ResponseMeta.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ResponseMeta + * @static + * @param {atomic.ResponseMeta.$Properties} message ResponseMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseMeta.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ResponseMeta message from the specified reader or buffer. + * @function decode + * @memberof atomic.ResponseMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ResponseMeta & atomic.ResponseMeta.$Shape} ResponseMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMeta.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ResponseMeta(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.requestId = value; + else + delete message.requestId; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.replayed = value; + else + delete message.replayed; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + message._snapshot = "snapshot"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ResponseMeta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ResponseMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ResponseMeta & atomic.ResponseMeta.$Shape} ResponseMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseMeta.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ResponseMeta message. + * @function verify + * @memberof atomic.ResponseMeta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseMeta.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.replayed != null && $Object.hasOwnProperty.call(message, "replayed")) + if (typeof message.replayed !== "boolean") + return "replayed: boolean expected"; + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { + properties._snapshot = 1; + { + var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); + if (error) + return "snapshot." + error; + } + } + return null; + }; + + /** + * Creates a ResponseMeta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ResponseMeta + * @static + * @param {Object.} object Plain object + * @returns {atomic.ResponseMeta} ResponseMeta + */ + ResponseMeta.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ResponseMeta) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ResponseMeta: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ResponseMeta(); + if (object.requestId != null) + if (typeof object.requestId !== "string" || object.requestId.length) + message.requestId = $String(object.requestId); + if (object.replayed != null) + if (object.replayed) + message.replayed = $Boolean(object.replayed); + if (object.snapshot != null) { + if (!$util.isObject(object.snapshot)) + throw $TypeError(".atomic.ResponseMeta.snapshot: object expected"); + message.snapshot = $root.atomic.ViewSnapshot.fromObject(object.snapshot, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ResponseMeta message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ResponseMeta + * @static + * @param {atomic.ResponseMeta} message ResponseMeta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseMeta.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.requestId = ""; + object.replayed = false; + } + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) + object.requestId = message.requestId; + if (message.replayed != null && $Object.hasOwnProperty.call(message, "replayed")) + object.replayed = message.replayed; + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + object.snapshot = $root.atomic.ViewSnapshot.toObject(message.snapshot, options, _depth + 1); + return object; + }; + + /** + * Converts this ResponseMeta to JSON. + * @function toJSON + * @memberof atomic.ResponseMeta + * @instance + * @returns {Object.} JSON object + */ + ResponseMeta.prototype.toJSON = function() { + return ResponseMeta.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ResponseMeta + * @function getTypeUrl + * @memberof atomic.ResponseMeta + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ResponseMeta.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ResponseMeta"; + }; + + return ResponseMeta; + })(); + + atomic.RecordRequest = (function() { + + /** + * Properties of a RecordRequest. + * @typedef {Object} atomic.RecordRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] RecordRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] RecordRequest meta + * @property {string|null} [message] RecordRequest message + * @property {Array.|null} [paths] RecordRequest paths + * @property {atomic.ExpectedState.$Properties|null} [expected] RecordRequest expected + * @property {atomic.Author.$Properties|null} [author] RecordRequest author + * @property {string|null} [identityName] RecordRequest identityName + * @property {atomic.RecordAiAuthorship.$Properties|null} [aiAuthorship] RecordRequest aiAuthorship + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RecordRequest. + * @memberof atomic + * @interface IRecordRequest + * @augments atomic.RecordRequest.$Properties + * @deprecated Use atomic.RecordRequest.$Properties instead. + */ + + /** + * Shape of a RecordRequest. + * @typedef {{ + * repository?: atomic.RepositoryRef.$Shape|null; + * meta?: atomic.RequestMeta.$Shape|null; + * message?: string|null; + * paths?: Array.|null; + * expected?: atomic.ExpectedState.$Shape|null; + * author?: atomic.Author.$Shape|null; + * identityName?: string|null; + * aiAuthorship?: atomic.RecordAiAuthorship.$Shape|null; + * $unknowns?: Array.; + * }} atomic.RecordRequest.$Shape + */ + + /** + * Constructs a new RecordRequest. + * @memberof atomic + * @classdesc Represents a RecordRequest. + * @constructor + * @param {atomic.RecordRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var RecordRequest = function (properties) { + this.paths = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * RecordRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.RecordRequest + * @instance + */ + RecordRequest.prototype.repository = null; + + /** + * RecordRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.RecordRequest + * @instance + */ + RecordRequest.prototype.meta = null; + + /** + * RecordRequest message. + * @member {string} message + * @memberof atomic.RecordRequest + * @instance + */ + RecordRequest.prototype.message = ""; + + /** + * RecordRequest paths. + * @member {Array.} paths + * @memberof atomic.RecordRequest + * @instance + */ + RecordRequest.prototype.paths = $util.emptyArray; + + /** + * RecordRequest expected. + * @member {atomic.ExpectedState.$Properties|null|undefined} expected + * @memberof atomic.RecordRequest + * @instance + */ + RecordRequest.prototype.expected = null; + + /** + * RecordRequest author. + * @member {atomic.Author.$Properties|null|undefined} author + * @memberof atomic.RecordRequest + * @instance + */ + RecordRequest.prototype.author = null; + + /** + * RecordRequest identityName. + * @member {string|null|undefined} identityName + * @memberof atomic.RecordRequest + * @instance + */ + RecordRequest.prototype.identityName = null; + + /** + * RecordRequest aiAuthorship. + * @member {atomic.RecordAiAuthorship.$Properties|null|undefined} aiAuthorship + * @memberof atomic.RecordRequest + * @instance + */ + RecordRequest.prototype.aiAuthorship = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordRequest.prototype, "_expected", { + get: $util.oneOfGetter($oneOfFields = ["expected"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordRequest.prototype, "_author", { + get: $util.oneOfGetter($oneOfFields = ["author"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordRequest.prototype, "_identity_name", { + get: $util.oneOfGetter($oneOfFields = ["identityName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordRequest.prototype, "_ai_authorship", { + get: $util.oneOfGetter($oneOfFields = ["aiAuthorship"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RecordRequest instance using the specified properties. + * @function create + * @memberof atomic.RecordRequest + * @static + * @param {atomic.RecordRequest.$Properties=} [properties] Properties to set + * @returns {atomic.RecordRequest} RecordRequest instance + * @type {{ + * (properties: atomic.RecordRequest.$Shape): atomic.RecordRequest & atomic.RecordRequest.$Shape; + * (properties?: atomic.RecordRequest.$Properties): atomic.RecordRequest; + * }} + */ + RecordRequest.create = function(properties) { + return new RecordRequest(properties); + }; + + /** + * Encodes the specified RecordRequest message. Does not implicitly {@link atomic.RecordRequest.verify|verify} messages. + * @function encode + * @memberof atomic.RecordRequest + * @static + * @param {atomic.RecordRequest.$Properties} message RecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.RequestMeta.encode(message.meta, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.message != null && $Object.hasOwnProperty.call(message, "message") && message.message !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.paths[i]); + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) + $root.atomic.ExpectedState.encode(message.expected, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.author != null && $Object.hasOwnProperty.call(message, "author")) + $root.atomic.Author.encode(message.author, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.identityName != null && $Object.hasOwnProperty.call(message, "identityName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.identityName); + if (message.aiAuthorship != null && $Object.hasOwnProperty.call(message, "aiAuthorship")) + $root.atomic.RecordAiAuthorship.encode(message.aiAuthorship, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified RecordRequest message, length delimited. Does not implicitly {@link atomic.RecordRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.RecordRequest + * @static + * @param {atomic.RecordRequest.$Properties} message RecordRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a RecordRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.RecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.RecordRequest & atomic.RecordRequest.$Shape} RecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.RecordRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.meta = $root.atomic.RequestMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.message = value; + else + delete message.message; + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.stringVerify()); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.expected = $root.atomic.ExpectedState.decode(reader, reader.size(), $undefined, _depth + 1, message.expected); + message._expected = "expected"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.author = $root.atomic.Author.decode(reader, reader.size(), $undefined, _depth + 1, message.author); + message._author = "author"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.identityName = reader.stringVerify(); + message._identity_name = "identityName"; + continue; + } + case 8: { + if (wireType !== 2) + break; + message.aiAuthorship = $root.atomic.RecordAiAuthorship.decode(reader, reader.size(), $undefined, _depth + 1, message.aiAuthorship); + message._ai_authorship = "aiAuthorship"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a RecordRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.RecordRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.RecordRequest & atomic.RecordRequest.$Shape} RecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a RecordRequest message. + * @function verify + * @memberof atomic.RecordRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.RequestMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.paths != null && $Object.hasOwnProperty.call(message, "paths")) { + if (!$Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) { + properties._expected = 1; + { + var error = $root.atomic.ExpectedState.verify(message.expected, _depth + 1); + if (error) + return "expected." + error; + } + } + if (message.author != null && $Object.hasOwnProperty.call(message, "author")) { + properties._author = 1; + { + var error = $root.atomic.Author.verify(message.author, _depth + 1); + if (error) + return "author." + error; + } + } + if (message.identityName != null && $Object.hasOwnProperty.call(message, "identityName")) { + properties._identity_name = 1; + if (!$util.isString(message.identityName)) + return "identityName: string expected"; + } + if (message.aiAuthorship != null && $Object.hasOwnProperty.call(message, "aiAuthorship")) { + properties._ai_authorship = 1; + { + var error = $root.atomic.RecordAiAuthorship.verify(message.aiAuthorship, _depth + 1); + if (error) + return "aiAuthorship." + error; + } + } + return null; + }; + + /** + * Creates a RecordRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.RecordRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.RecordRequest} RecordRequest + */ + RecordRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.RecordRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.RecordRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.RecordRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.RecordRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.RecordRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.message != null) + if (typeof object.message !== "string" || object.message.length) + message.message = $String(object.message); + if (object.paths) { + if (!$Array.isArray(object.paths)) + throw $TypeError(".atomic.RecordRequest.paths: array expected"); + message.paths = $Array(object.paths.length); + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = $String(object.paths[i]); + } + if (object.expected != null) { + if (!$util.isObject(object.expected)) + throw $TypeError(".atomic.RecordRequest.expected: object expected"); + message.expected = $root.atomic.ExpectedState.fromObject(object.expected, _depth + 1); + } + if (object.author != null) { + if (!$util.isObject(object.author)) + throw $TypeError(".atomic.RecordRequest.author: object expected"); + message.author = $root.atomic.Author.fromObject(object.author, _depth + 1); + } + if (object.identityName != null) + message.identityName = $String(object.identityName); + if (object.aiAuthorship != null) { + if (!$util.isObject(object.aiAuthorship)) + throw $TypeError(".atomic.RecordRequest.aiAuthorship: object expected"); + message.aiAuthorship = $root.atomic.RecordAiAuthorship.fromObject(object.aiAuthorship, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.RecordRequest + * @static + * @param {atomic.RecordRequest} message RecordRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.repository = null; + object.meta = null; + object.message = ""; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.RequestMeta.toObject(message.meta, options, _depth + 1); + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) + object.message = message.message; + if (message.paths && message.paths.length) { + object.paths = $Array(message.paths.length); + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) + object.expected = $root.atomic.ExpectedState.toObject(message.expected, options, _depth + 1); + if (message.author != null && $Object.hasOwnProperty.call(message, "author")) + object.author = $root.atomic.Author.toObject(message.author, options, _depth + 1); + if (message.identityName != null && $Object.hasOwnProperty.call(message, "identityName")) + object.identityName = message.identityName; + if (message.aiAuthorship != null && $Object.hasOwnProperty.call(message, "aiAuthorship")) + object.aiAuthorship = $root.atomic.RecordAiAuthorship.toObject(message.aiAuthorship, options, _depth + 1); + return object; + }; + + /** + * Converts this RecordRequest to JSON. + * @function toJSON + * @memberof atomic.RecordRequest + * @instance + * @returns {Object.} JSON object + */ + RecordRequest.prototype.toJSON = function() { + return RecordRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RecordRequest + * @function getTypeUrl + * @memberof atomic.RecordRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RecordRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.RecordRequest"; + }; + + return RecordRequest; + })(); + + atomic.Author = (function() { + + /** + * Properties of an Author. + * @typedef {Object} atomic.Author.$Properties + * @property {string|null} [name] Author name + * @property {string|null} [email] Author email + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an Author. + * @memberof atomic + * @interface IAuthor + * @augments atomic.Author.$Properties + * @deprecated Use atomic.Author.$Properties instead. + */ + + /** + * Shape of an Author. + * @typedef {atomic.Author.$Properties} atomic.Author.$Shape + */ + + /** + * Constructs a new Author. + * @memberof atomic + * @classdesc Represents an Author. + * @constructor + * @param {atomic.Author.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var Author = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * Author name. + * @member {string} name + * @memberof atomic.Author + * @instance + */ + Author.prototype.name = ""; + + /** + * Author email. + * @member {string|null|undefined} email + * @memberof atomic.Author + * @instance + */ + Author.prototype.email = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(Author.prototype, "_email", { + get: $util.oneOfGetter($oneOfFields = ["email"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Author instance using the specified properties. + * @function create + * @memberof atomic.Author + * @static + * @param {atomic.Author.$Properties=} [properties] Properties to set + * @returns {atomic.Author} Author instance + * @type {{ + * (properties: atomic.Author.$Shape): atomic.Author & atomic.Author.$Shape; + * (properties?: atomic.Author.$Properties): atomic.Author; + * }} + */ + Author.create = function(properties) { + return new Author(properties); + }; + + /** + * Encodes the specified Author message. Does not implicitly {@link atomic.Author.verify|verify} messages. + * @function encode + * @memberof atomic.Author + * @static + * @param {atomic.Author.$Properties} message Author message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Author.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name") && message.name !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.email != null && $Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.email); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified Author message, length delimited. Does not implicitly {@link atomic.Author.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.Author + * @static + * @param {atomic.Author.$Properties} message Author message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Author.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes an Author message from the specified reader or buffer. + * @function decode + * @memberof atomic.Author + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.Author & atomic.Author.$Shape} Author + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Author.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.Author(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.name = value; + else + delete message.name; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.email = reader.stringVerify(); + message._email = "email"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes an Author message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.Author + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.Author & atomic.Author.$Shape} Author + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Author.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies an Author message. + * @function verify + * @memberof atomic.Author + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Author.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.email != null && $Object.hasOwnProperty.call(message, "email")) { + properties._email = 1; + if (!$util.isString(message.email)) + return "email: string expected"; + } + return null; + }; + + /** + * Creates an Author message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.Author + * @static + * @param {Object.} object Plain object + * @returns {atomic.Author} Author + */ + Author.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.Author) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.Author: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.Author(); + if (object.name != null) + if (typeof object.name !== "string" || object.name.length) + message.name = $String(object.name); + if (object.email != null) + message.email = $String(object.email); + return message; + }; + + /** + * Creates a plain object from an Author message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.Author + * @static + * @param {atomic.Author} message Author + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Author.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.email != null && $Object.hasOwnProperty.call(message, "email")) + object.email = message.email; + return object; + }; + + /** + * Converts this Author to JSON. + * @function toJSON + * @memberof atomic.Author + * @instance + * @returns {Object.} JSON object + */ + Author.prototype.toJSON = function() { + return Author.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Author + * @function getTypeUrl + * @memberof atomic.Author + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Author.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.Author"; + }; + + return Author; + })(); + + atomic.RecordAiAuthorship = (function() { + + /** + * Properties of a RecordAiAuthorship. + * @typedef {Object} atomic.RecordAiAuthorship.$Properties + * @property {string|null} [provider] RecordAiAuthorship provider + * @property {string|null} [model] RecordAiAuthorship model + * @property {string|null} [tool] RecordAiAuthorship tool + * @property {string|null} [suggestionType] RecordAiAuthorship suggestionType + * @property {number|Long|null} [inputTokens] RecordAiAuthorship inputTokens + * @property {number|Long|null} [outputTokens] RecordAiAuthorship outputTokens + * @property {string|null} [requestId] RecordAiAuthorship requestId + * @property {string|null} [sessionId] RecordAiAuthorship sessionId + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RecordAiAuthorship. + * @memberof atomic + * @interface IRecordAiAuthorship + * @augments atomic.RecordAiAuthorship.$Properties + * @deprecated Use atomic.RecordAiAuthorship.$Properties instead. + */ + + /** + * Shape of a RecordAiAuthorship. + * @typedef {atomic.RecordAiAuthorship.$Properties} atomic.RecordAiAuthorship.$Shape + */ + + /** + * Constructs a new RecordAiAuthorship. + * @memberof atomic + * @classdesc Represents a RecordAiAuthorship. + * @constructor + * @param {atomic.RecordAiAuthorship.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var RecordAiAuthorship = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * RecordAiAuthorship provider. + * @member {string} provider + * @memberof atomic.RecordAiAuthorship + * @instance + */ + RecordAiAuthorship.prototype.provider = ""; + + /** + * RecordAiAuthorship model. + * @member {string} model + * @memberof atomic.RecordAiAuthorship + * @instance + */ + RecordAiAuthorship.prototype.model = ""; + + /** + * RecordAiAuthorship tool. + * @member {string|null|undefined} tool + * @memberof atomic.RecordAiAuthorship + * @instance + */ + RecordAiAuthorship.prototype.tool = null; + + /** + * RecordAiAuthorship suggestionType. + * @member {string|null|undefined} suggestionType + * @memberof atomic.RecordAiAuthorship + * @instance + */ + RecordAiAuthorship.prototype.suggestionType = null; + + /** + * RecordAiAuthorship inputTokens. + * @member {number|Long|null|undefined} inputTokens + * @memberof atomic.RecordAiAuthorship + * @instance + */ + RecordAiAuthorship.prototype.inputTokens = null; + + /** + * RecordAiAuthorship outputTokens. + * @member {number|Long|null|undefined} outputTokens + * @memberof atomic.RecordAiAuthorship + * @instance + */ + RecordAiAuthorship.prototype.outputTokens = null; + + /** + * RecordAiAuthorship requestId. + * @member {string|null|undefined} requestId + * @memberof atomic.RecordAiAuthorship + * @instance + */ + RecordAiAuthorship.prototype.requestId = null; + + /** + * RecordAiAuthorship sessionId. + * @member {string|null|undefined} sessionId + * @memberof atomic.RecordAiAuthorship + * @instance + */ + RecordAiAuthorship.prototype.sessionId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordAiAuthorship.prototype, "_tool", { + get: $util.oneOfGetter($oneOfFields = ["tool"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordAiAuthorship.prototype, "_suggestion_type", { + get: $util.oneOfGetter($oneOfFields = ["suggestionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordAiAuthorship.prototype, "_input_tokens", { + get: $util.oneOfGetter($oneOfFields = ["inputTokens"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordAiAuthorship.prototype, "_output_tokens", { + get: $util.oneOfGetter($oneOfFields = ["outputTokens"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordAiAuthorship.prototype, "_request_id", { + get: $util.oneOfGetter($oneOfFields = ["requestId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordAiAuthorship.prototype, "_session_id", { + get: $util.oneOfGetter($oneOfFields = ["sessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RecordAiAuthorship instance using the specified properties. + * @function create + * @memberof atomic.RecordAiAuthorship + * @static + * @param {atomic.RecordAiAuthorship.$Properties=} [properties] Properties to set + * @returns {atomic.RecordAiAuthorship} RecordAiAuthorship instance + * @type {{ + * (properties: atomic.RecordAiAuthorship.$Shape): atomic.RecordAiAuthorship & atomic.RecordAiAuthorship.$Shape; + * (properties?: atomic.RecordAiAuthorship.$Properties): atomic.RecordAiAuthorship; + * }} + */ + RecordAiAuthorship.create = function(properties) { + return new RecordAiAuthorship(properties); + }; + + /** + * Encodes the specified RecordAiAuthorship message. Does not implicitly {@link atomic.RecordAiAuthorship.verify|verify} messages. + * @function encode + * @memberof atomic.RecordAiAuthorship + * @static + * @param {atomic.RecordAiAuthorship.$Properties} message RecordAiAuthorship message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordAiAuthorship.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.provider != null && $Object.hasOwnProperty.call(message, "provider") && message.provider !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.provider); + if (message.model != null && $Object.hasOwnProperty.call(message, "model") && message.model !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.model); + if (message.tool != null && $Object.hasOwnProperty.call(message, "tool")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tool); + if (message.suggestionType != null && $Object.hasOwnProperty.call(message, "suggestionType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.suggestionType); + if (message.inputTokens != null && $Object.hasOwnProperty.call(message, "inputTokens")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.inputTokens); + if (message.outputTokens != null && $Object.hasOwnProperty.call(message, "outputTokens")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.outputTokens); + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.requestId); + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.sessionId); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified RecordAiAuthorship message, length delimited. Does not implicitly {@link atomic.RecordAiAuthorship.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.RecordAiAuthorship + * @static + * @param {atomic.RecordAiAuthorship.$Properties} message RecordAiAuthorship message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordAiAuthorship.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a RecordAiAuthorship message from the specified reader or buffer. + * @function decode + * @memberof atomic.RecordAiAuthorship + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.RecordAiAuthorship & atomic.RecordAiAuthorship.$Shape} RecordAiAuthorship + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordAiAuthorship.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.RecordAiAuthorship(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.provider = value; + else + delete message.provider; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.model = value; + else + delete message.model; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.tool = reader.stringVerify(); + message._tool = "tool"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.suggestionType = reader.stringVerify(); + message._suggestion_type = "suggestionType"; + continue; + } + case 5: { + if (wireType !== 0) + break; + message.inputTokens = reader.uint64(); + message._input_tokens = "inputTokens"; + continue; + } + case 6: { + if (wireType !== 0) + break; + message.outputTokens = reader.uint64(); + message._output_tokens = "outputTokens"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.requestId = reader.stringVerify(); + message._request_id = "requestId"; + continue; + } + case 8: { + if (wireType !== 2) + break; + message.sessionId = reader.stringVerify(); + message._session_id = "sessionId"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a RecordAiAuthorship message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.RecordAiAuthorship + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.RecordAiAuthorship & atomic.RecordAiAuthorship.$Shape} RecordAiAuthorship + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordAiAuthorship.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a RecordAiAuthorship message. + * @function verify + * @memberof atomic.RecordAiAuthorship + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordAiAuthorship.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.provider != null && $Object.hasOwnProperty.call(message, "provider")) + if (!$util.isString(message.provider)) + return "provider: string expected"; + if (message.model != null && $Object.hasOwnProperty.call(message, "model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.tool != null && $Object.hasOwnProperty.call(message, "tool")) { + properties._tool = 1; + if (!$util.isString(message.tool)) + return "tool: string expected"; + } + if (message.suggestionType != null && $Object.hasOwnProperty.call(message, "suggestionType")) { + properties._suggestion_type = 1; + if (!$util.isString(message.suggestionType)) + return "suggestionType: string expected"; + } + if (message.inputTokens != null && $Object.hasOwnProperty.call(message, "inputTokens")) { + properties._input_tokens = 1; + if (!$util.isInteger(message.inputTokens) && !(message.inputTokens && $util.isInteger(message.inputTokens.low) && $util.isInteger(message.inputTokens.high))) + return "inputTokens: integer|Long expected"; + } + if (message.outputTokens != null && $Object.hasOwnProperty.call(message, "outputTokens")) { + properties._output_tokens = 1; + if (!$util.isInteger(message.outputTokens) && !(message.outputTokens && $util.isInteger(message.outputTokens.low) && $util.isInteger(message.outputTokens.high))) + return "outputTokens: integer|Long expected"; + } + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) { + properties._request_id = 1; + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + } + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) { + properties._session_id = 1; + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + } + return null; + }; + + /** + * Creates a RecordAiAuthorship message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.RecordAiAuthorship + * @static + * @param {Object.} object Plain object + * @returns {atomic.RecordAiAuthorship} RecordAiAuthorship + */ + RecordAiAuthorship.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.RecordAiAuthorship) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.RecordAiAuthorship: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.RecordAiAuthorship(); + if (object.provider != null) + if (typeof object.provider !== "string" || object.provider.length) + message.provider = $String(object.provider); + if (object.model != null) + if (typeof object.model !== "string" || object.model.length) + message.model = $String(object.model); + if (object.tool != null) + message.tool = $String(object.tool); + if (object.suggestionType != null) + message.suggestionType = $String(object.suggestionType); + if (object.inputTokens != null) + if ($util.Long) + message.inputTokens = $util.Long.fromValue(object.inputTokens, true); + else if (typeof object.inputTokens === "string") + message.inputTokens = $parseInt(object.inputTokens, 10); + else if (typeof object.inputTokens === "number") + message.inputTokens = object.inputTokens; + else if (typeof object.inputTokens === "object") + message.inputTokens = new $util.LongBits(object.inputTokens.low >>> 0, object.inputTokens.high >>> 0).toNumber(true); + if (object.outputTokens != null) + if ($util.Long) + message.outputTokens = $util.Long.fromValue(object.outputTokens, true); + else if (typeof object.outputTokens === "string") + message.outputTokens = $parseInt(object.outputTokens, 10); + else if (typeof object.outputTokens === "number") + message.outputTokens = object.outputTokens; + else if (typeof object.outputTokens === "object") + message.outputTokens = new $util.LongBits(object.outputTokens.low >>> 0, object.outputTokens.high >>> 0).toNumber(true); + if (object.requestId != null) + message.requestId = $String(object.requestId); + if (object.sessionId != null) + message.sessionId = $String(object.sessionId); + return message; + }; + + /** + * Creates a plain object from a RecordAiAuthorship message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.RecordAiAuthorship + * @static + * @param {atomic.RecordAiAuthorship} message RecordAiAuthorship + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordAiAuthorship.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.provider = ""; + object.model = ""; + } + if (message.provider != null && $Object.hasOwnProperty.call(message, "provider")) + object.provider = message.provider; + if (message.model != null && $Object.hasOwnProperty.call(message, "model")) + object.model = message.model; + if (message.tool != null && $Object.hasOwnProperty.call(message, "tool")) + object.tool = message.tool; + if (message.suggestionType != null && $Object.hasOwnProperty.call(message, "suggestionType")) + object.suggestionType = message.suggestionType; + if (message.inputTokens != null && $Object.hasOwnProperty.call(message, "inputTokens")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.inputTokens = typeof message.inputTokens === "number" ? $BigInt(message.inputTokens) : $util.Long.fromBits(message.inputTokens.low >>> 0, message.inputTokens.high >>> 0, true).toBigInt(); + else if (typeof message.inputTokens === "number") + object.inputTokens = options.longs === $String ? $String(message.inputTokens) : message.inputTokens; + else + object.inputTokens = options.longs === $String ? $util.Long.prototype.toString.call(message.inputTokens) : options.longs === $Number ? new $util.LongBits(message.inputTokens.low >>> 0, message.inputTokens.high >>> 0).toNumber(true) : message.inputTokens; + if (message.outputTokens != null && $Object.hasOwnProperty.call(message, "outputTokens")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.outputTokens = typeof message.outputTokens === "number" ? $BigInt(message.outputTokens) : $util.Long.fromBits(message.outputTokens.low >>> 0, message.outputTokens.high >>> 0, true).toBigInt(); + else if (typeof message.outputTokens === "number") + object.outputTokens = options.longs === $String ? $String(message.outputTokens) : message.outputTokens; + else + object.outputTokens = options.longs === $String ? $util.Long.prototype.toString.call(message.outputTokens) : options.longs === $Number ? new $util.LongBits(message.outputTokens.low >>> 0, message.outputTokens.high >>> 0).toNumber(true) : message.outputTokens; + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) + object.requestId = message.requestId; + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) + object.sessionId = message.sessionId; + return object; + }; + + /** + * Converts this RecordAiAuthorship to JSON. + * @function toJSON + * @memberof atomic.RecordAiAuthorship + * @instance + * @returns {Object.} JSON object + */ + RecordAiAuthorship.prototype.toJSON = function() { + return RecordAiAuthorship.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RecordAiAuthorship + * @function getTypeUrl + * @memberof atomic.RecordAiAuthorship + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RecordAiAuthorship.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.RecordAiAuthorship"; + }; + + return RecordAiAuthorship; + })(); + + atomic.RecordResponse = (function() { + + /** + * Properties of a RecordResponse. + * @typedef {Object} atomic.RecordResponse.$Properties + * @property {atomic.ChangeInfo.$Properties|null} [change] RecordResponse change + * @property {atomic.Hash.$Properties|null} [viewMerkle] RecordResponse viewMerkle + * @property {string|null} [view] RecordResponse view + * @property {atomic.ResponseMeta.$Properties|null} [meta] RecordResponse meta + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RecordResponse. + * @memberof atomic + * @interface IRecordResponse + * @augments atomic.RecordResponse.$Properties + * @deprecated Use atomic.RecordResponse.$Properties instead. + */ + + /** + * Shape of a RecordResponse. + * @typedef {atomic.RecordResponse.$Properties} atomic.RecordResponse.$Shape + */ + + /** + * Constructs a new RecordResponse. + * @memberof atomic + * @classdesc Represents a RecordResponse. + * @constructor + * @param {atomic.RecordResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var RecordResponse = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * RecordResponse change. + * @member {atomic.ChangeInfo.$Properties|null|undefined} change + * @memberof atomic.RecordResponse + * @instance + */ + RecordResponse.prototype.change = null; + + /** + * RecordResponse viewMerkle. + * @member {atomic.Hash.$Properties|null|undefined} viewMerkle + * @memberof atomic.RecordResponse + * @instance + */ + RecordResponse.prototype.viewMerkle = null; + + /** + * RecordResponse view. + * @member {string|null|undefined} view + * @memberof atomic.RecordResponse + * @instance + */ + RecordResponse.prototype.view = null; + + /** + * RecordResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.RecordResponse + * @instance + */ + RecordResponse.prototype.meta = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordResponse.prototype, "_view_merkle", { + get: $util.oneOfGetter($oneOfFields = ["viewMerkle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RecordResponse.prototype, "_view", { + get: $util.oneOfGetter($oneOfFields = ["view"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RecordResponse instance using the specified properties. + * @function create + * @memberof atomic.RecordResponse + * @static + * @param {atomic.RecordResponse.$Properties=} [properties] Properties to set + * @returns {atomic.RecordResponse} RecordResponse instance + * @type {{ + * (properties: atomic.RecordResponse.$Shape): atomic.RecordResponse & atomic.RecordResponse.$Shape; + * (properties?: atomic.RecordResponse.$Properties): atomic.RecordResponse; + * }} + */ + RecordResponse.create = function(properties) { + return new RecordResponse(properties); + }; + + /** + * Encodes the specified RecordResponse message. Does not implicitly {@link atomic.RecordResponse.verify|verify} messages. + * @function encode + * @memberof atomic.RecordResponse + * @static + * @param {atomic.RecordResponse.$Properties} message RecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.change != null && $Object.hasOwnProperty.call(message, "change")) + $root.atomic.ChangeInfo.encode(message.change, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.viewMerkle != null && $Object.hasOwnProperty.call(message, "viewMerkle")) + $root.atomic.Hash.encode(message.viewMerkle, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.view); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.ResponseMeta.encode(message.meta, writer.uint32(/* id 100, wireType 2 =*/802).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified RecordResponse message, length delimited. Does not implicitly {@link atomic.RecordResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.RecordResponse + * @static + * @param {atomic.RecordResponse.$Properties} message RecordResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a RecordResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.RecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.RecordResponse & atomic.RecordResponse.$Shape} RecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.RecordResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.change = $root.atomic.ChangeInfo.decode(reader, reader.size(), $undefined, _depth + 1, message.change); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.viewMerkle = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.viewMerkle); + message._view_merkle = "viewMerkle"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.view = reader.stringVerify(); + message._view = "view"; + continue; + } + case 100: { + if (wireType !== 2) + break; + message.meta = $root.atomic.ResponseMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a RecordResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.RecordResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.RecordResponse & atomic.RecordResponse.$Shape} RecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a RecordResponse message. + * @function verify + * @memberof atomic.RecordResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.change != null && $Object.hasOwnProperty.call(message, "change")) { + var error = $root.atomic.ChangeInfo.verify(message.change, _depth + 1); + if (error) + return "change." + error; + } + if (message.viewMerkle != null && $Object.hasOwnProperty.call(message, "viewMerkle")) { + properties._view_merkle = 1; + { + var error = $root.atomic.Hash.verify(message.viewMerkle, _depth + 1); + if (error) + return "viewMerkle." + error; + } + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + properties._view = 1; + if (!$util.isString(message.view)) + return "view: string expected"; + } + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.ResponseMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + return null; + }; + + /** + * Creates a RecordResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.RecordResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.RecordResponse} RecordResponse + */ + RecordResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.RecordResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.RecordResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.RecordResponse(); + if (object.change != null) { + if (!$util.isObject(object.change)) + throw $TypeError(".atomic.RecordResponse.change: object expected"); + message.change = $root.atomic.ChangeInfo.fromObject(object.change, _depth + 1); + } + if (object.viewMerkle != null) { + if (!$util.isObject(object.viewMerkle)) + throw $TypeError(".atomic.RecordResponse.viewMerkle: object expected"); + message.viewMerkle = $root.atomic.Hash.fromObject(object.viewMerkle, _depth + 1); + } + if (object.view != null) + message.view = $String(object.view); + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.RecordResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.RecordResponse + * @static + * @param {atomic.RecordResponse} message RecordResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.change = null; + object.meta = null; + } + if (message.change != null && $Object.hasOwnProperty.call(message, "change")) + object.change = $root.atomic.ChangeInfo.toObject(message.change, options, _depth + 1); + if (message.viewMerkle != null && $Object.hasOwnProperty.call(message, "viewMerkle")) + object.viewMerkle = $root.atomic.Hash.toObject(message.viewMerkle, options, _depth + 1); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.ResponseMeta.toObject(message.meta, options, _depth + 1); + return object; + }; + + /** + * Converts this RecordResponse to JSON. + * @function toJSON + * @memberof atomic.RecordResponse + * @instance + * @returns {Object.} JSON object + */ + RecordResponse.prototype.toJSON = function() { + return RecordResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RecordResponse + * @function getTypeUrl + * @memberof atomic.RecordResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RecordResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.RecordResponse"; + }; + + return RecordResponse; + })(); + + atomic.ChangeInfo = (function() { + + /** + * Properties of a ChangeInfo. + * @typedef {Object} atomic.ChangeInfo.$Properties + * @property {atomic.Hash.$Properties|null} [hash] ChangeInfo hash + * @property {string|null} [message] ChangeInfo message + * @property {string|null} [description] ChangeInfo description + * @property {Array.|null} [authors] ChangeInfo authors + * @property {google.protobuf.Timestamp.$Properties|null} [recordedAt] ChangeInfo recordedAt + * @property {Array.|null} [dependencies] ChangeInfo dependencies + * @property {number|null} [graphSectionCount] ChangeInfo graphSectionCount + * @property {number|null} [semanticSectionCount] ChangeInfo semanticSectionCount + * @property {number|null} [contentChunkCount] ChangeInfo contentChunkCount + * @property {boolean|null} [hasProvenance] ChangeInfo hasProvenance + * @property {boolean|null} [hasUnhashed] ChangeInfo hasUnhashed + * @property {boolean|null} [hasSignature] ChangeInfo hasSignature + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeInfo. + * @memberof atomic + * @interface IChangeInfo + * @augments atomic.ChangeInfo.$Properties + * @deprecated Use atomic.ChangeInfo.$Properties instead. + */ + + /** + * Shape of a ChangeInfo. + * @typedef {atomic.ChangeInfo.$Properties} atomic.ChangeInfo.$Shape + */ + + /** + * Constructs a new ChangeInfo. + * @memberof atomic + * @classdesc Represents a ChangeInfo. + * @constructor + * @param {atomic.ChangeInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeInfo = function (properties) { + this.authors = []; + this.dependencies = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeInfo hash. + * @member {atomic.Hash.$Properties|null|undefined} hash + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.hash = null; + + /** + * ChangeInfo message. + * @member {string|null|undefined} message + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.message = null; + + /** + * ChangeInfo description. + * @member {string|null|undefined} description + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.description = null; + + /** + * ChangeInfo authors. + * @member {Array.} authors + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.authors = $util.emptyArray; + + /** + * ChangeInfo recordedAt. + * @member {google.protobuf.Timestamp.$Properties|null|undefined} recordedAt + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.recordedAt = null; + + /** + * ChangeInfo dependencies. + * @member {Array.} dependencies + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.dependencies = $util.emptyArray; + + /** + * ChangeInfo graphSectionCount. + * @member {number} graphSectionCount + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.graphSectionCount = 0; + + /** + * ChangeInfo semanticSectionCount. + * @member {number} semanticSectionCount + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.semanticSectionCount = 0; + + /** + * ChangeInfo contentChunkCount. + * @member {number} contentChunkCount + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.contentChunkCount = 0; + + /** + * ChangeInfo hasProvenance. + * @member {boolean} hasProvenance + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.hasProvenance = false; + + /** + * ChangeInfo hasUnhashed. + * @member {boolean} hasUnhashed + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.hasUnhashed = false; + + /** + * ChangeInfo hasSignature. + * @member {boolean} hasSignature + * @memberof atomic.ChangeInfo + * @instance + */ + ChangeInfo.prototype.hasSignature = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeInfo.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeInfo.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeInfo.prototype, "_recorded_at", { + get: $util.oneOfGetter($oneOfFields = ["recordedAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeInfo instance using the specified properties. + * @function create + * @memberof atomic.ChangeInfo + * @static + * @param {atomic.ChangeInfo.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeInfo} ChangeInfo instance + * @type {{ + * (properties: atomic.ChangeInfo.$Shape): atomic.ChangeInfo & atomic.ChangeInfo.$Shape; + * (properties?: atomic.ChangeInfo.$Properties): atomic.ChangeInfo; + * }} + */ + ChangeInfo.create = function(properties) { + return new ChangeInfo(properties); + }; + + /** + * Encodes the specified ChangeInfo message. Does not implicitly {@link atomic.ChangeInfo.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeInfo + * @static + * @param {atomic.ChangeInfo.$Properties} message ChangeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeInfo.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) + $root.atomic.Hash.encode(message.hash, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.authors != null && message.authors.length) + for (var i = 0; i < message.authors.length; ++i) + $root.atomic.Author.encode(message.authors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.recordedAt != null && $Object.hasOwnProperty.call(message, "recordedAt")) + $root.google.protobuf.Timestamp.encode(message.recordedAt, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.dependencies != null && message.dependencies.length) + for (var i = 0; i < message.dependencies.length; ++i) + $root.atomic.Hash.encode(message.dependencies[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.graphSectionCount != null && $Object.hasOwnProperty.call(message, "graphSectionCount") && message.graphSectionCount !== 0) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.graphSectionCount); + if (message.semanticSectionCount != null && $Object.hasOwnProperty.call(message, "semanticSectionCount") && message.semanticSectionCount !== 0) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.semanticSectionCount); + if (message.contentChunkCount != null && $Object.hasOwnProperty.call(message, "contentChunkCount") && message.contentChunkCount !== 0) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.contentChunkCount); + if (message.hasProvenance != null && $Object.hasOwnProperty.call(message, "hasProvenance") && message.hasProvenance !== false) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.hasProvenance); + if (message.hasUnhashed != null && $Object.hasOwnProperty.call(message, "hasUnhashed") && message.hasUnhashed !== false) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.hasUnhashed); + if (message.hasSignature != null && $Object.hasOwnProperty.call(message, "hasSignature") && message.hasSignature !== false) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.hasSignature); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeInfo message, length delimited. Does not implicitly {@link atomic.ChangeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeInfo + * @static + * @param {atomic.ChangeInfo.$Properties} message ChangeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeInfo message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeInfo & atomic.ChangeInfo.$Shape} ChangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeInfo.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeInfo(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.hash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.hash); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.message = reader.stringVerify(); + message._message = "message"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.description = reader.stringVerify(); + message._description = "description"; + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.authors && message.authors.length)) + message.authors = []; + message.authors.push($root.atomic.Author.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.recordedAt = $root.google.protobuf.Timestamp.decode(reader, reader.size(), $undefined, _depth + 1, message.recordedAt); + message._recorded_at = "recordedAt"; + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.dependencies && message.dependencies.length)) + message.dependencies = []; + message.dependencies.push($root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.graphSectionCount = value; + else + delete message.graphSectionCount; + continue; + } + case 8: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.semanticSectionCount = value; + else + delete message.semanticSectionCount; + continue; + } + case 9: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.contentChunkCount = value; + else + delete message.contentChunkCount; + continue; + } + case 10: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.hasProvenance = value; + else + delete message.hasProvenance; + continue; + } + case 11: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.hasUnhashed = value; + else + delete message.hasUnhashed; + continue; + } + case 12: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.hasSignature = value; + else + delete message.hasSignature; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeInfo & atomic.ChangeInfo.$Shape} ChangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeInfo.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeInfo message. + * @function verify + * @memberof atomic.ChangeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeInfo.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) { + var error = $root.atomic.Hash.verify(message.hash, _depth + 1); + if (error) + return "hash." + error; + } + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) { + properties._message = 1; + if (!$util.isString(message.message)) + return "message: string expected"; + } + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.authors != null && $Object.hasOwnProperty.call(message, "authors")) { + if (!$Array.isArray(message.authors)) + return "authors: array expected"; + for (var i = 0; i < message.authors.length; ++i) { + var error = $root.atomic.Author.verify(message.authors[i], _depth + 1); + if (error) + return "authors." + error; + } + } + if (message.recordedAt != null && $Object.hasOwnProperty.call(message, "recordedAt")) { + properties._recorded_at = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recordedAt, _depth + 1); + if (error) + return "recordedAt." + error; + } + } + if (message.dependencies != null && $Object.hasOwnProperty.call(message, "dependencies")) { + if (!$Array.isArray(message.dependencies)) + return "dependencies: array expected"; + for (var i = 0; i < message.dependencies.length; ++i) { + var error = $root.atomic.Hash.verify(message.dependencies[i], _depth + 1); + if (error) + return "dependencies." + error; + } + } + if (message.graphSectionCount != null && $Object.hasOwnProperty.call(message, "graphSectionCount")) + if (!$util.isInteger(message.graphSectionCount)) + return "graphSectionCount: integer expected"; + if (message.semanticSectionCount != null && $Object.hasOwnProperty.call(message, "semanticSectionCount")) + if (!$util.isInteger(message.semanticSectionCount)) + return "semanticSectionCount: integer expected"; + if (message.contentChunkCount != null && $Object.hasOwnProperty.call(message, "contentChunkCount")) + if (!$util.isInteger(message.contentChunkCount)) + return "contentChunkCount: integer expected"; + if (message.hasProvenance != null && $Object.hasOwnProperty.call(message, "hasProvenance")) + if (typeof message.hasProvenance !== "boolean") + return "hasProvenance: boolean expected"; + if (message.hasUnhashed != null && $Object.hasOwnProperty.call(message, "hasUnhashed")) + if (typeof message.hasUnhashed !== "boolean") + return "hasUnhashed: boolean expected"; + if (message.hasSignature != null && $Object.hasOwnProperty.call(message, "hasSignature")) + if (typeof message.hasSignature !== "boolean") + return "hasSignature: boolean expected"; + return null; + }; + + /** + * Creates a ChangeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeInfo + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeInfo} ChangeInfo + */ + ChangeInfo.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeInfo) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeInfo(); + if (object.hash != null) { + if (!$util.isObject(object.hash)) + throw $TypeError(".atomic.ChangeInfo.hash: object expected"); + message.hash = $root.atomic.Hash.fromObject(object.hash, _depth + 1); + } + if (object.message != null) + message.message = $String(object.message); + if (object.description != null) + message.description = $String(object.description); + if (object.authors) { + if (!$Array.isArray(object.authors)) + throw $TypeError(".atomic.ChangeInfo.authors: array expected"); + message.authors = $Array(object.authors.length); + for (var i = 0; i < object.authors.length; ++i) { + if (!$util.isObject(object.authors[i])) + throw $TypeError(".atomic.ChangeInfo.authors: object expected"); + message.authors[i] = $root.atomic.Author.fromObject(object.authors[i], _depth + 1); + } + } + if (object.recordedAt != null) { + if (!$util.isObject(object.recordedAt)) + throw $TypeError(".atomic.ChangeInfo.recordedAt: object expected"); + message.recordedAt = $root.google.protobuf.Timestamp.fromObject(object.recordedAt, _depth + 1); + } + if (object.dependencies) { + if (!$Array.isArray(object.dependencies)) + throw $TypeError(".atomic.ChangeInfo.dependencies: array expected"); + message.dependencies = $Array(object.dependencies.length); + for (var i = 0; i < object.dependencies.length; ++i) { + if (!$util.isObject(object.dependencies[i])) + throw $TypeError(".atomic.ChangeInfo.dependencies: object expected"); + message.dependencies[i] = $root.atomic.Hash.fromObject(object.dependencies[i], _depth + 1); + } + } + if (object.graphSectionCount != null) + if ($Number(object.graphSectionCount) !== 0) + message.graphSectionCount = object.graphSectionCount >>> 0; + if (object.semanticSectionCount != null) + if ($Number(object.semanticSectionCount) !== 0) + message.semanticSectionCount = object.semanticSectionCount >>> 0; + if (object.contentChunkCount != null) + if ($Number(object.contentChunkCount) !== 0) + message.contentChunkCount = object.contentChunkCount >>> 0; + if (object.hasProvenance != null) + if (object.hasProvenance) + message.hasProvenance = $Boolean(object.hasProvenance); + if (object.hasUnhashed != null) + if (object.hasUnhashed) + message.hasUnhashed = $Boolean(object.hasUnhashed); + if (object.hasSignature != null) + if (object.hasSignature) + message.hasSignature = $Boolean(object.hasSignature); + return message; + }; + + /** + * Creates a plain object from a ChangeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeInfo + * @static + * @param {atomic.ChangeInfo} message ChangeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeInfo.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.authors = []; + object.dependencies = []; + } + if (options.defaults) { + object.hash = null; + object.graphSectionCount = 0; + object.semanticSectionCount = 0; + object.contentChunkCount = 0; + object.hasProvenance = false; + object.hasUnhashed = false; + object.hasSignature = false; + } + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) + object.hash = $root.atomic.Hash.toObject(message.hash, options, _depth + 1); + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) + object.message = message.message; + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + if (message.authors && message.authors.length) { + object.authors = $Array(message.authors.length); + for (var j = 0; j < message.authors.length; ++j) + object.authors[j] = $root.atomic.Author.toObject(message.authors[j], options, _depth + 1); + } + if (message.recordedAt != null && $Object.hasOwnProperty.call(message, "recordedAt")) + object.recordedAt = $root.google.protobuf.Timestamp.toObject(message.recordedAt, options, _depth + 1); + if (message.dependencies && message.dependencies.length) { + object.dependencies = $Array(message.dependencies.length); + for (var j = 0; j < message.dependencies.length; ++j) + object.dependencies[j] = $root.atomic.Hash.toObject(message.dependencies[j], options, _depth + 1); + } + if (message.graphSectionCount != null && $Object.hasOwnProperty.call(message, "graphSectionCount")) + object.graphSectionCount = message.graphSectionCount; + if (message.semanticSectionCount != null && $Object.hasOwnProperty.call(message, "semanticSectionCount")) + object.semanticSectionCount = message.semanticSectionCount; + if (message.contentChunkCount != null && $Object.hasOwnProperty.call(message, "contentChunkCount")) + object.contentChunkCount = message.contentChunkCount; + if (message.hasProvenance != null && $Object.hasOwnProperty.call(message, "hasProvenance")) + object.hasProvenance = message.hasProvenance; + if (message.hasUnhashed != null && $Object.hasOwnProperty.call(message, "hasUnhashed")) + object.hasUnhashed = message.hasUnhashed; + if (message.hasSignature != null && $Object.hasOwnProperty.call(message, "hasSignature")) + object.hasSignature = message.hasSignature; + return object; + }; + + /** + * Converts this ChangeInfo to JSON. + * @function toJSON + * @memberof atomic.ChangeInfo + * @instance + * @returns {Object.} JSON object + */ + ChangeInfo.prototype.toJSON = function() { + return ChangeInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeInfo + * @function getTypeUrl + * @memberof atomic.ChangeInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeInfo"; + }; + + return ChangeInfo; + })(); + + atomic.LogRequest = (function() { + + /** + * Properties of a LogRequest. + * @typedef {Object} atomic.LogRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] LogRequest repository + * @property {boolean|null} [allViews] LogRequest allViews + * @property {string|null} [view] LogRequest view + * @property {atomic.PageCursor.$Properties|null} [cursor] LogRequest cursor + * @property {atomic.PageBudget.$Properties|null} [budget] LogRequest budget + * @property {Array.|null} [pathFilter] LogRequest pathFilter + * @property {boolean|null} [tagsOnly] LogRequest tagsOnly + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a LogRequest. + * @memberof atomic + * @interface ILogRequest + * @augments atomic.LogRequest.$Properties + * @deprecated Use atomic.LogRequest.$Properties instead. + */ + + /** + * Shape of a LogRequest. + * @typedef {atomic.LogRequest.$Properties} atomic.LogRequest.$Shape + */ + + /** + * Constructs a new LogRequest. + * @memberof atomic + * @classdesc Represents a LogRequest. + * @constructor + * @param {atomic.LogRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var LogRequest = function (properties) { + this.pathFilter = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * LogRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.LogRequest + * @instance + */ + LogRequest.prototype.repository = null; + + /** + * LogRequest allViews. + * @member {boolean} allViews + * @memberof atomic.LogRequest + * @instance + */ + LogRequest.prototype.allViews = false; + + /** + * LogRequest view. + * @member {string|null|undefined} view + * @memberof atomic.LogRequest + * @instance + */ + LogRequest.prototype.view = null; + + /** + * LogRequest cursor. + * @member {atomic.PageCursor.$Properties|null|undefined} cursor + * @memberof atomic.LogRequest + * @instance + */ + LogRequest.prototype.cursor = null; + + /** + * LogRequest budget. + * @member {atomic.PageBudget.$Properties|null|undefined} budget + * @memberof atomic.LogRequest + * @instance + */ + LogRequest.prototype.budget = null; + + /** + * LogRequest pathFilter. + * @member {Array.} pathFilter + * @memberof atomic.LogRequest + * @instance + */ + LogRequest.prototype.pathFilter = $util.emptyArray; + + /** + * LogRequest tagsOnly. + * @member {boolean} tagsOnly + * @memberof atomic.LogRequest + * @instance + */ + LogRequest.prototype.tagsOnly = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(LogRequest.prototype, "_view", { + get: $util.oneOfGetter($oneOfFields = ["view"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(LogRequest.prototype, "_cursor", { + get: $util.oneOfGetter($oneOfFields = ["cursor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(LogRequest.prototype, "_budget", { + get: $util.oneOfGetter($oneOfFields = ["budget"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LogRequest instance using the specified properties. + * @function create + * @memberof atomic.LogRequest + * @static + * @param {atomic.LogRequest.$Properties=} [properties] Properties to set + * @returns {atomic.LogRequest} LogRequest instance + * @type {{ + * (properties: atomic.LogRequest.$Shape): atomic.LogRequest & atomic.LogRequest.$Shape; + * (properties?: atomic.LogRequest.$Properties): atomic.LogRequest; + * }} + */ + LogRequest.create = function(properties) { + return new LogRequest(properties); + }; + + /** + * Encodes the specified LogRequest message. Does not implicitly {@link atomic.LogRequest.verify|verify} messages. + * @function encode + * @memberof atomic.LogRequest + * @static + * @param {atomic.LogRequest.$Properties} message LogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.allViews != null && $Object.hasOwnProperty.call(message, "allViews") && message.allViews !== false) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allViews); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.view); + if (message.cursor != null && $Object.hasOwnProperty.call(message, "cursor")) + $root.atomic.PageCursor.encode(message.cursor, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.budget != null && $Object.hasOwnProperty.call(message, "budget")) + $root.atomic.PageBudget.encode(message.budget, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.pathFilter != null && message.pathFilter.length) + for (var i = 0; i < message.pathFilter.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pathFilter[i]); + if (message.tagsOnly != null && $Object.hasOwnProperty.call(message, "tagsOnly") && message.tagsOnly !== false) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.tagsOnly); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified LogRequest message, length delimited. Does not implicitly {@link atomic.LogRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.LogRequest + * @static + * @param {atomic.LogRequest.$Properties} message LogRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a LogRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.LogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.LogRequest & atomic.LogRequest.$Shape} LogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.LogRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.allViews = value; + else + delete message.allViews; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.view = reader.stringVerify(); + message._view = "view"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.cursor = $root.atomic.PageCursor.decode(reader, reader.size(), $undefined, _depth + 1, message.cursor); + message._cursor = "cursor"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.budget = $root.atomic.PageBudget.decode(reader, reader.size(), $undefined, _depth + 1, message.budget); + message._budget = "budget"; + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.pathFilter && message.pathFilter.length)) + message.pathFilter = []; + message.pathFilter.push(reader.stringVerify()); + continue; + } + case 7: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.tagsOnly = value; + else + delete message.tagsOnly; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a LogRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.LogRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.LogRequest & atomic.LogRequest.$Shape} LogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a LogRequest message. + * @function verify + * @memberof atomic.LogRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.allViews != null && $Object.hasOwnProperty.call(message, "allViews")) + if (typeof message.allViews !== "boolean") + return "allViews: boolean expected"; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + properties._view = 1; + if (!$util.isString(message.view)) + return "view: string expected"; + } + if (message.cursor != null && $Object.hasOwnProperty.call(message, "cursor")) { + properties._cursor = 1; + { + var error = $root.atomic.PageCursor.verify(message.cursor, _depth + 1); + if (error) + return "cursor." + error; + } + } + if (message.budget != null && $Object.hasOwnProperty.call(message, "budget")) { + properties._budget = 1; + { + var error = $root.atomic.PageBudget.verify(message.budget, _depth + 1); + if (error) + return "budget." + error; + } + } + if (message.pathFilter != null && $Object.hasOwnProperty.call(message, "pathFilter")) { + if (!$Array.isArray(message.pathFilter)) + return "pathFilter: array expected"; + for (var i = 0; i < message.pathFilter.length; ++i) + if (!$util.isString(message.pathFilter[i])) + return "pathFilter: string[] expected"; + } + if (message.tagsOnly != null && $Object.hasOwnProperty.call(message, "tagsOnly")) + if (typeof message.tagsOnly !== "boolean") + return "tagsOnly: boolean expected"; + return null; + }; + + /** + * Creates a LogRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.LogRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.LogRequest} LogRequest + */ + LogRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.LogRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.LogRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.LogRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.LogRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.allViews != null) + if (object.allViews) + message.allViews = $Boolean(object.allViews); + if (object.view != null) + message.view = $String(object.view); + if (object.cursor != null) { + if (!$util.isObject(object.cursor)) + throw $TypeError(".atomic.LogRequest.cursor: object expected"); + message.cursor = $root.atomic.PageCursor.fromObject(object.cursor, _depth + 1); + } + if (object.budget != null) { + if (!$util.isObject(object.budget)) + throw $TypeError(".atomic.LogRequest.budget: object expected"); + message.budget = $root.atomic.PageBudget.fromObject(object.budget, _depth + 1); + } + if (object.pathFilter) { + if (!$Array.isArray(object.pathFilter)) + throw $TypeError(".atomic.LogRequest.pathFilter: array expected"); + message.pathFilter = $Array(object.pathFilter.length); + for (var i = 0; i < object.pathFilter.length; ++i) + message.pathFilter[i] = $String(object.pathFilter[i]); + } + if (object.tagsOnly != null) + if (object.tagsOnly) + message.tagsOnly = $Boolean(object.tagsOnly); + return message; + }; + + /** + * Creates a plain object from a LogRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.LogRequest + * @static + * @param {atomic.LogRequest} message LogRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.pathFilter = []; + if (options.defaults) { + object.repository = null; + object.allViews = false; + object.tagsOnly = false; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.allViews != null && $Object.hasOwnProperty.call(message, "allViews")) + object.allViews = message.allViews; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + if (message.cursor != null && $Object.hasOwnProperty.call(message, "cursor")) + object.cursor = $root.atomic.PageCursor.toObject(message.cursor, options, _depth + 1); + if (message.budget != null && $Object.hasOwnProperty.call(message, "budget")) + object.budget = $root.atomic.PageBudget.toObject(message.budget, options, _depth + 1); + if (message.pathFilter && message.pathFilter.length) { + object.pathFilter = $Array(message.pathFilter.length); + for (var j = 0; j < message.pathFilter.length; ++j) + object.pathFilter[j] = message.pathFilter[j]; + } + if (message.tagsOnly != null && $Object.hasOwnProperty.call(message, "tagsOnly")) + object.tagsOnly = message.tagsOnly; + return object; + }; + + /** + * Converts this LogRequest to JSON. + * @function toJSON + * @memberof atomic.LogRequest + * @instance + * @returns {Object.} JSON object + */ + LogRequest.prototype.toJSON = function() { + return LogRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for LogRequest + * @function getTypeUrl + * @memberof atomic.LogRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + LogRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.LogRequest"; + }; + + return LogRequest; + })(); + + atomic.PageCursor = (function() { + + /** + * Properties of a PageCursor. + * @typedef {Object} atomic.PageCursor.$Properties + * @property {number|Long|null} [seq] PageCursor seq + * @property {number|Long|null} [offset] PageCursor offset + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PageCursor. + * @memberof atomic + * @interface IPageCursor + * @augments atomic.PageCursor.$Properties + * @deprecated Use atomic.PageCursor.$Properties instead. + */ + + /** + * Shape of a PageCursor. + * @typedef {atomic.PageCursor.$Properties} atomic.PageCursor.$Shape + */ + + /** + * Constructs a new PageCursor. + * @memberof atomic + * @classdesc Represents a PageCursor. + * @constructor + * @param {atomic.PageCursor.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PageCursor = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * PageCursor seq. + * @member {number|Long} seq + * @memberof atomic.PageCursor + * @instance + */ + PageCursor.prototype.seq = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PageCursor offset. + * @member {number|Long} offset + * @memberof atomic.PageCursor + * @instance + */ + PageCursor.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new PageCursor instance using the specified properties. + * @function create + * @memberof atomic.PageCursor + * @static + * @param {atomic.PageCursor.$Properties=} [properties] Properties to set + * @returns {atomic.PageCursor} PageCursor instance + * @type {{ + * (properties: atomic.PageCursor.$Shape): atomic.PageCursor & atomic.PageCursor.$Shape; + * (properties?: atomic.PageCursor.$Properties): atomic.PageCursor; + * }} + */ + PageCursor.create = function(properties) { + return new PageCursor(properties); + }; + + /** + * Encodes the specified PageCursor message. Does not implicitly {@link atomic.PageCursor.verify|verify} messages. + * @function encode + * @memberof atomic.PageCursor + * @static + * @param {atomic.PageCursor.$Properties} message PageCursor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageCursor.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.seq != null && $Object.hasOwnProperty.call(message, "seq") && (typeof message.seq === "object" ? message.seq.low || message.seq.high : message.seq !== 0)) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.seq); + if (message.offset != null && $Object.hasOwnProperty.call(message, "offset") && (typeof message.offset === "object" ? message.offset.low || message.offset.high : message.offset !== 0)) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.offset); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified PageCursor message, length delimited. Does not implicitly {@link atomic.PageCursor.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PageCursor + * @static + * @param {atomic.PageCursor.$Properties} message PageCursor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageCursor.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PageCursor message from the specified reader or buffer. + * @function decode + * @memberof atomic.PageCursor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PageCursor & atomic.PageCursor.$Shape} PageCursor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageCursor.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.PageCursor(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.seq = value; + else + delete message.seq; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.offset = value; + else + delete message.offset; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a PageCursor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PageCursor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PageCursor & atomic.PageCursor.$Shape} PageCursor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageCursor.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PageCursor message. + * @function verify + * @memberof atomic.PageCursor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageCursor.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.seq != null && $Object.hasOwnProperty.call(message, "seq")) + if (!$util.isInteger(message.seq) && !(message.seq && $util.isInteger(message.seq.low) && $util.isInteger(message.seq.high))) + return "seq: integer|Long expected"; + if (message.offset != null && $Object.hasOwnProperty.call(message, "offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + return null; + }; + + /** + * Creates a PageCursor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PageCursor + * @static + * @param {Object.} object Plain object + * @returns {atomic.PageCursor} PageCursor + */ + PageCursor.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PageCursor) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PageCursor: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PageCursor(); + if (object.seq != null) + if (typeof object.seq === "object" ? object.seq.low || object.seq.high : $Number(object.seq) !== 0) + if ($util.Long) + message.seq = $util.Long.fromValue(object.seq, true); + else if (typeof object.seq === "string") + message.seq = $parseInt(object.seq, 10); + else if (typeof object.seq === "number") + message.seq = object.seq; + else if (typeof object.seq === "object") + message.seq = new $util.LongBits(object.seq.low >>> 0, object.seq.high >>> 0).toNumber(true); + if (object.offset != null) + if (typeof object.offset === "object" ? object.offset.low || object.offset.high : $Number(object.offset) !== 0) + if ($util.Long) + message.offset = $util.Long.fromValue(object.offset, true); + else if (typeof object.offset === "string") + message.offset = $parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a PageCursor message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PageCursor + * @static + * @param {atomic.PageCursor} message PageCursor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageCursor.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.seq = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.seq = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.offset = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.offset = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + if (message.seq != null && $Object.hasOwnProperty.call(message, "seq")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.seq = typeof message.seq === "number" ? $BigInt(message.seq) : $util.Long.fromBits(message.seq.low >>> 0, message.seq.high >>> 0, true).toBigInt(); + else if (typeof message.seq === "number") + object.seq = options.longs === $String ? $String(message.seq) : message.seq; + else + object.seq = options.longs === $String ? $util.Long.prototype.toString.call(message.seq) : options.longs === $Number ? new $util.LongBits(message.seq.low >>> 0, message.seq.high >>> 0).toNumber(true) : message.seq; + if (message.offset != null && $Object.hasOwnProperty.call(message, "offset")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.offset = typeof message.offset === "number" ? $BigInt(message.offset) : $util.Long.fromBits(message.offset.low >>> 0, message.offset.high >>> 0, true).toBigInt(); + else if (typeof message.offset === "number") + object.offset = options.longs === $String ? $String(message.offset) : message.offset; + else + object.offset = options.longs === $String ? $util.Long.prototype.toString.call(message.offset) : options.longs === $Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber(true) : message.offset; + return object; + }; + + /** + * Converts this PageCursor to JSON. + * @function toJSON + * @memberof atomic.PageCursor + * @instance + * @returns {Object.} JSON object + */ + PageCursor.prototype.toJSON = function() { + return PageCursor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PageCursor + * @function getTypeUrl + * @memberof atomic.PageCursor + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PageCursor.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PageCursor"; + }; + + return PageCursor; + })(); + + atomic.PageBudget = (function() { + + /** + * Properties of a PageBudget. + * @typedef {Object} atomic.PageBudget.$Properties + * @property {number|null} [maxItems] PageBudget maxItems + * @property {number|null} [maxBytes] PageBudget maxBytes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PageBudget. + * @memberof atomic + * @interface IPageBudget + * @augments atomic.PageBudget.$Properties + * @deprecated Use atomic.PageBudget.$Properties instead. + */ + + /** + * Shape of a PageBudget. + * @typedef {atomic.PageBudget.$Properties} atomic.PageBudget.$Shape + */ + + /** + * Constructs a new PageBudget. + * @memberof atomic + * @classdesc Represents a PageBudget. + * @constructor + * @param {atomic.PageBudget.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PageBudget = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * PageBudget maxItems. + * @member {number|null|undefined} maxItems + * @memberof atomic.PageBudget + * @instance + */ + PageBudget.prototype.maxItems = null; + + /** + * PageBudget maxBytes. + * @member {number|null|undefined} maxBytes + * @memberof atomic.PageBudget + * @instance + */ + PageBudget.prototype.maxBytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PageBudget.prototype, "_max_items", { + get: $util.oneOfGetter($oneOfFields = ["maxItems"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PageBudget.prototype, "_max_bytes", { + get: $util.oneOfGetter($oneOfFields = ["maxBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PageBudget instance using the specified properties. + * @function create + * @memberof atomic.PageBudget + * @static + * @param {atomic.PageBudget.$Properties=} [properties] Properties to set + * @returns {atomic.PageBudget} PageBudget instance + * @type {{ + * (properties: atomic.PageBudget.$Shape): atomic.PageBudget & atomic.PageBudget.$Shape; + * (properties?: atomic.PageBudget.$Properties): atomic.PageBudget; + * }} + */ + PageBudget.create = function(properties) { + return new PageBudget(properties); + }; + + /** + * Encodes the specified PageBudget message. Does not implicitly {@link atomic.PageBudget.verify|verify} messages. + * @function encode + * @memberof atomic.PageBudget + * @static + * @param {atomic.PageBudget.$Properties} message PageBudget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageBudget.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.maxItems != null && $Object.hasOwnProperty.call(message, "maxItems")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.maxItems); + if (message.maxBytes != null && $Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maxBytes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified PageBudget message, length delimited. Does not implicitly {@link atomic.PageBudget.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PageBudget + * @static + * @param {atomic.PageBudget.$Properties} message PageBudget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageBudget.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PageBudget message from the specified reader or buffer. + * @function decode + * @memberof atomic.PageBudget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PageBudget & atomic.PageBudget.$Shape} PageBudget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageBudget.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.PageBudget(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + message.maxItems = reader.uint32(); + message._max_items = "maxItems"; + continue; + } + case 2: { + if (wireType !== 0) + break; + message.maxBytes = reader.uint32(); + message._max_bytes = "maxBytes"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a PageBudget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PageBudget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PageBudget & atomic.PageBudget.$Shape} PageBudget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageBudget.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PageBudget message. + * @function verify + * @memberof atomic.PageBudget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageBudget.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.maxItems != null && $Object.hasOwnProperty.call(message, "maxItems")) { + properties._max_items = 1; + if (!$util.isInteger(message.maxItems)) + return "maxItems: integer expected"; + } + if (message.maxBytes != null && $Object.hasOwnProperty.call(message, "maxBytes")) { + properties._max_bytes = 1; + if (!$util.isInteger(message.maxBytes)) + return "maxBytes: integer expected"; + } + return null; + }; + + /** + * Creates a PageBudget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PageBudget + * @static + * @param {Object.} object Plain object + * @returns {atomic.PageBudget} PageBudget + */ + PageBudget.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PageBudget) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PageBudget: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PageBudget(); + if (object.maxItems != null) + message.maxItems = object.maxItems >>> 0; + if (object.maxBytes != null) + message.maxBytes = object.maxBytes >>> 0; + return message; + }; + + /** + * Creates a plain object from a PageBudget message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PageBudget + * @static + * @param {atomic.PageBudget} message PageBudget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageBudget.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (message.maxItems != null && $Object.hasOwnProperty.call(message, "maxItems")) + object.maxItems = message.maxItems; + if (message.maxBytes != null && $Object.hasOwnProperty.call(message, "maxBytes")) + object.maxBytes = message.maxBytes; + return object; + }; + + /** + * Converts this PageBudget to JSON. + * @function toJSON + * @memberof atomic.PageBudget + * @instance + * @returns {Object.} JSON object + */ + PageBudget.prototype.toJSON = function() { + return PageBudget.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PageBudget + * @function getTypeUrl + * @memberof atomic.PageBudget + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PageBudget.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PageBudget"; + }; + + return PageBudget; + })(); + + atomic.LogResponse = (function() { + + /** + * Properties of a LogResponse. + * @typedef {Object} atomic.LogResponse.$Properties + * @property {Array.|null} [entries] LogResponse entries + * @property {atomic.PageCursor.$Properties|null} [nextCursor] LogResponse nextCursor + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a LogResponse. + * @memberof atomic + * @interface ILogResponse + * @augments atomic.LogResponse.$Properties + * @deprecated Use atomic.LogResponse.$Properties instead. + */ + + /** + * Shape of a LogResponse. + * @typedef {atomic.LogResponse.$Properties} atomic.LogResponse.$Shape + */ + + /** + * Constructs a new LogResponse. + * @memberof atomic + * @classdesc Represents a LogResponse. + * @constructor + * @param {atomic.LogResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var LogResponse = function (properties) { + this.entries = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * LogResponse entries. + * @member {Array.} entries + * @memberof atomic.LogResponse + * @instance + */ + LogResponse.prototype.entries = $util.emptyArray; + + /** + * LogResponse nextCursor. + * @member {atomic.PageCursor.$Properties|null|undefined} nextCursor + * @memberof atomic.LogResponse + * @instance + */ + LogResponse.prototype.nextCursor = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(LogResponse.prototype, "_next_cursor", { + get: $util.oneOfGetter($oneOfFields = ["nextCursor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LogResponse instance using the specified properties. + * @function create + * @memberof atomic.LogResponse + * @static + * @param {atomic.LogResponse.$Properties=} [properties] Properties to set + * @returns {atomic.LogResponse} LogResponse instance + * @type {{ + * (properties: atomic.LogResponse.$Shape): atomic.LogResponse & atomic.LogResponse.$Shape; + * (properties?: atomic.LogResponse.$Properties): atomic.LogResponse; + * }} + */ + LogResponse.create = function(properties) { + return new LogResponse(properties); + }; + + /** + * Encodes the specified LogResponse message. Does not implicitly {@link atomic.LogResponse.verify|verify} messages. + * @function encode + * @memberof atomic.LogResponse + * @static + * @param {atomic.LogResponse.$Properties} message LogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.atomic.ChangeLogEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.nextCursor != null && $Object.hasOwnProperty.call(message, "nextCursor")) + $root.atomic.PageCursor.encode(message.nextCursor, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified LogResponse message, length delimited. Does not implicitly {@link atomic.LogResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.LogResponse + * @static + * @param {atomic.LogResponse.$Properties} message LogResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LogResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a LogResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.LogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.LogResponse & atomic.LogResponse.$Shape} LogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.LogResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.atomic.ChangeLogEntry.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.nextCursor = $root.atomic.PageCursor.decode(reader, reader.size(), $undefined, _depth + 1, message.nextCursor); + message._next_cursor = "nextCursor"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a LogResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.LogResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.LogResponse & atomic.LogResponse.$Shape} LogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LogResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a LogResponse message. + * @function verify + * @memberof atomic.LogResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LogResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.atomic.ChangeLogEntry.verify(message.entries[i], _depth + 1); + if (error) + return "entries." + error; + } + } + if (message.nextCursor != null && $Object.hasOwnProperty.call(message, "nextCursor")) { + properties._next_cursor = 1; + { + var error = $root.atomic.PageCursor.verify(message.nextCursor, _depth + 1); + if (error) + return "nextCursor." + error; + } + } + return null; + }; + + /** + * Creates a LogResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.LogResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.LogResponse} LogResponse + */ + LogResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.LogResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.LogResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.LogResponse(); + if (object.entries) { + if (!$Array.isArray(object.entries)) + throw $TypeError(".atomic.LogResponse.entries: array expected"); + message.entries = $Array(object.entries.length); + for (var i = 0; i < object.entries.length; ++i) { + if (!$util.isObject(object.entries[i])) + throw $TypeError(".atomic.LogResponse.entries: object expected"); + message.entries[i] = $root.atomic.ChangeLogEntry.fromObject(object.entries[i], _depth + 1); + } + } + if (object.nextCursor != null) { + if (!$util.isObject(object.nextCursor)) + throw $TypeError(".atomic.LogResponse.nextCursor: object expected"); + message.nextCursor = $root.atomic.PageCursor.fromObject(object.nextCursor, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a LogResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.LogResponse + * @static + * @param {atomic.LogResponse} message LogResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LogResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (message.entries && message.entries.length) { + object.entries = $Array(message.entries.length); + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.atomic.ChangeLogEntry.toObject(message.entries[j], options, _depth + 1); + } + if (message.nextCursor != null && $Object.hasOwnProperty.call(message, "nextCursor")) + object.nextCursor = $root.atomic.PageCursor.toObject(message.nextCursor, options, _depth + 1); + return object; + }; + + /** + * Converts this LogResponse to JSON. + * @function toJSON + * @memberof atomic.LogResponse + * @instance + * @returns {Object.} JSON object + */ + LogResponse.prototype.toJSON = function() { + return LogResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for LogResponse + * @function getTypeUrl + * @memberof atomic.LogResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + LogResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.LogResponse"; + }; + + return LogResponse; + })(); + + atomic.ChangeLogEntry = (function() { + + /** + * Properties of a ChangeLogEntry. + * @typedef {Object} atomic.ChangeLogEntry.$Properties + * @property {atomic.Hash.$Properties|null} [hash] ChangeLogEntry hash + * @property {number|Long|null} [sequence] ChangeLogEntry sequence + * @property {atomic.Hash.$Properties|null} [state] ChangeLogEntry state + * @property {string|null} [message] ChangeLogEntry message + * @property {string|null} [description] ChangeLogEntry description + * @property {Array.|null} [authors] ChangeLogEntry authors + * @property {google.protobuf.Timestamp.$Properties|null} [recordedAt] ChangeLogEntry recordedAt + * @property {Array.|null} [dependencies] ChangeLogEntry dependencies + * @property {string|null} [view] ChangeLogEntry view + * @property {boolean|null} [isTagged] ChangeLogEntry isTagged + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeLogEntry. + * @memberof atomic + * @interface IChangeLogEntry + * @augments atomic.ChangeLogEntry.$Properties + * @deprecated Use atomic.ChangeLogEntry.$Properties instead. + */ + + /** + * Shape of a ChangeLogEntry. + * @typedef {atomic.ChangeLogEntry.$Properties} atomic.ChangeLogEntry.$Shape + */ + + /** + * Constructs a new ChangeLogEntry. + * @memberof atomic + * @classdesc Represents a ChangeLogEntry. + * @constructor + * @param {atomic.ChangeLogEntry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeLogEntry = function (properties) { + this.authors = []; + this.dependencies = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeLogEntry hash. + * @member {atomic.Hash.$Properties|null|undefined} hash + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.hash = null; + + /** + * ChangeLogEntry sequence. + * @member {number|Long} sequence + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeLogEntry state. + * @member {atomic.Hash.$Properties|null|undefined} state + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.state = null; + + /** + * ChangeLogEntry message. + * @member {string|null|undefined} message + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.message = null; + + /** + * ChangeLogEntry description. + * @member {string|null|undefined} description + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.description = null; + + /** + * ChangeLogEntry authors. + * @member {Array.} authors + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.authors = $util.emptyArray; + + /** + * ChangeLogEntry recordedAt. + * @member {google.protobuf.Timestamp.$Properties|null|undefined} recordedAt + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.recordedAt = null; + + /** + * ChangeLogEntry dependencies. + * @member {Array.} dependencies + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.dependencies = $util.emptyArray; + + /** + * ChangeLogEntry view. + * @member {string|null|undefined} view + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.view = null; + + /** + * ChangeLogEntry isTagged. + * @member {boolean} isTagged + * @memberof atomic.ChangeLogEntry + * @instance + */ + ChangeLogEntry.prototype.isTagged = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeLogEntry.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeLogEntry.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeLogEntry.prototype, "_recorded_at", { + get: $util.oneOfGetter($oneOfFields = ["recordedAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeLogEntry.prototype, "_view", { + get: $util.oneOfGetter($oneOfFields = ["view"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeLogEntry instance using the specified properties. + * @function create + * @memberof atomic.ChangeLogEntry + * @static + * @param {atomic.ChangeLogEntry.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeLogEntry} ChangeLogEntry instance + * @type {{ + * (properties: atomic.ChangeLogEntry.$Shape): atomic.ChangeLogEntry & atomic.ChangeLogEntry.$Shape; + * (properties?: atomic.ChangeLogEntry.$Properties): atomic.ChangeLogEntry; + * }} + */ + ChangeLogEntry.create = function(properties) { + return new ChangeLogEntry(properties); + }; + + /** + * Encodes the specified ChangeLogEntry message. Does not implicitly {@link atomic.ChangeLogEntry.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeLogEntry + * @static + * @param {atomic.ChangeLogEntry.$Properties} message ChangeLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeLogEntry.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) + $root.atomic.Hash.encode(message.hash, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence") && (typeof message.sequence === "object" ? message.sequence.low || message.sequence.high : message.sequence !== 0)) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.sequence); + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) + $root.atomic.Hash.encode(message.state, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.message); + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.authors != null && message.authors.length) + for (var i = 0; i < message.authors.length; ++i) + $root.atomic.Author.encode(message.authors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.recordedAt != null && $Object.hasOwnProperty.call(message, "recordedAt")) + $root.google.protobuf.Timestamp.encode(message.recordedAt, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.dependencies != null && message.dependencies.length) + for (var i = 0; i < message.dependencies.length; ++i) + $root.atomic.Hash.encode(message.dependencies[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.view); + if (message.isTagged != null && $Object.hasOwnProperty.call(message, "isTagged") && message.isTagged !== false) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isTagged); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeLogEntry message, length delimited. Does not implicitly {@link atomic.ChangeLogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeLogEntry + * @static + * @param {atomic.ChangeLogEntry.$Properties} message ChangeLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeLogEntry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeLogEntry message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeLogEntry & atomic.ChangeLogEntry.$Shape} ChangeLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeLogEntry.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeLogEntry(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.hash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.hash); + continue; + } + case 2: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.sequence = value; + else + delete message.sequence; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.state = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.state); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.message = reader.stringVerify(); + message._message = "message"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.description = reader.stringVerify(); + message._description = "description"; + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.authors && message.authors.length)) + message.authors = []; + message.authors.push($root.atomic.Author.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + message.recordedAt = $root.google.protobuf.Timestamp.decode(reader, reader.size(), $undefined, _depth + 1, message.recordedAt); + message._recorded_at = "recordedAt"; + continue; + } + case 8: { + if (wireType !== 2) + break; + if (!(message.dependencies && message.dependencies.length)) + message.dependencies = []; + message.dependencies.push($root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.view = reader.stringVerify(); + message._view = "view"; + continue; + } + case 10: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.isTagged = value; + else + delete message.isTagged; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeLogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeLogEntry & atomic.ChangeLogEntry.$Shape} ChangeLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeLogEntry.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeLogEntry message. + * @function verify + * @memberof atomic.ChangeLogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeLogEntry.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) { + var error = $root.atomic.Hash.verify(message.hash, _depth + 1); + if (error) + return "hash." + error; + } + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) { + var error = $root.atomic.Hash.verify(message.state, _depth + 1); + if (error) + return "state." + error; + } + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) { + properties._message = 1; + if (!$util.isString(message.message)) + return "message: string expected"; + } + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.authors != null && $Object.hasOwnProperty.call(message, "authors")) { + if (!$Array.isArray(message.authors)) + return "authors: array expected"; + for (var i = 0; i < message.authors.length; ++i) { + var error = $root.atomic.Author.verify(message.authors[i], _depth + 1); + if (error) + return "authors." + error; + } + } + if (message.recordedAt != null && $Object.hasOwnProperty.call(message, "recordedAt")) { + properties._recorded_at = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recordedAt, _depth + 1); + if (error) + return "recordedAt." + error; + } + } + if (message.dependencies != null && $Object.hasOwnProperty.call(message, "dependencies")) { + if (!$Array.isArray(message.dependencies)) + return "dependencies: array expected"; + for (var i = 0; i < message.dependencies.length; ++i) { + var error = $root.atomic.Hash.verify(message.dependencies[i], _depth + 1); + if (error) + return "dependencies." + error; + } + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + properties._view = 1; + if (!$util.isString(message.view)) + return "view: string expected"; + } + if (message.isTagged != null && $Object.hasOwnProperty.call(message, "isTagged")) + if (typeof message.isTagged !== "boolean") + return "isTagged: boolean expected"; + return null; + }; + + /** + * Creates a ChangeLogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeLogEntry + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeLogEntry} ChangeLogEntry + */ + ChangeLogEntry.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeLogEntry) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeLogEntry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeLogEntry(); + if (object.hash != null) { + if (!$util.isObject(object.hash)) + throw $TypeError(".atomic.ChangeLogEntry.hash: object expected"); + message.hash = $root.atomic.Hash.fromObject(object.hash, _depth + 1); + } + if (object.sequence != null) + if (typeof object.sequence === "object" ? object.sequence.low || object.sequence.high : $Number(object.sequence) !== 0) + if ($util.Long) + message.sequence = $util.Long.fromValue(object.sequence, true); + else if (typeof object.sequence === "string") + message.sequence = $parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + if (object.state != null) { + if (!$util.isObject(object.state)) + throw $TypeError(".atomic.ChangeLogEntry.state: object expected"); + message.state = $root.atomic.Hash.fromObject(object.state, _depth + 1); + } + if (object.message != null) + message.message = $String(object.message); + if (object.description != null) + message.description = $String(object.description); + if (object.authors) { + if (!$Array.isArray(object.authors)) + throw $TypeError(".atomic.ChangeLogEntry.authors: array expected"); + message.authors = $Array(object.authors.length); + for (var i = 0; i < object.authors.length; ++i) { + if (!$util.isObject(object.authors[i])) + throw $TypeError(".atomic.ChangeLogEntry.authors: object expected"); + message.authors[i] = $root.atomic.Author.fromObject(object.authors[i], _depth + 1); + } + } + if (object.recordedAt != null) { + if (!$util.isObject(object.recordedAt)) + throw $TypeError(".atomic.ChangeLogEntry.recordedAt: object expected"); + message.recordedAt = $root.google.protobuf.Timestamp.fromObject(object.recordedAt, _depth + 1); + } + if (object.dependencies) { + if (!$Array.isArray(object.dependencies)) + throw $TypeError(".atomic.ChangeLogEntry.dependencies: array expected"); + message.dependencies = $Array(object.dependencies.length); + for (var i = 0; i < object.dependencies.length; ++i) { + if (!$util.isObject(object.dependencies[i])) + throw $TypeError(".atomic.ChangeLogEntry.dependencies: object expected"); + message.dependencies[i] = $root.atomic.Hash.fromObject(object.dependencies[i], _depth + 1); + } + } + if (object.view != null) + message.view = $String(object.view); + if (object.isTagged != null) + if (object.isTagged) + message.isTagged = $Boolean(object.isTagged); + return message; + }; + + /** + * Creates a plain object from a ChangeLogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeLogEntry + * @static + * @param {atomic.ChangeLogEntry} message ChangeLogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeLogEntry.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.authors = []; + object.dependencies = []; + } + if (options.defaults) { + object.hash = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.sequence = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.sequence = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.state = null; + object.isTagged = false; + } + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) + object.hash = $root.atomic.Hash.toObject(message.hash, options, _depth + 1); + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sequence = typeof message.sequence === "number" ? $BigInt(message.sequence) : $util.Long.fromBits(message.sequence.low >>> 0, message.sequence.high >>> 0, true).toBigInt(); + else if (typeof message.sequence === "number") + object.sequence = options.longs === $String ? $String(message.sequence) : message.sequence; + else + object.sequence = options.longs === $String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === $Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) + object.state = $root.atomic.Hash.toObject(message.state, options, _depth + 1); + if (message.message != null && $Object.hasOwnProperty.call(message, "message")) + object.message = message.message; + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + if (message.authors && message.authors.length) { + object.authors = $Array(message.authors.length); + for (var j = 0; j < message.authors.length; ++j) + object.authors[j] = $root.atomic.Author.toObject(message.authors[j], options, _depth + 1); + } + if (message.recordedAt != null && $Object.hasOwnProperty.call(message, "recordedAt")) + object.recordedAt = $root.google.protobuf.Timestamp.toObject(message.recordedAt, options, _depth + 1); + if (message.dependencies && message.dependencies.length) { + object.dependencies = $Array(message.dependencies.length); + for (var j = 0; j < message.dependencies.length; ++j) + object.dependencies[j] = $root.atomic.Hash.toObject(message.dependencies[j], options, _depth + 1); + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + if (message.isTagged != null && $Object.hasOwnProperty.call(message, "isTagged")) + object.isTagged = message.isTagged; + return object; + }; + + /** + * Converts this ChangeLogEntry to JSON. + * @function toJSON + * @memberof atomic.ChangeLogEntry + * @instance + * @returns {Object.} JSON object + */ + ChangeLogEntry.prototype.toJSON = function() { + return ChangeLogEntry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeLogEntry + * @function getTypeUrl + * @memberof atomic.ChangeLogEntry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeLogEntry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeLogEntry"; + }; + + return ChangeLogEntry; + })(); + + atomic.GetChangeRequest = (function() { + + /** + * Properties of a GetChangeRequest. + * @typedef {Object} atomic.GetChangeRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] GetChangeRequest repository + * @property {atomic.ChangeRef.$Properties|null} [ref] GetChangeRequest ref + * @property {atomic.ChangeIncludes.$Properties|null} [includes] GetChangeRequest includes + * @property {atomic.ViewRef.$Properties|null} [view] GetChangeRequest view + * @property {boolean|null} [includeFileContents] GetChangeRequest includeFileContents + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetChangeRequest. + * @memberof atomic + * @interface IGetChangeRequest + * @augments atomic.GetChangeRequest.$Properties + * @deprecated Use atomic.GetChangeRequest.$Properties instead. + */ + + /** + * Shape of a GetChangeRequest. + * @typedef {{ + * repository?: atomic.RepositoryRef.$Shape|null; + * ref?: atomic.ChangeRef.$Shape|null; + * includes?: atomic.ChangeIncludes.$Shape|null; + * view?: atomic.ViewRef.$Shape|null; + * includeFileContents?: boolean|null; + * $unknowns?: Array.; + * }} atomic.GetChangeRequest.$Shape + */ + + /** + * Constructs a new GetChangeRequest. + * @memberof atomic + * @classdesc Represents a GetChangeRequest. + * @constructor + * @param {atomic.GetChangeRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetChangeRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetChangeRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.GetChangeRequest + * @instance + */ + GetChangeRequest.prototype.repository = null; + + /** + * GetChangeRequest ref. + * @member {atomic.ChangeRef.$Properties|null|undefined} ref + * @memberof atomic.GetChangeRequest + * @instance + */ + GetChangeRequest.prototype.ref = null; + + /** + * GetChangeRequest includes. + * @member {atomic.ChangeIncludes.$Properties|null|undefined} includes + * @memberof atomic.GetChangeRequest + * @instance + */ + GetChangeRequest.prototype.includes = null; + + /** + * GetChangeRequest view. + * @member {atomic.ViewRef.$Properties|null|undefined} view + * @memberof atomic.GetChangeRequest + * @instance + */ + GetChangeRequest.prototype.view = null; + + /** + * GetChangeRequest includeFileContents. + * @member {boolean} includeFileContents + * @memberof atomic.GetChangeRequest + * @instance + */ + GetChangeRequest.prototype.includeFileContents = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetChangeRequest.prototype, "_view", { + get: $util.oneOfGetter($oneOfFields = ["view"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetChangeRequest instance using the specified properties. + * @function create + * @memberof atomic.GetChangeRequest + * @static + * @param {atomic.GetChangeRequest.$Properties=} [properties] Properties to set + * @returns {atomic.GetChangeRequest} GetChangeRequest instance + * @type {{ + * (properties: atomic.GetChangeRequest.$Shape): atomic.GetChangeRequest & atomic.GetChangeRequest.$Shape; + * (properties?: atomic.GetChangeRequest.$Properties): atomic.GetChangeRequest; + * }} + */ + GetChangeRequest.create = function(properties) { + return new GetChangeRequest(properties); + }; + + /** + * Encodes the specified GetChangeRequest message. Does not implicitly {@link atomic.GetChangeRequest.verify|verify} messages. + * @function encode + * @memberof atomic.GetChangeRequest + * @static + * @param {atomic.GetChangeRequest.$Properties} message GetChangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChangeRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.ref != null && $Object.hasOwnProperty.call(message, "ref")) + $root.atomic.ChangeRef.encode(message.ref, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.includes != null && $Object.hasOwnProperty.call(message, "includes")) + $root.atomic.ChangeIncludes.encode(message.includes, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + $root.atomic.ViewRef.encode(message.view, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.includeFileContents != null && $Object.hasOwnProperty.call(message, "includeFileContents") && message.includeFileContents !== false) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.includeFileContents); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetChangeRequest message, length delimited. Does not implicitly {@link atomic.GetChangeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetChangeRequest + * @static + * @param {atomic.GetChangeRequest.$Properties} message GetChangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChangeRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetChangeRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetChangeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetChangeRequest & atomic.GetChangeRequest.$Shape} GetChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChangeRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetChangeRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.ref = $root.atomic.ChangeRef.decode(reader, reader.size(), $undefined, _depth + 1, message.ref); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.includes = $root.atomic.ChangeIncludes.decode(reader, reader.size(), $undefined, _depth + 1, message.includes); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + message._view = "view"; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.includeFileContents = value; + else + delete message.includeFileContents; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetChangeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetChangeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetChangeRequest & atomic.GetChangeRequest.$Shape} GetChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChangeRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetChangeRequest message. + * @function verify + * @memberof atomic.GetChangeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetChangeRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.ref != null && $Object.hasOwnProperty.call(message, "ref")) { + var error = $root.atomic.ChangeRef.verify(message.ref, _depth + 1); + if (error) + return "ref." + error; + } + if (message.includes != null && $Object.hasOwnProperty.call(message, "includes")) { + var error = $root.atomic.ChangeIncludes.verify(message.includes, _depth + 1); + if (error) + return "includes." + error; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + properties._view = 1; + { + var error = $root.atomic.ViewRef.verify(message.view, _depth + 1); + if (error) + return "view." + error; + } + } + if (message.includeFileContents != null && $Object.hasOwnProperty.call(message, "includeFileContents")) + if (typeof message.includeFileContents !== "boolean") + return "includeFileContents: boolean expected"; + return null; + }; + + /** + * Creates a GetChangeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetChangeRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetChangeRequest} GetChangeRequest + */ + GetChangeRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetChangeRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetChangeRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetChangeRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.GetChangeRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.ref != null) { + if (!$util.isObject(object.ref)) + throw $TypeError(".atomic.GetChangeRequest.ref: object expected"); + message.ref = $root.atomic.ChangeRef.fromObject(object.ref, _depth + 1); + } + if (object.includes != null) { + if (!$util.isObject(object.includes)) + throw $TypeError(".atomic.GetChangeRequest.includes: object expected"); + message.includes = $root.atomic.ChangeIncludes.fromObject(object.includes, _depth + 1); + } + if (object.view != null) { + if (!$util.isObject(object.view)) + throw $TypeError(".atomic.GetChangeRequest.view: object expected"); + message.view = $root.atomic.ViewRef.fromObject(object.view, _depth + 1); + } + if (object.includeFileContents != null) + if (object.includeFileContents) + message.includeFileContents = $Boolean(object.includeFileContents); + return message; + }; + + /** + * Creates a plain object from a GetChangeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetChangeRequest + * @static + * @param {atomic.GetChangeRequest} message GetChangeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetChangeRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.ref = null; + object.includes = null; + object.includeFileContents = false; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.ref != null && $Object.hasOwnProperty.call(message, "ref")) + object.ref = $root.atomic.ChangeRef.toObject(message.ref, options, _depth + 1); + if (message.includes != null && $Object.hasOwnProperty.call(message, "includes")) + object.includes = $root.atomic.ChangeIncludes.toObject(message.includes, options, _depth + 1); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = $root.atomic.ViewRef.toObject(message.view, options, _depth + 1); + if (message.includeFileContents != null && $Object.hasOwnProperty.call(message, "includeFileContents")) + object.includeFileContents = message.includeFileContents; + return object; + }; + + /** + * Converts this GetChangeRequest to JSON. + * @function toJSON + * @memberof atomic.GetChangeRequest + * @instance + * @returns {Object.} JSON object + */ + GetChangeRequest.prototype.toJSON = function() { + return GetChangeRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetChangeRequest + * @function getTypeUrl + * @memberof atomic.GetChangeRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetChangeRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetChangeRequest"; + }; + + return GetChangeRequest; + })(); + + atomic.ChangeRef = (function() { + + /** + * Properties of a ChangeRef. + * @typedef {Object} atomic.ChangeRef.$Properties + * @property {atomic.Hash.$Properties|null} [hash] ChangeRef hash + * @property {number|Long|null} [sequence] ChangeRef sequence + * @property {string|null} [prefix] ChangeRef prefix + * @property {"hash"|"sequence"|"prefix"} [kind] ChangeRef kind + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeRef. + * @memberof atomic + * @interface IChangeRef + * @augments atomic.ChangeRef.$Properties + * @deprecated Use atomic.ChangeRef.$Properties instead. + */ + + /** + * Narrowed shape of a ChangeRef. + * @typedef {{ + * hash?: atomic.Hash.$Shape|null; + * sequence?: number|Long|null; + * prefix?: string|null; + * $unknowns?: Array.; + * } & ( + * ({ kind?: undefined; hash?: null; sequence?: null; prefix?: null }|{ kind?: "hash"; hash: atomic.Hash.$Shape; sequence?: null; prefix?: null }|{ kind?: "sequence"; hash?: null; sequence: number|Long; prefix?: null }|{ kind?: "prefix"; hash?: null; sequence?: null; prefix: string }) + * )} atomic.ChangeRef.$Shape + */ + + /** + * Constructs a new ChangeRef. + * @memberof atomic + * @classdesc Represents a ChangeRef. + * @constructor + * @param {atomic.ChangeRef.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeRef = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeRef hash. + * @member {atomic.Hash.$Properties|null|undefined} hash + * @memberof atomic.ChangeRef + * @instance + */ + ChangeRef.prototype.hash = null; + + /** + * ChangeRef sequence. + * @member {number|Long|null|undefined} sequence + * @memberof atomic.ChangeRef + * @instance + */ + ChangeRef.prototype.sequence = null; + + /** + * ChangeRef prefix. + * @member {string|null|undefined} prefix + * @memberof atomic.ChangeRef + * @instance + */ + ChangeRef.prototype.prefix = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChangeRef kind. + * @member {"hash"|"sequence"|"prefix"|undefined} kind + * @memberof atomic.ChangeRef + * @instance + */ + $Object.defineProperty(ChangeRef.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["hash", "sequence", "prefix"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeRef instance using the specified properties. + * @function create + * @memberof atomic.ChangeRef + * @static + * @param {atomic.ChangeRef.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeRef} ChangeRef instance + * @type {{ + * (properties: atomic.ChangeRef.$Shape): atomic.ChangeRef & atomic.ChangeRef.$Shape; + * (properties?: atomic.ChangeRef.$Properties): atomic.ChangeRef; + * }} + */ + ChangeRef.create = function(properties) { + return new ChangeRef(properties); + }; + + /** + * Encodes the specified ChangeRef message. Does not implicitly {@link atomic.ChangeRef.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeRef + * @static + * @param {atomic.ChangeRef.$Properties} message ChangeRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeRef.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) + $root.atomic.Hash.encode(message.hash, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.sequence); + if (message.prefix != null && $Object.hasOwnProperty.call(message, "prefix")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.prefix); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeRef message, length delimited. Does not implicitly {@link atomic.ChangeRef.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeRef + * @static + * @param {atomic.ChangeRef.$Properties} message ChangeRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeRef.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeRef message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeRef & atomic.ChangeRef.$Shape} ChangeRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeRef.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeRef(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.hash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.hash); + message.kind = "hash"; + continue; + } + case 2: { + if (wireType !== 0) + break; + message.sequence = reader.uint64(); + message.kind = "sequence"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.prefix = reader.stringVerify(); + message.kind = "prefix"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeRef message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeRef & atomic.ChangeRef.$Shape} ChangeRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeRef.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeRef message. + * @function verify + * @memberof atomic.ChangeRef + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeRef.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) { + properties.kind = 1; + { + var error = $root.atomic.Hash.verify(message.hash, _depth + 1); + if (error) + return "hash." + error; + } + } + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + } + if (message.prefix != null && $Object.hasOwnProperty.call(message, "prefix")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.prefix)) + return "prefix: string expected"; + } + return null; + }; + + /** + * Creates a ChangeRef message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeRef + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeRef} ChangeRef + */ + ChangeRef.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeRef) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeRef: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeRef(); + if (object.hash != null) { + if (!$util.isObject(object.hash)) + throw $TypeError(".atomic.ChangeRef.hash: object expected"); + message.hash = $root.atomic.Hash.fromObject(object.hash, _depth + 1); + } + if (object.sequence != null) + if ($util.Long) + message.sequence = $util.Long.fromValue(object.sequence, true); + else if (typeof object.sequence === "string") + message.sequence = $parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + if (object.prefix != null) + message.prefix = $String(object.prefix); + return message; + }; + + /** + * Creates a plain object from a ChangeRef message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeRef + * @static + * @param {atomic.ChangeRef} message ChangeRef + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeRef.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) { + object.hash = $root.atomic.Hash.toObject(message.hash, options, _depth + 1); + if (options.oneofs) + object.kind = "hash"; + } + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) { + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sequence = typeof message.sequence === "number" ? $BigInt(message.sequence) : $util.Long.fromBits(message.sequence.low >>> 0, message.sequence.high >>> 0, true).toBigInt(); + else if (typeof message.sequence === "number") + object.sequence = options.longs === $String ? $String(message.sequence) : message.sequence; + else + object.sequence = options.longs === $String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === $Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + if (options.oneofs) + object.kind = "sequence"; + } + if (message.prefix != null && $Object.hasOwnProperty.call(message, "prefix")) { + object.prefix = message.prefix; + if (options.oneofs) + object.kind = "prefix"; + } + return object; + }; + + /** + * Converts this ChangeRef to JSON. + * @function toJSON + * @memberof atomic.ChangeRef + * @instance + * @returns {Object.} JSON object + */ + ChangeRef.prototype.toJSON = function() { + return ChangeRef.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeRef + * @function getTypeUrl + * @memberof atomic.ChangeRef + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeRef.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeRef"; + }; + + return ChangeRef; + })(); + + atomic.ChangeIncludes = (function() { + + /** + * Properties of a ChangeIncludes. + * @typedef {Object} atomic.ChangeIncludes.$Properties + * @property {boolean|null} [metadata] ChangeIncludes metadata + * @property {boolean|null} [graphSection] ChangeIncludes graphSection + * @property {boolean|null} [semanticSection] ChangeIncludes semanticSection + * @property {boolean|null} [signatures] ChangeIncludes signatures + * @property {boolean|null} [contentChunks] ChangeIncludes contentChunks + * @property {boolean|null} [blastRadius] ChangeIncludes blastRadius + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeIncludes. + * @memberof atomic + * @interface IChangeIncludes + * @augments atomic.ChangeIncludes.$Properties + * @deprecated Use atomic.ChangeIncludes.$Properties instead. + */ + + /** + * Shape of a ChangeIncludes. + * @typedef {atomic.ChangeIncludes.$Properties} atomic.ChangeIncludes.$Shape + */ + + /** + * Constructs a new ChangeIncludes. + * @memberof atomic + * @classdesc Represents a ChangeIncludes. + * @constructor + * @param {atomic.ChangeIncludes.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeIncludes = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeIncludes metadata. + * @member {boolean} metadata + * @memberof atomic.ChangeIncludes + * @instance + */ + ChangeIncludes.prototype.metadata = false; + + /** + * ChangeIncludes graphSection. + * @member {boolean} graphSection + * @memberof atomic.ChangeIncludes + * @instance + */ + ChangeIncludes.prototype.graphSection = false; + + /** + * ChangeIncludes semanticSection. + * @member {boolean} semanticSection + * @memberof atomic.ChangeIncludes + * @instance + */ + ChangeIncludes.prototype.semanticSection = false; + + /** + * ChangeIncludes signatures. + * @member {boolean} signatures + * @memberof atomic.ChangeIncludes + * @instance + */ + ChangeIncludes.prototype.signatures = false; + + /** + * ChangeIncludes contentChunks. + * @member {boolean} contentChunks + * @memberof atomic.ChangeIncludes + * @instance + */ + ChangeIncludes.prototype.contentChunks = false; + + /** + * ChangeIncludes blastRadius. + * @member {boolean} blastRadius + * @memberof atomic.ChangeIncludes + * @instance + */ + ChangeIncludes.prototype.blastRadius = false; + + /** + * Creates a new ChangeIncludes instance using the specified properties. + * @function create + * @memberof atomic.ChangeIncludes + * @static + * @param {atomic.ChangeIncludes.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeIncludes} ChangeIncludes instance + * @type {{ + * (properties: atomic.ChangeIncludes.$Shape): atomic.ChangeIncludes & atomic.ChangeIncludes.$Shape; + * (properties?: atomic.ChangeIncludes.$Properties): atomic.ChangeIncludes; + * }} + */ + ChangeIncludes.create = function(properties) { + return new ChangeIncludes(properties); + }; + + /** + * Encodes the specified ChangeIncludes message. Does not implicitly {@link atomic.ChangeIncludes.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeIncludes + * @static + * @param {atomic.ChangeIncludes.$Properties} message ChangeIncludes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeIncludes.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata") && message.metadata !== false) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.metadata); + if (message.graphSection != null && $Object.hasOwnProperty.call(message, "graphSection") && message.graphSection !== false) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.graphSection); + if (message.semanticSection != null && $Object.hasOwnProperty.call(message, "semanticSection") && message.semanticSection !== false) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.semanticSection); + if (message.signatures != null && $Object.hasOwnProperty.call(message, "signatures") && message.signatures !== false) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.signatures); + if (message.contentChunks != null && $Object.hasOwnProperty.call(message, "contentChunks") && message.contentChunks !== false) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.contentChunks); + if (message.blastRadius != null && $Object.hasOwnProperty.call(message, "blastRadius") && message.blastRadius !== false) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.blastRadius); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeIncludes message, length delimited. Does not implicitly {@link atomic.ChangeIncludes.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeIncludes + * @static + * @param {atomic.ChangeIncludes.$Properties} message ChangeIncludes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeIncludes.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeIncludes message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeIncludes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeIncludes & atomic.ChangeIncludes.$Shape} ChangeIncludes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeIncludes.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeIncludes(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.metadata = value; + else + delete message.metadata; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.graphSection = value; + else + delete message.graphSection; + continue; + } + case 3: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.semanticSection = value; + else + delete message.semanticSection; + continue; + } + case 4: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.signatures = value; + else + delete message.signatures; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.contentChunks = value; + else + delete message.contentChunks; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.blastRadius = value; + else + delete message.blastRadius; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeIncludes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeIncludes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeIncludes & atomic.ChangeIncludes.$Shape} ChangeIncludes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeIncludes.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeIncludes message. + * @function verify + * @memberof atomic.ChangeIncludes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeIncludes.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) + if (typeof message.metadata !== "boolean") + return "metadata: boolean expected"; + if (message.graphSection != null && $Object.hasOwnProperty.call(message, "graphSection")) + if (typeof message.graphSection !== "boolean") + return "graphSection: boolean expected"; + if (message.semanticSection != null && $Object.hasOwnProperty.call(message, "semanticSection")) + if (typeof message.semanticSection !== "boolean") + return "semanticSection: boolean expected"; + if (message.signatures != null && $Object.hasOwnProperty.call(message, "signatures")) + if (typeof message.signatures !== "boolean") + return "signatures: boolean expected"; + if (message.contentChunks != null && $Object.hasOwnProperty.call(message, "contentChunks")) + if (typeof message.contentChunks !== "boolean") + return "contentChunks: boolean expected"; + if (message.blastRadius != null && $Object.hasOwnProperty.call(message, "blastRadius")) + if (typeof message.blastRadius !== "boolean") + return "blastRadius: boolean expected"; + return null; + }; + + /** + * Creates a ChangeIncludes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeIncludes + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeIncludes} ChangeIncludes + */ + ChangeIncludes.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeIncludes) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeIncludes: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeIncludes(); + if (object.metadata != null) + if (object.metadata) + message.metadata = $Boolean(object.metadata); + if (object.graphSection != null) + if (object.graphSection) + message.graphSection = $Boolean(object.graphSection); + if (object.semanticSection != null) + if (object.semanticSection) + message.semanticSection = $Boolean(object.semanticSection); + if (object.signatures != null) + if (object.signatures) + message.signatures = $Boolean(object.signatures); + if (object.contentChunks != null) + if (object.contentChunks) + message.contentChunks = $Boolean(object.contentChunks); + if (object.blastRadius != null) + if (object.blastRadius) + message.blastRadius = $Boolean(object.blastRadius); + return message; + }; + + /** + * Creates a plain object from a ChangeIncludes message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeIncludes + * @static + * @param {atomic.ChangeIncludes} message ChangeIncludes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeIncludes.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.metadata = false; + object.graphSection = false; + object.semanticSection = false; + object.signatures = false; + object.contentChunks = false; + object.blastRadius = false; + } + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) + object.metadata = message.metadata; + if (message.graphSection != null && $Object.hasOwnProperty.call(message, "graphSection")) + object.graphSection = message.graphSection; + if (message.semanticSection != null && $Object.hasOwnProperty.call(message, "semanticSection")) + object.semanticSection = message.semanticSection; + if (message.signatures != null && $Object.hasOwnProperty.call(message, "signatures")) + object.signatures = message.signatures; + if (message.contentChunks != null && $Object.hasOwnProperty.call(message, "contentChunks")) + object.contentChunks = message.contentChunks; + if (message.blastRadius != null && $Object.hasOwnProperty.call(message, "blastRadius")) + object.blastRadius = message.blastRadius; + return object; + }; + + /** + * Converts this ChangeIncludes to JSON. + * @function toJSON + * @memberof atomic.ChangeIncludes + * @instance + * @returns {Object.} JSON object + */ + ChangeIncludes.prototype.toJSON = function() { + return ChangeIncludes.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeIncludes + * @function getTypeUrl + * @memberof atomic.ChangeIncludes + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeIncludes.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeIncludes"; + }; + + return ChangeIncludes; + })(); + + atomic.GetChangeResponse = (function() { + + /** + * Properties of a GetChangeResponse. + * @typedef {Object} atomic.GetChangeResponse.$Properties + * @property {atomic.ChangeInfo.$Properties|null} [change] GetChangeResponse change + * @property {atomic.VersionedBytes.$Properties|null} [graphSection] GetChangeResponse graphSection + * @property {atomic.VersionedBytes.$Properties|null} [semanticSection] GetChangeResponse semanticSection + * @property {Array.|null} [signatures] GetChangeResponse signatures + * @property {Uint8Array|null} [contentChunks] GetChangeResponse contentChunks + * @property {atomic.VersionedBytes.$Properties|null} [changeBundle] GetChangeResponse changeBundle + * @property {Array.|null} [provenanceLedger] GetChangeResponse provenanceLedger + * @property {number|Long|null} [sequence] GetChangeResponse sequence + * @property {Array.|null} [fileContents] GetChangeResponse fileContents + * @property {Array.|null} [provenanceLedgerHashes] GetChangeResponse provenanceLedgerHashes + * @property {atomic.ChangeMetadata.$Properties|null} [metadata] GetChangeResponse metadata + * @property {atomic.ChangeBlastRadius.$Properties|null} [blastRadius] GetChangeResponse blastRadius + * @property {atomic.ChangeIntentContext.$Properties|null} [intentContext] GetChangeResponse intentContext + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetChangeResponse. + * @memberof atomic + * @interface IGetChangeResponse + * @augments atomic.GetChangeResponse.$Properties + * @deprecated Use atomic.GetChangeResponse.$Properties instead. + */ + + /** + * Shape of a GetChangeResponse. + * @typedef {atomic.GetChangeResponse.$Properties} atomic.GetChangeResponse.$Shape + */ + + /** + * Constructs a new GetChangeResponse. + * @memberof atomic + * @classdesc Represents a GetChangeResponse. + * @constructor + * @param {atomic.GetChangeResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetChangeResponse = function (properties) { + this.signatures = []; + this.provenanceLedger = []; + this.fileContents = []; + this.provenanceLedgerHashes = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetChangeResponse change. + * @member {atomic.ChangeInfo.$Properties|null|undefined} change + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.change = null; + + /** + * GetChangeResponse graphSection. + * @member {atomic.VersionedBytes.$Properties|null|undefined} graphSection + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.graphSection = null; + + /** + * GetChangeResponse semanticSection. + * @member {atomic.VersionedBytes.$Properties|null|undefined} semanticSection + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.semanticSection = null; + + /** + * GetChangeResponse signatures. + * @member {Array.} signatures + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.signatures = $util.emptyArray; + + /** + * GetChangeResponse contentChunks. + * @member {Uint8Array|null|undefined} contentChunks + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.contentChunks = null; + + /** + * GetChangeResponse changeBundle. + * @member {atomic.VersionedBytes.$Properties|null|undefined} changeBundle + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.changeBundle = null; + + /** + * GetChangeResponse provenanceLedger. + * @member {Array.} provenanceLedger + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.provenanceLedger = $util.emptyArray; + + /** + * GetChangeResponse sequence. + * @member {number|Long|null|undefined} sequence + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.sequence = null; + + /** + * GetChangeResponse fileContents. + * @member {Array.} fileContents + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.fileContents = $util.emptyArray; + + /** + * GetChangeResponse provenanceLedgerHashes. + * @member {Array.} provenanceLedgerHashes + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.provenanceLedgerHashes = $util.emptyArray; + + /** + * GetChangeResponse metadata. + * @member {atomic.ChangeMetadata.$Properties|null|undefined} metadata + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.metadata = null; + + /** + * GetChangeResponse blastRadius. + * @member {atomic.ChangeBlastRadius.$Properties|null|undefined} blastRadius + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.blastRadius = null; + + /** + * GetChangeResponse intentContext. + * @member {atomic.ChangeIntentContext.$Properties|null|undefined} intentContext + * @memberof atomic.GetChangeResponse + * @instance + */ + GetChangeResponse.prototype.intentContext = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetChangeResponse.prototype, "_graph_section", { + get: $util.oneOfGetter($oneOfFields = ["graphSection"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetChangeResponse.prototype, "_semantic_section", { + get: $util.oneOfGetter($oneOfFields = ["semanticSection"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetChangeResponse.prototype, "_content_chunks", { + get: $util.oneOfGetter($oneOfFields = ["contentChunks"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetChangeResponse.prototype, "_change_bundle", { + get: $util.oneOfGetter($oneOfFields = ["changeBundle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetChangeResponse.prototype, "_sequence", { + get: $util.oneOfGetter($oneOfFields = ["sequence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetChangeResponse.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetChangeResponse.prototype, "_blast_radius", { + get: $util.oneOfGetter($oneOfFields = ["blastRadius"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetChangeResponse.prototype, "_intent_context", { + get: $util.oneOfGetter($oneOfFields = ["intentContext"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetChangeResponse instance using the specified properties. + * @function create + * @memberof atomic.GetChangeResponse + * @static + * @param {atomic.GetChangeResponse.$Properties=} [properties] Properties to set + * @returns {atomic.GetChangeResponse} GetChangeResponse instance + * @type {{ + * (properties: atomic.GetChangeResponse.$Shape): atomic.GetChangeResponse & atomic.GetChangeResponse.$Shape; + * (properties?: atomic.GetChangeResponse.$Properties): atomic.GetChangeResponse; + * }} + */ + GetChangeResponse.create = function(properties) { + return new GetChangeResponse(properties); + }; + + /** + * Encodes the specified GetChangeResponse message. Does not implicitly {@link atomic.GetChangeResponse.verify|verify} messages. + * @function encode + * @memberof atomic.GetChangeResponse + * @static + * @param {atomic.GetChangeResponse.$Properties} message GetChangeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChangeResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.change != null && $Object.hasOwnProperty.call(message, "change")) + $root.atomic.ChangeInfo.encode(message.change, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.graphSection != null && $Object.hasOwnProperty.call(message, "graphSection")) + $root.atomic.VersionedBytes.encode(message.graphSection, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.semanticSection != null && $Object.hasOwnProperty.call(message, "semanticSection")) + $root.atomic.VersionedBytes.encode(message.semanticSection, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.atomic.ChangeSignature.encode(message.signatures[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.contentChunks != null && $Object.hasOwnProperty.call(message, "contentChunks")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.contentChunks); + if (message.changeBundle != null && $Object.hasOwnProperty.call(message, "changeBundle")) + $root.atomic.VersionedBytes.encode(message.changeBundle, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.provenanceLedger != null && message.provenanceLedger.length) + for (var i = 0; i < message.provenanceLedger.length; ++i) + $root.atomic.VersionedBytes.encode(message.provenanceLedger[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.sequence); + if (message.fileContents != null && message.fileContents.length) + for (var i = 0; i < message.fileContents.length; ++i) + $root.atomic.ChangeFileContent.encode(message.fileContents[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.provenanceLedgerHashes != null && message.provenanceLedgerHashes.length) + for (var i = 0; i < message.provenanceLedgerHashes.length; ++i) + $root.atomic.Hash.encode(message.provenanceLedgerHashes[i], writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) + $root.atomic.ChangeMetadata.encode(message.metadata, writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); + if (message.blastRadius != null && $Object.hasOwnProperty.call(message, "blastRadius")) + $root.atomic.ChangeBlastRadius.encode(message.blastRadius, writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.intentContext != null && $Object.hasOwnProperty.call(message, "intentContext")) + $root.atomic.ChangeIntentContext.encode(message.intentContext, writer.uint32(/* id 13, wireType 2 =*/106).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetChangeResponse message, length delimited. Does not implicitly {@link atomic.GetChangeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetChangeResponse + * @static + * @param {atomic.GetChangeResponse.$Properties} message GetChangeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetChangeResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetChangeResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetChangeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetChangeResponse & atomic.GetChangeResponse.$Shape} GetChangeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChangeResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetChangeResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.change = $root.atomic.ChangeInfo.decode(reader, reader.size(), $undefined, _depth + 1, message.change); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.graphSection = $root.atomic.VersionedBytes.decode(reader, reader.size(), $undefined, _depth + 1, message.graphSection); + message._graph_section = "graphSection"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.semanticSection = $root.atomic.VersionedBytes.decode(reader, reader.size(), $undefined, _depth + 1, message.semanticSection); + message._semantic_section = "semanticSection"; + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.atomic.ChangeSignature.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.contentChunks = reader.bytes(); + message._content_chunks = "contentChunks"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.changeBundle = $root.atomic.VersionedBytes.decode(reader, reader.size(), $undefined, _depth + 1, message.changeBundle); + message._change_bundle = "changeBundle"; + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.provenanceLedger && message.provenanceLedger.length)) + message.provenanceLedger = []; + message.provenanceLedger.push($root.atomic.VersionedBytes.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 8: { + if (wireType !== 0) + break; + message.sequence = reader.uint64(); + message._sequence = "sequence"; + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.fileContents && message.fileContents.length)) + message.fileContents = []; + message.fileContents.push($root.atomic.ChangeFileContent.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 10: { + if (wireType !== 2) + break; + if (!(message.provenanceLedgerHashes && message.provenanceLedgerHashes.length)) + message.provenanceLedgerHashes = []; + message.provenanceLedgerHashes.push($root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 11: { + if (wireType !== 2) + break; + message.metadata = $root.atomic.ChangeMetadata.decode(reader, reader.size(), $undefined, _depth + 1, message.metadata); + message._metadata = "metadata"; + continue; + } + case 12: { + if (wireType !== 2) + break; + message.blastRadius = $root.atomic.ChangeBlastRadius.decode(reader, reader.size(), $undefined, _depth + 1, message.blastRadius); + message._blast_radius = "blastRadius"; + continue; + } + case 13: { + if (wireType !== 2) + break; + message.intentContext = $root.atomic.ChangeIntentContext.decode(reader, reader.size(), $undefined, _depth + 1, message.intentContext); + message._intent_context = "intentContext"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetChangeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetChangeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetChangeResponse & atomic.GetChangeResponse.$Shape} GetChangeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetChangeResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetChangeResponse message. + * @function verify + * @memberof atomic.GetChangeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetChangeResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.change != null && $Object.hasOwnProperty.call(message, "change")) { + var error = $root.atomic.ChangeInfo.verify(message.change, _depth + 1); + if (error) + return "change." + error; + } + if (message.graphSection != null && $Object.hasOwnProperty.call(message, "graphSection")) { + properties._graph_section = 1; + { + var error = $root.atomic.VersionedBytes.verify(message.graphSection, _depth + 1); + if (error) + return "graphSection." + error; + } + } + if (message.semanticSection != null && $Object.hasOwnProperty.call(message, "semanticSection")) { + properties._semantic_section = 1; + { + var error = $root.atomic.VersionedBytes.verify(message.semanticSection, _depth + 1); + if (error) + return "semanticSection." + error; + } + } + if (message.signatures != null && $Object.hasOwnProperty.call(message, "signatures")) { + if (!$Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.atomic.ChangeSignature.verify(message.signatures[i], _depth + 1); + if (error) + return "signatures." + error; + } + } + if (message.contentChunks != null && $Object.hasOwnProperty.call(message, "contentChunks")) { + properties._content_chunks = 1; + if (!(message.contentChunks && typeof message.contentChunks.length === "number" || $util.isString(message.contentChunks))) + return "contentChunks: buffer expected"; + } + if (message.changeBundle != null && $Object.hasOwnProperty.call(message, "changeBundle")) { + properties._change_bundle = 1; + { + var error = $root.atomic.VersionedBytes.verify(message.changeBundle, _depth + 1); + if (error) + return "changeBundle." + error; + } + } + if (message.provenanceLedger != null && $Object.hasOwnProperty.call(message, "provenanceLedger")) { + if (!$Array.isArray(message.provenanceLedger)) + return "provenanceLedger: array expected"; + for (var i = 0; i < message.provenanceLedger.length; ++i) { + var error = $root.atomic.VersionedBytes.verify(message.provenanceLedger[i], _depth + 1); + if (error) + return "provenanceLedger." + error; + } + } + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) { + properties._sequence = 1; + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + } + if (message.fileContents != null && $Object.hasOwnProperty.call(message, "fileContents")) { + if (!$Array.isArray(message.fileContents)) + return "fileContents: array expected"; + for (var i = 0; i < message.fileContents.length; ++i) { + var error = $root.atomic.ChangeFileContent.verify(message.fileContents[i], _depth + 1); + if (error) + return "fileContents." + error; + } + } + if (message.provenanceLedgerHashes != null && $Object.hasOwnProperty.call(message, "provenanceLedgerHashes")) { + if (!$Array.isArray(message.provenanceLedgerHashes)) + return "provenanceLedgerHashes: array expected"; + for (var i = 0; i < message.provenanceLedgerHashes.length; ++i) { + var error = $root.atomic.Hash.verify(message.provenanceLedgerHashes[i], _depth + 1); + if (error) + return "provenanceLedgerHashes." + error; + } + } + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) { + properties._metadata = 1; + { + var error = $root.atomic.ChangeMetadata.verify(message.metadata, _depth + 1); + if (error) + return "metadata." + error; + } + } + if (message.blastRadius != null && $Object.hasOwnProperty.call(message, "blastRadius")) { + properties._blast_radius = 1; + { + var error = $root.atomic.ChangeBlastRadius.verify(message.blastRadius, _depth + 1); + if (error) + return "blastRadius." + error; + } + } + if (message.intentContext != null && $Object.hasOwnProperty.call(message, "intentContext")) { + properties._intent_context = 1; + { + var error = $root.atomic.ChangeIntentContext.verify(message.intentContext, _depth + 1); + if (error) + return "intentContext." + error; + } + } + return null; + }; + + /** + * Creates a GetChangeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetChangeResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetChangeResponse} GetChangeResponse + */ + GetChangeResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetChangeResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetChangeResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetChangeResponse(); + if (object.change != null) { + if (!$util.isObject(object.change)) + throw $TypeError(".atomic.GetChangeResponse.change: object expected"); + message.change = $root.atomic.ChangeInfo.fromObject(object.change, _depth + 1); + } + if (object.graphSection != null) { + if (!$util.isObject(object.graphSection)) + throw $TypeError(".atomic.GetChangeResponse.graphSection: object expected"); + message.graphSection = $root.atomic.VersionedBytes.fromObject(object.graphSection, _depth + 1); + } + if (object.semanticSection != null) { + if (!$util.isObject(object.semanticSection)) + throw $TypeError(".atomic.GetChangeResponse.semanticSection: object expected"); + message.semanticSection = $root.atomic.VersionedBytes.fromObject(object.semanticSection, _depth + 1); + } + if (object.signatures) { + if (!$Array.isArray(object.signatures)) + throw $TypeError(".atomic.GetChangeResponse.signatures: array expected"); + message.signatures = $Array(object.signatures.length); + for (var i = 0; i < object.signatures.length; ++i) { + if (!$util.isObject(object.signatures[i])) + throw $TypeError(".atomic.GetChangeResponse.signatures: object expected"); + message.signatures[i] = $root.atomic.ChangeSignature.fromObject(object.signatures[i], _depth + 1); + } + } + if (object.contentChunks != null) + if (typeof object.contentChunks === "string") + $util.base64.decode(object.contentChunks, message.contentChunks = $util.newBuffer($util.base64.length(object.contentChunks)), 0); + else if (object.contentChunks.length >= 0) + message.contentChunks = object.contentChunks; + if (object.changeBundle != null) { + if (!$util.isObject(object.changeBundle)) + throw $TypeError(".atomic.GetChangeResponse.changeBundle: object expected"); + message.changeBundle = $root.atomic.VersionedBytes.fromObject(object.changeBundle, _depth + 1); + } + if (object.provenanceLedger) { + if (!$Array.isArray(object.provenanceLedger)) + throw $TypeError(".atomic.GetChangeResponse.provenanceLedger: array expected"); + message.provenanceLedger = $Array(object.provenanceLedger.length); + for (var i = 0; i < object.provenanceLedger.length; ++i) { + if (!$util.isObject(object.provenanceLedger[i])) + throw $TypeError(".atomic.GetChangeResponse.provenanceLedger: object expected"); + message.provenanceLedger[i] = $root.atomic.VersionedBytes.fromObject(object.provenanceLedger[i], _depth + 1); + } + } + if (object.sequence != null) + if ($util.Long) + message.sequence = $util.Long.fromValue(object.sequence, true); + else if (typeof object.sequence === "string") + message.sequence = $parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + if (object.fileContents) { + if (!$Array.isArray(object.fileContents)) + throw $TypeError(".atomic.GetChangeResponse.fileContents: array expected"); + message.fileContents = $Array(object.fileContents.length); + for (var i = 0; i < object.fileContents.length; ++i) { + if (!$util.isObject(object.fileContents[i])) + throw $TypeError(".atomic.GetChangeResponse.fileContents: object expected"); + message.fileContents[i] = $root.atomic.ChangeFileContent.fromObject(object.fileContents[i], _depth + 1); + } + } + if (object.provenanceLedgerHashes) { + if (!$Array.isArray(object.provenanceLedgerHashes)) + throw $TypeError(".atomic.GetChangeResponse.provenanceLedgerHashes: array expected"); + message.provenanceLedgerHashes = $Array(object.provenanceLedgerHashes.length); + for (var i = 0; i < object.provenanceLedgerHashes.length; ++i) { + if (!$util.isObject(object.provenanceLedgerHashes[i])) + throw $TypeError(".atomic.GetChangeResponse.provenanceLedgerHashes: object expected"); + message.provenanceLedgerHashes[i] = $root.atomic.Hash.fromObject(object.provenanceLedgerHashes[i], _depth + 1); + } + } + if (object.metadata != null) { + if (!$util.isObject(object.metadata)) + throw $TypeError(".atomic.GetChangeResponse.metadata: object expected"); + message.metadata = $root.atomic.ChangeMetadata.fromObject(object.metadata, _depth + 1); + } + if (object.blastRadius != null) { + if (!$util.isObject(object.blastRadius)) + throw $TypeError(".atomic.GetChangeResponse.blastRadius: object expected"); + message.blastRadius = $root.atomic.ChangeBlastRadius.fromObject(object.blastRadius, _depth + 1); + } + if (object.intentContext != null) { + if (!$util.isObject(object.intentContext)) + throw $TypeError(".atomic.GetChangeResponse.intentContext: object expected"); + message.intentContext = $root.atomic.ChangeIntentContext.fromObject(object.intentContext, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a GetChangeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetChangeResponse + * @static + * @param {atomic.GetChangeResponse} message GetChangeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetChangeResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.signatures = []; + object.provenanceLedger = []; + object.fileContents = []; + object.provenanceLedgerHashes = []; + } + if (options.defaults) + object.change = null; + if (message.change != null && $Object.hasOwnProperty.call(message, "change")) + object.change = $root.atomic.ChangeInfo.toObject(message.change, options, _depth + 1); + if (message.graphSection != null && $Object.hasOwnProperty.call(message, "graphSection")) + object.graphSection = $root.atomic.VersionedBytes.toObject(message.graphSection, options, _depth + 1); + if (message.semanticSection != null && $Object.hasOwnProperty.call(message, "semanticSection")) + object.semanticSection = $root.atomic.VersionedBytes.toObject(message.semanticSection, options, _depth + 1); + if (message.signatures && message.signatures.length) { + object.signatures = $Array(message.signatures.length); + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.atomic.ChangeSignature.toObject(message.signatures[j], options, _depth + 1); + } + if (message.contentChunks != null && $Object.hasOwnProperty.call(message, "contentChunks")) + object.contentChunks = options.bytes === $String ? $util.base64.encode(message.contentChunks, 0, message.contentChunks.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.contentChunks) : message.contentChunks; + if (message.changeBundle != null && $Object.hasOwnProperty.call(message, "changeBundle")) + object.changeBundle = $root.atomic.VersionedBytes.toObject(message.changeBundle, options, _depth + 1); + if (message.provenanceLedger && message.provenanceLedger.length) { + object.provenanceLedger = $Array(message.provenanceLedger.length); + for (var j = 0; j < message.provenanceLedger.length; ++j) + object.provenanceLedger[j] = $root.atomic.VersionedBytes.toObject(message.provenanceLedger[j], options, _depth + 1); + } + if (message.sequence != null && $Object.hasOwnProperty.call(message, "sequence")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.sequence = typeof message.sequence === "number" ? $BigInt(message.sequence) : $util.Long.fromBits(message.sequence.low >>> 0, message.sequence.high >>> 0, true).toBigInt(); + else if (typeof message.sequence === "number") + object.sequence = options.longs === $String ? $String(message.sequence) : message.sequence; + else + object.sequence = options.longs === $String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === $Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + if (message.fileContents && message.fileContents.length) { + object.fileContents = $Array(message.fileContents.length); + for (var j = 0; j < message.fileContents.length; ++j) + object.fileContents[j] = $root.atomic.ChangeFileContent.toObject(message.fileContents[j], options, _depth + 1); + } + if (message.provenanceLedgerHashes && message.provenanceLedgerHashes.length) { + object.provenanceLedgerHashes = $Array(message.provenanceLedgerHashes.length); + for (var j = 0; j < message.provenanceLedgerHashes.length; ++j) + object.provenanceLedgerHashes[j] = $root.atomic.Hash.toObject(message.provenanceLedgerHashes[j], options, _depth + 1); + } + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) + object.metadata = $root.atomic.ChangeMetadata.toObject(message.metadata, options, _depth + 1); + if (message.blastRadius != null && $Object.hasOwnProperty.call(message, "blastRadius")) + object.blastRadius = $root.atomic.ChangeBlastRadius.toObject(message.blastRadius, options, _depth + 1); + if (message.intentContext != null && $Object.hasOwnProperty.call(message, "intentContext")) + object.intentContext = $root.atomic.ChangeIntentContext.toObject(message.intentContext, options, _depth + 1); + return object; + }; + + /** + * Converts this GetChangeResponse to JSON. + * @function toJSON + * @memberof atomic.GetChangeResponse + * @instance + * @returns {Object.} JSON object + */ + GetChangeResponse.prototype.toJSON = function() { + return GetChangeResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetChangeResponse + * @function getTypeUrl + * @memberof atomic.GetChangeResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetChangeResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetChangeResponse"; + }; + + return GetChangeResponse; + })(); + + atomic.VersionedBytes = (function() { + + /** + * Properties of a VersionedBytes. + * @typedef {Object} atomic.VersionedBytes.$Properties + * @property {string|null} [schema] VersionedBytes schema + * @property {Uint8Array|null} [payload] VersionedBytes payload + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a VersionedBytes. + * @memberof atomic + * @interface IVersionedBytes + * @augments atomic.VersionedBytes.$Properties + * @deprecated Use atomic.VersionedBytes.$Properties instead. + */ + + /** + * Shape of a VersionedBytes. + * @typedef {atomic.VersionedBytes.$Properties} atomic.VersionedBytes.$Shape + */ + + /** + * Constructs a new VersionedBytes. + * @memberof atomic + * @classdesc Represents a VersionedBytes. + * @constructor + * @param {atomic.VersionedBytes.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var VersionedBytes = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * VersionedBytes schema. + * @member {string} schema + * @memberof atomic.VersionedBytes + * @instance + */ + VersionedBytes.prototype.schema = ""; + + /** + * VersionedBytes payload. + * @member {Uint8Array} payload + * @memberof atomic.VersionedBytes + * @instance + */ + VersionedBytes.prototype.payload = $util.newBuffer([]); + + /** + * Creates a new VersionedBytes instance using the specified properties. + * @function create + * @memberof atomic.VersionedBytes + * @static + * @param {atomic.VersionedBytes.$Properties=} [properties] Properties to set + * @returns {atomic.VersionedBytes} VersionedBytes instance + * @type {{ + * (properties: atomic.VersionedBytes.$Shape): atomic.VersionedBytes & atomic.VersionedBytes.$Shape; + * (properties?: atomic.VersionedBytes.$Properties): atomic.VersionedBytes; + * }} + */ + VersionedBytes.create = function(properties) { + return new VersionedBytes(properties); + }; + + /** + * Encodes the specified VersionedBytes message. Does not implicitly {@link atomic.VersionedBytes.verify|verify} messages. + * @function encode + * @memberof atomic.VersionedBytes + * @static + * @param {atomic.VersionedBytes.$Properties} message VersionedBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionedBytes.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.schema != null && $Object.hasOwnProperty.call(message, "schema") && message.schema !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); + if (message.payload != null && $Object.hasOwnProperty.call(message, "payload") && message.payload.length) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.payload); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified VersionedBytes message, length delimited. Does not implicitly {@link atomic.VersionedBytes.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.VersionedBytes + * @static + * @param {atomic.VersionedBytes.$Properties} message VersionedBytes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionedBytes.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a VersionedBytes message from the specified reader or buffer. + * @function decode + * @memberof atomic.VersionedBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.VersionedBytes & atomic.VersionedBytes.$Shape} VersionedBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionedBytes.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.VersionedBytes(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.schema = value; + else + delete message.schema; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.bytes()).length) + message.payload = value; + else + delete message.payload; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a VersionedBytes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.VersionedBytes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.VersionedBytes & atomic.VersionedBytes.$Shape} VersionedBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionedBytes.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a VersionedBytes message. + * @function verify + * @memberof atomic.VersionedBytes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionedBytes.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.schema != null && $Object.hasOwnProperty.call(message, "schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.payload != null && $Object.hasOwnProperty.call(message, "payload")) + if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) + return "payload: buffer expected"; + return null; + }; + + /** + * Creates a VersionedBytes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.VersionedBytes + * @static + * @param {Object.} object Plain object + * @returns {atomic.VersionedBytes} VersionedBytes + */ + VersionedBytes.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.VersionedBytes) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.VersionedBytes: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.VersionedBytes(); + if (object.schema != null) + if (typeof object.schema !== "string" || object.schema.length) + message.schema = $String(object.schema); + if (object.payload != null) + if (object.payload.length) + if (typeof object.payload === "string") + $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0); + else if (object.payload.length >= 0) + message.payload = object.payload; + return message; + }; + + /** + * Creates a plain object from a VersionedBytes message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.VersionedBytes + * @static + * @param {atomic.VersionedBytes} message VersionedBytes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionedBytes.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.schema = ""; + if (options.bytes === $String) + object.payload = ""; + else { + object.payload = []; + if (options.bytes !== $Array) + object.payload = $util.newBuffer(object.payload); + } + } + if (message.schema != null && $Object.hasOwnProperty.call(message, "schema")) + object.schema = message.schema; + if (message.payload != null && $Object.hasOwnProperty.call(message, "payload")) + object.payload = options.bytes === $String ? $util.base64.encode(message.payload, 0, message.payload.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.payload) : message.payload; + return object; + }; + + /** + * Converts this VersionedBytes to JSON. + * @function toJSON + * @memberof atomic.VersionedBytes + * @instance + * @returns {Object.} JSON object + */ + VersionedBytes.prototype.toJSON = function() { + return VersionedBytes.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for VersionedBytes + * @function getTypeUrl + * @memberof atomic.VersionedBytes + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + VersionedBytes.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.VersionedBytes"; + }; + + return VersionedBytes; + })(); + + atomic.ChangeSignature = (function() { + + /** + * Properties of a ChangeSignature. + * @typedef {Object} atomic.ChangeSignature.$Properties + * @property {string|null} [identityDid] ChangeSignature identityDid + * @property {Uint8Array|null} [signature] ChangeSignature signature + * @property {google.protobuf.Timestamp.$Properties|null} [signedAt] ChangeSignature signedAt + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeSignature. + * @memberof atomic + * @interface IChangeSignature + * @augments atomic.ChangeSignature.$Properties + * @deprecated Use atomic.ChangeSignature.$Properties instead. + */ + + /** + * Shape of a ChangeSignature. + * @typedef {atomic.ChangeSignature.$Properties} atomic.ChangeSignature.$Shape + */ + + /** + * Constructs a new ChangeSignature. + * @memberof atomic + * @classdesc Represents a ChangeSignature. + * @constructor + * @param {atomic.ChangeSignature.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeSignature = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeSignature identityDid. + * @member {string} identityDid + * @memberof atomic.ChangeSignature + * @instance + */ + ChangeSignature.prototype.identityDid = ""; + + /** + * ChangeSignature signature. + * @member {Uint8Array} signature + * @memberof atomic.ChangeSignature + * @instance + */ + ChangeSignature.prototype.signature = $util.newBuffer([]); + + /** + * ChangeSignature signedAt. + * @member {google.protobuf.Timestamp.$Properties|null|undefined} signedAt + * @memberof atomic.ChangeSignature + * @instance + */ + ChangeSignature.prototype.signedAt = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeSignature.prototype, "_signed_at", { + get: $util.oneOfGetter($oneOfFields = ["signedAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeSignature instance using the specified properties. + * @function create + * @memberof atomic.ChangeSignature + * @static + * @param {atomic.ChangeSignature.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeSignature} ChangeSignature instance + * @type {{ + * (properties: atomic.ChangeSignature.$Shape): atomic.ChangeSignature & atomic.ChangeSignature.$Shape; + * (properties?: atomic.ChangeSignature.$Properties): atomic.ChangeSignature; + * }} + */ + ChangeSignature.create = function(properties) { + return new ChangeSignature(properties); + }; + + /** + * Encodes the specified ChangeSignature message. Does not implicitly {@link atomic.ChangeSignature.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeSignature + * @static + * @param {atomic.ChangeSignature.$Properties} message ChangeSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeSignature.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.identityDid != null && $Object.hasOwnProperty.call(message, "identityDid") && message.identityDid !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.identityDid); + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature") && message.signature.length) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + if (message.signedAt != null && $Object.hasOwnProperty.call(message, "signedAt")) + $root.google.protobuf.Timestamp.encode(message.signedAt, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeSignature message, length delimited. Does not implicitly {@link atomic.ChangeSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeSignature + * @static + * @param {atomic.ChangeSignature.$Properties} message ChangeSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeSignature.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeSignature message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeSignature & atomic.ChangeSignature.$Shape} ChangeSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeSignature.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeSignature(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.identityDid = value; + else + delete message.identityDid; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.bytes()).length) + message.signature = value; + else + delete message.signature; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.signedAt = $root.google.protobuf.Timestamp.decode(reader, reader.size(), $undefined, _depth + 1, message.signedAt); + message._signed_at = "signedAt"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeSignature & atomic.ChangeSignature.$Shape} ChangeSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeSignature.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeSignature message. + * @function verify + * @memberof atomic.ChangeSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeSignature.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.identityDid != null && $Object.hasOwnProperty.call(message, "identityDid")) + if (!$util.isString(message.identityDid)) + return "identityDid: string expected"; + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + if (message.signedAt != null && $Object.hasOwnProperty.call(message, "signedAt")) { + properties._signed_at = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.signedAt, _depth + 1); + if (error) + return "signedAt." + error; + } + } + return null; + }; + + /** + * Creates a ChangeSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeSignature + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeSignature} ChangeSignature + */ + ChangeSignature.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeSignature) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeSignature: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeSignature(); + if (object.identityDid != null) + if (typeof object.identityDid !== "string" || object.identityDid.length) + message.identityDid = $String(object.identityDid); + if (object.signature != null) + if (object.signature.length) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length >= 0) + message.signature = object.signature; + if (object.signedAt != null) { + if (!$util.isObject(object.signedAt)) + throw $TypeError(".atomic.ChangeSignature.signedAt: object expected"); + message.signedAt = $root.google.protobuf.Timestamp.fromObject(object.signedAt, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ChangeSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeSignature + * @static + * @param {atomic.ChangeSignature} message ChangeSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeSignature.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.identityDid = ""; + if (options.bytes === $String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== $Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.identityDid != null && $Object.hasOwnProperty.call(message, "identityDid")) + object.identityDid = message.identityDid; + if (message.signature != null && $Object.hasOwnProperty.call(message, "signature")) + object.signature = options.bytes === $String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.signature) : message.signature; + if (message.signedAt != null && $Object.hasOwnProperty.call(message, "signedAt")) + object.signedAt = $root.google.protobuf.Timestamp.toObject(message.signedAt, options, _depth + 1); + return object; + }; + + /** + * Converts this ChangeSignature to JSON. + * @function toJSON + * @memberof atomic.ChangeSignature + * @instance + * @returns {Object.} JSON object + */ + ChangeSignature.prototype.toJSON = function() { + return ChangeSignature.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeSignature + * @function getTypeUrl + * @memberof atomic.ChangeSignature + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeSignature.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeSignature"; + }; + + return ChangeSignature; + })(); + + atomic.ChangeFileContent = (function() { + + /** + * Properties of a ChangeFileContent. + * @typedef {Object} atomic.ChangeFileContent.$Properties + * @property {string|null} [path] ChangeFileContent path + * @property {Uint8Array|null} [before] ChangeFileContent before + * @property {Uint8Array|null} [after] ChangeFileContent after + * @property {boolean|null} [beforeExists] ChangeFileContent beforeExists + * @property {boolean|null} [afterExists] ChangeFileContent afterExists + * @property {boolean|null} [isDirectory] ChangeFileContent isDirectory + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeFileContent. + * @memberof atomic + * @interface IChangeFileContent + * @augments atomic.ChangeFileContent.$Properties + * @deprecated Use atomic.ChangeFileContent.$Properties instead. + */ + + /** + * Shape of a ChangeFileContent. + * @typedef {atomic.ChangeFileContent.$Properties} atomic.ChangeFileContent.$Shape + */ + + /** + * Constructs a new ChangeFileContent. + * @memberof atomic + * @classdesc Represents a ChangeFileContent. + * @constructor + * @param {atomic.ChangeFileContent.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeFileContent = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeFileContent path. + * @member {string} path + * @memberof atomic.ChangeFileContent + * @instance + */ + ChangeFileContent.prototype.path = ""; + + /** + * ChangeFileContent before. + * @member {Uint8Array|null|undefined} before + * @memberof atomic.ChangeFileContent + * @instance + */ + ChangeFileContent.prototype.before = null; + + /** + * ChangeFileContent after. + * @member {Uint8Array|null|undefined} after + * @memberof atomic.ChangeFileContent + * @instance + */ + ChangeFileContent.prototype.after = null; + + /** + * ChangeFileContent beforeExists. + * @member {boolean|null|undefined} beforeExists + * @memberof atomic.ChangeFileContent + * @instance + */ + ChangeFileContent.prototype.beforeExists = null; + + /** + * ChangeFileContent afterExists. + * @member {boolean|null|undefined} afterExists + * @memberof atomic.ChangeFileContent + * @instance + */ + ChangeFileContent.prototype.afterExists = null; + + /** + * ChangeFileContent isDirectory. + * @member {boolean} isDirectory + * @memberof atomic.ChangeFileContent + * @instance + */ + ChangeFileContent.prototype.isDirectory = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeFileContent.prototype, "_before", { + get: $util.oneOfGetter($oneOfFields = ["before"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeFileContent.prototype, "_after", { + get: $util.oneOfGetter($oneOfFields = ["after"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeFileContent.prototype, "_before_exists", { + get: $util.oneOfGetter($oneOfFields = ["beforeExists"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeFileContent.prototype, "_after_exists", { + get: $util.oneOfGetter($oneOfFields = ["afterExists"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeFileContent instance using the specified properties. + * @function create + * @memberof atomic.ChangeFileContent + * @static + * @param {atomic.ChangeFileContent.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeFileContent} ChangeFileContent instance + * @type {{ + * (properties: atomic.ChangeFileContent.$Shape): atomic.ChangeFileContent & atomic.ChangeFileContent.$Shape; + * (properties?: atomic.ChangeFileContent.$Properties): atomic.ChangeFileContent; + * }} + */ + ChangeFileContent.create = function(properties) { + return new ChangeFileContent(properties); + }; + + /** + * Encodes the specified ChangeFileContent message. Does not implicitly {@link atomic.ChangeFileContent.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeFileContent + * @static + * @param {atomic.ChangeFileContent.$Properties} message ChangeFileContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeFileContent.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.before != null && $Object.hasOwnProperty.call(message, "before")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.before); + if (message.after != null && $Object.hasOwnProperty.call(message, "after")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.after); + if (message.beforeExists != null && $Object.hasOwnProperty.call(message, "beforeExists")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.beforeExists); + if (message.afterExists != null && $Object.hasOwnProperty.call(message, "afterExists")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.afterExists); + if (message.isDirectory != null && $Object.hasOwnProperty.call(message, "isDirectory") && message.isDirectory !== false) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isDirectory); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeFileContent message, length delimited. Does not implicitly {@link atomic.ChangeFileContent.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeFileContent + * @static + * @param {atomic.ChangeFileContent.$Properties} message ChangeFileContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeFileContent.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeFileContent message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeFileContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeFileContent & atomic.ChangeFileContent.$Shape} ChangeFileContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeFileContent.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeFileContent(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.before = reader.bytes(); + message._before = "before"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.after = reader.bytes(); + message._after = "after"; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.beforeExists = reader.bool(); + message._before_exists = "beforeExists"; + continue; + } + case 5: { + if (wireType !== 0) + break; + message.afterExists = reader.bool(); + message._after_exists = "afterExists"; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.isDirectory = value; + else + delete message.isDirectory; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeFileContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeFileContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeFileContent & atomic.ChangeFileContent.$Shape} ChangeFileContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeFileContent.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeFileContent message. + * @function verify + * @memberof atomic.ChangeFileContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeFileContent.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.before != null && $Object.hasOwnProperty.call(message, "before")) { + properties._before = 1; + if (!(message.before && typeof message.before.length === "number" || $util.isString(message.before))) + return "before: buffer expected"; + } + if (message.after != null && $Object.hasOwnProperty.call(message, "after")) { + properties._after = 1; + if (!(message.after && typeof message.after.length === "number" || $util.isString(message.after))) + return "after: buffer expected"; + } + if (message.beforeExists != null && $Object.hasOwnProperty.call(message, "beforeExists")) { + properties._before_exists = 1; + if (typeof message.beforeExists !== "boolean") + return "beforeExists: boolean expected"; + } + if (message.afterExists != null && $Object.hasOwnProperty.call(message, "afterExists")) { + properties._after_exists = 1; + if (typeof message.afterExists !== "boolean") + return "afterExists: boolean expected"; + } + if (message.isDirectory != null && $Object.hasOwnProperty.call(message, "isDirectory")) + if (typeof message.isDirectory !== "boolean") + return "isDirectory: boolean expected"; + return null; + }; + + /** + * Creates a ChangeFileContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeFileContent + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeFileContent} ChangeFileContent + */ + ChangeFileContent.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeFileContent) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeFileContent: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeFileContent(); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + if (object.before != null) + if (typeof object.before === "string") + $util.base64.decode(object.before, message.before = $util.newBuffer($util.base64.length(object.before)), 0); + else if (object.before.length >= 0) + message.before = object.before; + if (object.after != null) + if (typeof object.after === "string") + $util.base64.decode(object.after, message.after = $util.newBuffer($util.base64.length(object.after)), 0); + else if (object.after.length >= 0) + message.after = object.after; + if (object.beforeExists != null) + message.beforeExists = $Boolean(object.beforeExists); + if (object.afterExists != null) + message.afterExists = $Boolean(object.afterExists); + if (object.isDirectory != null) + if (object.isDirectory) + message.isDirectory = $Boolean(object.isDirectory); + return message; + }; + + /** + * Creates a plain object from a ChangeFileContent message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeFileContent + * @static + * @param {atomic.ChangeFileContent} message ChangeFileContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeFileContent.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.path = ""; + object.isDirectory = false; + } + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.before != null && $Object.hasOwnProperty.call(message, "before")) + object.before = options.bytes === $String ? $util.base64.encode(message.before, 0, message.before.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.before) : message.before; + if (message.after != null && $Object.hasOwnProperty.call(message, "after")) + object.after = options.bytes === $String ? $util.base64.encode(message.after, 0, message.after.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.after) : message.after; + if (message.beforeExists != null && $Object.hasOwnProperty.call(message, "beforeExists")) + object.beforeExists = message.beforeExists; + if (message.afterExists != null && $Object.hasOwnProperty.call(message, "afterExists")) + object.afterExists = message.afterExists; + if (message.isDirectory != null && $Object.hasOwnProperty.call(message, "isDirectory")) + object.isDirectory = message.isDirectory; + return object; + }; + + /** + * Converts this ChangeFileContent to JSON. + * @function toJSON + * @memberof atomic.ChangeFileContent + * @instance + * @returns {Object.} JSON object + */ + ChangeFileContent.prototype.toJSON = function() { + return ChangeFileContent.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeFileContent + * @function getTypeUrl + * @memberof atomic.ChangeFileContent + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeFileContent.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeFileContent"; + }; + + return ChangeFileContent; + })(); + + atomic.ChangeMetadata = (function() { + + /** + * Properties of a ChangeMetadata. + * @typedef {Object} atomic.ChangeMetadata.$Properties + * @property {number|null} [schemaVersion] ChangeMetadata schemaVersion + * @property {atomic.Hash.$Properties|null} [changeHash] ChangeMetadata changeHash + * @property {Array.|null} [usage] ChangeMetadata usage + * @property {Array.|null} [affectedPaths] ChangeMetadata affectedPaths + * @property {Array.|null} [warnings] ChangeMetadata warnings + * @property {atomic.ChangeGraphSummary.$Properties|null} [graphSummary] ChangeMetadata graphSummary + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeMetadata. + * @memberof atomic + * @interface IChangeMetadata + * @augments atomic.ChangeMetadata.$Properties + * @deprecated Use atomic.ChangeMetadata.$Properties instead. + */ + + /** + * Shape of a ChangeMetadata. + * @typedef {atomic.ChangeMetadata.$Properties} atomic.ChangeMetadata.$Shape + */ + + /** + * Constructs a new ChangeMetadata. + * @memberof atomic + * @classdesc Represents a ChangeMetadata. + * @constructor + * @param {atomic.ChangeMetadata.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeMetadata = function (properties) { + this.usage = []; + this.affectedPaths = []; + this.warnings = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeMetadata schemaVersion. + * @member {number} schemaVersion + * @memberof atomic.ChangeMetadata + * @instance + */ + ChangeMetadata.prototype.schemaVersion = 0; + + /** + * ChangeMetadata changeHash. + * @member {atomic.Hash.$Properties|null|undefined} changeHash + * @memberof atomic.ChangeMetadata + * @instance + */ + ChangeMetadata.prototype.changeHash = null; + + /** + * ChangeMetadata usage. + * @member {Array.} usage + * @memberof atomic.ChangeMetadata + * @instance + */ + ChangeMetadata.prototype.usage = $util.emptyArray; + + /** + * ChangeMetadata affectedPaths. + * @member {Array.} affectedPaths + * @memberof atomic.ChangeMetadata + * @instance + */ + ChangeMetadata.prototype.affectedPaths = $util.emptyArray; + + /** + * ChangeMetadata warnings. + * @member {Array.} warnings + * @memberof atomic.ChangeMetadata + * @instance + */ + ChangeMetadata.prototype.warnings = $util.emptyArray; + + /** + * ChangeMetadata graphSummary. + * @member {atomic.ChangeGraphSummary.$Properties|null|undefined} graphSummary + * @memberof atomic.ChangeMetadata + * @instance + */ + ChangeMetadata.prototype.graphSummary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeMetadata.prototype, "_graph_summary", { + get: $util.oneOfGetter($oneOfFields = ["graphSummary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeMetadata instance using the specified properties. + * @function create + * @memberof atomic.ChangeMetadata + * @static + * @param {atomic.ChangeMetadata.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeMetadata} ChangeMetadata instance + * @type {{ + * (properties: atomic.ChangeMetadata.$Shape): atomic.ChangeMetadata & atomic.ChangeMetadata.$Shape; + * (properties?: atomic.ChangeMetadata.$Properties): atomic.ChangeMetadata; + * }} + */ + ChangeMetadata.create = function(properties) { + return new ChangeMetadata(properties); + }; + + /** + * Encodes the specified ChangeMetadata message. Does not implicitly {@link atomic.ChangeMetadata.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeMetadata + * @static + * @param {atomic.ChangeMetadata.$Properties} message ChangeMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeMetadata.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.schemaVersion != null && $Object.hasOwnProperty.call(message, "schemaVersion") && message.schemaVersion !== 0) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.schemaVersion); + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) + $root.atomic.Hash.encode(message.changeHash, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.usage != null && message.usage.length) + for (var i = 0; i < message.usage.length; ++i) + $root.atomic.ChangeAIUsage.encode(message.usage[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.affectedPaths != null && message.affectedPaths.length) + for (var i = 0; i < message.affectedPaths.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.affectedPaths[i]); + if (message.warnings != null && message.warnings.length) + for (var i = 0; i < message.warnings.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.warnings[i]); + if (message.graphSummary != null && $Object.hasOwnProperty.call(message, "graphSummary")) + $root.atomic.ChangeGraphSummary.encode(message.graphSummary, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeMetadata message, length delimited. Does not implicitly {@link atomic.ChangeMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeMetadata + * @static + * @param {atomic.ChangeMetadata.$Properties} message ChangeMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeMetadata.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeMetadata message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeMetadata & atomic.ChangeMetadata.$Shape} ChangeMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeMetadata.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeMetadata(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.schemaVersion = value; + else + delete message.schemaVersion; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.changeHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.changeHash); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.usage && message.usage.length)) + message.usage = []; + message.usage.push($root.atomic.ChangeAIUsage.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.affectedPaths && message.affectedPaths.length)) + message.affectedPaths = []; + message.affectedPaths.push(reader.stringVerify()); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.warnings && message.warnings.length)) + message.warnings = []; + message.warnings.push(reader.stringVerify()); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.graphSummary = $root.atomic.ChangeGraphSummary.decode(reader, reader.size(), $undefined, _depth + 1, message.graphSummary); + message._graph_summary = "graphSummary"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeMetadata & atomic.ChangeMetadata.$Shape} ChangeMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeMetadata.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeMetadata message. + * @function verify + * @memberof atomic.ChangeMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeMetadata.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.schemaVersion != null && $Object.hasOwnProperty.call(message, "schemaVersion")) + if (!$util.isInteger(message.schemaVersion)) + return "schemaVersion: integer expected"; + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) { + var error = $root.atomic.Hash.verify(message.changeHash, _depth + 1); + if (error) + return "changeHash." + error; + } + if (message.usage != null && $Object.hasOwnProperty.call(message, "usage")) { + if (!$Array.isArray(message.usage)) + return "usage: array expected"; + for (var i = 0; i < message.usage.length; ++i) { + var error = $root.atomic.ChangeAIUsage.verify(message.usage[i], _depth + 1); + if (error) + return "usage." + error; + } + } + if (message.affectedPaths != null && $Object.hasOwnProperty.call(message, "affectedPaths")) { + if (!$Array.isArray(message.affectedPaths)) + return "affectedPaths: array expected"; + for (var i = 0; i < message.affectedPaths.length; ++i) + if (!$util.isString(message.affectedPaths[i])) + return "affectedPaths: string[] expected"; + } + if (message.warnings != null && $Object.hasOwnProperty.call(message, "warnings")) { + if (!$Array.isArray(message.warnings)) + return "warnings: array expected"; + for (var i = 0; i < message.warnings.length; ++i) + if (!$util.isString(message.warnings[i])) + return "warnings: string[] expected"; + } + if (message.graphSummary != null && $Object.hasOwnProperty.call(message, "graphSummary")) { + properties._graph_summary = 1; + { + var error = $root.atomic.ChangeGraphSummary.verify(message.graphSummary, _depth + 1); + if (error) + return "graphSummary." + error; + } + } + return null; + }; + + /** + * Creates a ChangeMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeMetadata + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeMetadata} ChangeMetadata + */ + ChangeMetadata.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeMetadata) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeMetadata: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeMetadata(); + if (object.schemaVersion != null) + if ($Number(object.schemaVersion) !== 0) + message.schemaVersion = object.schemaVersion >>> 0; + if (object.changeHash != null) { + if (!$util.isObject(object.changeHash)) + throw $TypeError(".atomic.ChangeMetadata.changeHash: object expected"); + message.changeHash = $root.atomic.Hash.fromObject(object.changeHash, _depth + 1); + } + if (object.usage) { + if (!$Array.isArray(object.usage)) + throw $TypeError(".atomic.ChangeMetadata.usage: array expected"); + message.usage = $Array(object.usage.length); + for (var i = 0; i < object.usage.length; ++i) { + if (!$util.isObject(object.usage[i])) + throw $TypeError(".atomic.ChangeMetadata.usage: object expected"); + message.usage[i] = $root.atomic.ChangeAIUsage.fromObject(object.usage[i], _depth + 1); + } + } + if (object.affectedPaths) { + if (!$Array.isArray(object.affectedPaths)) + throw $TypeError(".atomic.ChangeMetadata.affectedPaths: array expected"); + message.affectedPaths = $Array(object.affectedPaths.length); + for (var i = 0; i < object.affectedPaths.length; ++i) + message.affectedPaths[i] = $String(object.affectedPaths[i]); + } + if (object.warnings) { + if (!$Array.isArray(object.warnings)) + throw $TypeError(".atomic.ChangeMetadata.warnings: array expected"); + message.warnings = $Array(object.warnings.length); + for (var i = 0; i < object.warnings.length; ++i) + message.warnings[i] = $String(object.warnings[i]); + } + if (object.graphSummary != null) { + if (!$util.isObject(object.graphSummary)) + throw $TypeError(".atomic.ChangeMetadata.graphSummary: object expected"); + message.graphSummary = $root.atomic.ChangeGraphSummary.fromObject(object.graphSummary, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ChangeMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeMetadata + * @static + * @param {atomic.ChangeMetadata} message ChangeMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeMetadata.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.usage = []; + object.affectedPaths = []; + object.warnings = []; + } + if (options.defaults) { + object.schemaVersion = 0; + object.changeHash = null; + } + if (message.schemaVersion != null && $Object.hasOwnProperty.call(message, "schemaVersion")) + object.schemaVersion = message.schemaVersion; + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) + object.changeHash = $root.atomic.Hash.toObject(message.changeHash, options, _depth + 1); + if (message.usage && message.usage.length) { + object.usage = $Array(message.usage.length); + for (var j = 0; j < message.usage.length; ++j) + object.usage[j] = $root.atomic.ChangeAIUsage.toObject(message.usage[j], options, _depth + 1); + } + if (message.affectedPaths && message.affectedPaths.length) { + object.affectedPaths = $Array(message.affectedPaths.length); + for (var j = 0; j < message.affectedPaths.length; ++j) + object.affectedPaths[j] = message.affectedPaths[j]; + } + if (message.warnings && message.warnings.length) { + object.warnings = $Array(message.warnings.length); + for (var j = 0; j < message.warnings.length; ++j) + object.warnings[j] = message.warnings[j]; + } + if (message.graphSummary != null && $Object.hasOwnProperty.call(message, "graphSummary")) + object.graphSummary = $root.atomic.ChangeGraphSummary.toObject(message.graphSummary, options, _depth + 1); + return object; + }; + + /** + * Converts this ChangeMetadata to JSON. + * @function toJSON + * @memberof atomic.ChangeMetadata + * @instance + * @returns {Object.} JSON object + */ + ChangeMetadata.prototype.toJSON = function() { + return ChangeMetadata.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeMetadata + * @function getTypeUrl + * @memberof atomic.ChangeMetadata + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeMetadata.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeMetadata"; + }; + + return ChangeMetadata; + })(); + + atomic.ChangeAIUsage = (function() { + + /** + * Properties of a ChangeAIUsage. + * @typedef {Object} atomic.ChangeAIUsage.$Properties + * @property {number|null} [recordIndex] ChangeAIUsage recordIndex + * @property {string|null} [vendor] ChangeAIUsage vendor + * @property {string|null} [model] ChangeAIUsage model + * @property {string|null} [modelVersion] ChangeAIUsage modelVersion + * @property {string|null} [tool] ChangeAIUsage tool + * @property {string|null} [requestId] ChangeAIUsage requestId + * @property {string|null} [sessionId] ChangeAIUsage sessionId + * @property {string|null} [sessionSlug] ChangeAIUsage sessionSlug + * @property {number|null} [stepCount] ChangeAIUsage stepCount + * @property {atomic.ChangeTokenUsage.$Properties|null} [tokens] ChangeAIUsage tokens + * @property {number|Long|null} [costMicroUsd] ChangeAIUsage costMicroUsd + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeAIUsage. + * @memberof atomic + * @interface IChangeAIUsage + * @augments atomic.ChangeAIUsage.$Properties + * @deprecated Use atomic.ChangeAIUsage.$Properties instead. + */ + + /** + * Shape of a ChangeAIUsage. + * @typedef {atomic.ChangeAIUsage.$Properties} atomic.ChangeAIUsage.$Shape + */ + + /** + * Constructs a new ChangeAIUsage. + * @memberof atomic + * @classdesc Represents a ChangeAIUsage. + * @constructor + * @param {atomic.ChangeAIUsage.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeAIUsage = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeAIUsage recordIndex. + * @member {number} recordIndex + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.recordIndex = 0; + + /** + * ChangeAIUsage vendor. + * @member {string} vendor + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.vendor = ""; + + /** + * ChangeAIUsage model. + * @member {string} model + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.model = ""; + + /** + * ChangeAIUsage modelVersion. + * @member {string|null|undefined} modelVersion + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.modelVersion = null; + + /** + * ChangeAIUsage tool. + * @member {string} tool + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.tool = ""; + + /** + * ChangeAIUsage requestId. + * @member {string|null|undefined} requestId + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.requestId = null; + + /** + * ChangeAIUsage sessionId. + * @member {string|null|undefined} sessionId + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.sessionId = null; + + /** + * ChangeAIUsage sessionSlug. + * @member {string|null|undefined} sessionSlug + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.sessionSlug = null; + + /** + * ChangeAIUsage stepCount. + * @member {number|null|undefined} stepCount + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.stepCount = null; + + /** + * ChangeAIUsage tokens. + * @member {atomic.ChangeTokenUsage.$Properties|null|undefined} tokens + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.tokens = null; + + /** + * ChangeAIUsage costMicroUsd. + * @member {number|Long|null|undefined} costMicroUsd + * @memberof atomic.ChangeAIUsage + * @instance + */ + ChangeAIUsage.prototype.costMicroUsd = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeAIUsage.prototype, "_model_version", { + get: $util.oneOfGetter($oneOfFields = ["modelVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeAIUsage.prototype, "_request_id", { + get: $util.oneOfGetter($oneOfFields = ["requestId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeAIUsage.prototype, "_session_id", { + get: $util.oneOfGetter($oneOfFields = ["sessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeAIUsage.prototype, "_session_slug", { + get: $util.oneOfGetter($oneOfFields = ["sessionSlug"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeAIUsage.prototype, "_step_count", { + get: $util.oneOfGetter($oneOfFields = ["stepCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeAIUsage.prototype, "_cost_micro_usd", { + get: $util.oneOfGetter($oneOfFields = ["costMicroUsd"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeAIUsage instance using the specified properties. + * @function create + * @memberof atomic.ChangeAIUsage + * @static + * @param {atomic.ChangeAIUsage.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeAIUsage} ChangeAIUsage instance + * @type {{ + * (properties: atomic.ChangeAIUsage.$Shape): atomic.ChangeAIUsage & atomic.ChangeAIUsage.$Shape; + * (properties?: atomic.ChangeAIUsage.$Properties): atomic.ChangeAIUsage; + * }} + */ + ChangeAIUsage.create = function(properties) { + return new ChangeAIUsage(properties); + }; + + /** + * Encodes the specified ChangeAIUsage message. Does not implicitly {@link atomic.ChangeAIUsage.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeAIUsage + * @static + * @param {atomic.ChangeAIUsage.$Properties} message ChangeAIUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeAIUsage.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.recordIndex != null && $Object.hasOwnProperty.call(message, "recordIndex") && message.recordIndex !== 0) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.recordIndex); + if (message.vendor != null && $Object.hasOwnProperty.call(message, "vendor") && message.vendor !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.vendor); + if (message.model != null && $Object.hasOwnProperty.call(message, "model") && message.model !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.model); + if (message.modelVersion != null && $Object.hasOwnProperty.call(message, "modelVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.modelVersion); + if (message.tool != null && $Object.hasOwnProperty.call(message, "tool") && message.tool !== "") + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tool); + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.requestId); + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.sessionId); + if (message.sessionSlug != null && $Object.hasOwnProperty.call(message, "sessionSlug")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.sessionSlug); + if (message.stepCount != null && $Object.hasOwnProperty.call(message, "stepCount")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.stepCount); + if (message.tokens != null && $Object.hasOwnProperty.call(message, "tokens")) + $root.atomic.ChangeTokenUsage.encode(message.tokens, writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.costMicroUsd != null && $Object.hasOwnProperty.call(message, "costMicroUsd")) + writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.costMicroUsd); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeAIUsage message, length delimited. Does not implicitly {@link atomic.ChangeAIUsage.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeAIUsage + * @static + * @param {atomic.ChangeAIUsage.$Properties} message ChangeAIUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeAIUsage.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeAIUsage message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeAIUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeAIUsage & atomic.ChangeAIUsage.$Shape} ChangeAIUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeAIUsage.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeAIUsage(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.recordIndex = value; + else + delete message.recordIndex; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.vendor = value; + else + delete message.vendor; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.model = value; + else + delete message.model; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.modelVersion = reader.stringVerify(); + message._model_version = "modelVersion"; + continue; + } + case 5: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.tool = value; + else + delete message.tool; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.requestId = reader.stringVerify(); + message._request_id = "requestId"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.sessionId = reader.stringVerify(); + message._session_id = "sessionId"; + continue; + } + case 8: { + if (wireType !== 2) + break; + message.sessionSlug = reader.stringVerify(); + message._session_slug = "sessionSlug"; + continue; + } + case 9: { + if (wireType !== 0) + break; + message.stepCount = reader.uint32(); + message._step_count = "stepCount"; + continue; + } + case 10: { + if (wireType !== 2) + break; + message.tokens = $root.atomic.ChangeTokenUsage.decode(reader, reader.size(), $undefined, _depth + 1, message.tokens); + continue; + } + case 11: { + if (wireType !== 0) + break; + message.costMicroUsd = reader.uint64(); + message._cost_micro_usd = "costMicroUsd"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeAIUsage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeAIUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeAIUsage & atomic.ChangeAIUsage.$Shape} ChangeAIUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeAIUsage.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeAIUsage message. + * @function verify + * @memberof atomic.ChangeAIUsage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeAIUsage.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.recordIndex != null && $Object.hasOwnProperty.call(message, "recordIndex")) + if (!$util.isInteger(message.recordIndex)) + return "recordIndex: integer expected"; + if (message.vendor != null && $Object.hasOwnProperty.call(message, "vendor")) + if (!$util.isString(message.vendor)) + return "vendor: string expected"; + if (message.model != null && $Object.hasOwnProperty.call(message, "model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.modelVersion != null && $Object.hasOwnProperty.call(message, "modelVersion")) { + properties._model_version = 1; + if (!$util.isString(message.modelVersion)) + return "modelVersion: string expected"; + } + if (message.tool != null && $Object.hasOwnProperty.call(message, "tool")) + if (!$util.isString(message.tool)) + return "tool: string expected"; + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) { + properties._request_id = 1; + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + } + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) { + properties._session_id = 1; + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + } + if (message.sessionSlug != null && $Object.hasOwnProperty.call(message, "sessionSlug")) { + properties._session_slug = 1; + if (!$util.isString(message.sessionSlug)) + return "sessionSlug: string expected"; + } + if (message.stepCount != null && $Object.hasOwnProperty.call(message, "stepCount")) { + properties._step_count = 1; + if (!$util.isInteger(message.stepCount)) + return "stepCount: integer expected"; + } + if (message.tokens != null && $Object.hasOwnProperty.call(message, "tokens")) { + var error = $root.atomic.ChangeTokenUsage.verify(message.tokens, _depth + 1); + if (error) + return "tokens." + error; + } + if (message.costMicroUsd != null && $Object.hasOwnProperty.call(message, "costMicroUsd")) { + properties._cost_micro_usd = 1; + if (!$util.isInteger(message.costMicroUsd) && !(message.costMicroUsd && $util.isInteger(message.costMicroUsd.low) && $util.isInteger(message.costMicroUsd.high))) + return "costMicroUsd: integer|Long expected"; + } + return null; + }; + + /** + * Creates a ChangeAIUsage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeAIUsage + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeAIUsage} ChangeAIUsage + */ + ChangeAIUsage.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeAIUsage) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeAIUsage: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeAIUsage(); + if (object.recordIndex != null) + if ($Number(object.recordIndex) !== 0) + message.recordIndex = object.recordIndex >>> 0; + if (object.vendor != null) + if (typeof object.vendor !== "string" || object.vendor.length) + message.vendor = $String(object.vendor); + if (object.model != null) + if (typeof object.model !== "string" || object.model.length) + message.model = $String(object.model); + if (object.modelVersion != null) + message.modelVersion = $String(object.modelVersion); + if (object.tool != null) + if (typeof object.tool !== "string" || object.tool.length) + message.tool = $String(object.tool); + if (object.requestId != null) + message.requestId = $String(object.requestId); + if (object.sessionId != null) + message.sessionId = $String(object.sessionId); + if (object.sessionSlug != null) + message.sessionSlug = $String(object.sessionSlug); + if (object.stepCount != null) + message.stepCount = object.stepCount >>> 0; + if (object.tokens != null) { + if (!$util.isObject(object.tokens)) + throw $TypeError(".atomic.ChangeAIUsage.tokens: object expected"); + message.tokens = $root.atomic.ChangeTokenUsage.fromObject(object.tokens, _depth + 1); + } + if (object.costMicroUsd != null) + if ($util.Long) + message.costMicroUsd = $util.Long.fromValue(object.costMicroUsd, true); + else if (typeof object.costMicroUsd === "string") + message.costMicroUsd = $parseInt(object.costMicroUsd, 10); + else if (typeof object.costMicroUsd === "number") + message.costMicroUsd = object.costMicroUsd; + else if (typeof object.costMicroUsd === "object") + message.costMicroUsd = new $util.LongBits(object.costMicroUsd.low >>> 0, object.costMicroUsd.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ChangeAIUsage message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeAIUsage + * @static + * @param {atomic.ChangeAIUsage} message ChangeAIUsage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeAIUsage.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.recordIndex = 0; + object.vendor = ""; + object.model = ""; + object.tool = ""; + object.tokens = null; + } + if (message.recordIndex != null && $Object.hasOwnProperty.call(message, "recordIndex")) + object.recordIndex = message.recordIndex; + if (message.vendor != null && $Object.hasOwnProperty.call(message, "vendor")) + object.vendor = message.vendor; + if (message.model != null && $Object.hasOwnProperty.call(message, "model")) + object.model = message.model; + if (message.modelVersion != null && $Object.hasOwnProperty.call(message, "modelVersion")) + object.modelVersion = message.modelVersion; + if (message.tool != null && $Object.hasOwnProperty.call(message, "tool")) + object.tool = message.tool; + if (message.requestId != null && $Object.hasOwnProperty.call(message, "requestId")) + object.requestId = message.requestId; + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) + object.sessionId = message.sessionId; + if (message.sessionSlug != null && $Object.hasOwnProperty.call(message, "sessionSlug")) + object.sessionSlug = message.sessionSlug; + if (message.stepCount != null && $Object.hasOwnProperty.call(message, "stepCount")) + object.stepCount = message.stepCount; + if (message.tokens != null && $Object.hasOwnProperty.call(message, "tokens")) + object.tokens = $root.atomic.ChangeTokenUsage.toObject(message.tokens, options, _depth + 1); + if (message.costMicroUsd != null && $Object.hasOwnProperty.call(message, "costMicroUsd")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.costMicroUsd = typeof message.costMicroUsd === "number" ? $BigInt(message.costMicroUsd) : $util.Long.fromBits(message.costMicroUsd.low >>> 0, message.costMicroUsd.high >>> 0, true).toBigInt(); + else if (typeof message.costMicroUsd === "number") + object.costMicroUsd = options.longs === $String ? $String(message.costMicroUsd) : message.costMicroUsd; + else + object.costMicroUsd = options.longs === $String ? $util.Long.prototype.toString.call(message.costMicroUsd) : options.longs === $Number ? new $util.LongBits(message.costMicroUsd.low >>> 0, message.costMicroUsd.high >>> 0).toNumber(true) : message.costMicroUsd; + return object; + }; + + /** + * Converts this ChangeAIUsage to JSON. + * @function toJSON + * @memberof atomic.ChangeAIUsage + * @instance + * @returns {Object.} JSON object + */ + ChangeAIUsage.prototype.toJSON = function() { + return ChangeAIUsage.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeAIUsage + * @function getTypeUrl + * @memberof atomic.ChangeAIUsage + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeAIUsage.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeAIUsage"; + }; + + return ChangeAIUsage; + })(); + + atomic.ChangeTokenUsage = (function() { + + /** + * Properties of a ChangeTokenUsage. + * @typedef {Object} atomic.ChangeTokenUsage.$Properties + * @property {number|Long|null} [inputTokens] ChangeTokenUsage inputTokens + * @property {number|Long|null} [outputTokens] ChangeTokenUsage outputTokens + * @property {number|Long|null} [totalTokens] ChangeTokenUsage totalTokens + * @property {number|Long|null} [cacheReadTokens] ChangeTokenUsage cacheReadTokens + * @property {number|Long|null} [cacheWriteTokens] ChangeTokenUsage cacheWriteTokens + * @property {number|Long|null} [reasoningTokens] ChangeTokenUsage reasoningTokens + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeTokenUsage. + * @memberof atomic + * @interface IChangeTokenUsage + * @augments atomic.ChangeTokenUsage.$Properties + * @deprecated Use atomic.ChangeTokenUsage.$Properties instead. + */ + + /** + * Shape of a ChangeTokenUsage. + * @typedef {atomic.ChangeTokenUsage.$Properties} atomic.ChangeTokenUsage.$Shape + */ + + /** + * Constructs a new ChangeTokenUsage. + * @memberof atomic + * @classdesc Represents a ChangeTokenUsage. + * @constructor + * @param {atomic.ChangeTokenUsage.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeTokenUsage = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeTokenUsage inputTokens. + * @member {number|Long} inputTokens + * @memberof atomic.ChangeTokenUsage + * @instance + */ + ChangeTokenUsage.prototype.inputTokens = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeTokenUsage outputTokens. + * @member {number|Long} outputTokens + * @memberof atomic.ChangeTokenUsage + * @instance + */ + ChangeTokenUsage.prototype.outputTokens = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeTokenUsage totalTokens. + * @member {number|Long} totalTokens + * @memberof atomic.ChangeTokenUsage + * @instance + */ + ChangeTokenUsage.prototype.totalTokens = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeTokenUsage cacheReadTokens. + * @member {number|Long} cacheReadTokens + * @memberof atomic.ChangeTokenUsage + * @instance + */ + ChangeTokenUsage.prototype.cacheReadTokens = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeTokenUsage cacheWriteTokens. + * @member {number|Long} cacheWriteTokens + * @memberof atomic.ChangeTokenUsage + * @instance + */ + ChangeTokenUsage.prototype.cacheWriteTokens = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeTokenUsage reasoningTokens. + * @member {number|Long} reasoningTokens + * @memberof atomic.ChangeTokenUsage + * @instance + */ + ChangeTokenUsage.prototype.reasoningTokens = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new ChangeTokenUsage instance using the specified properties. + * @function create + * @memberof atomic.ChangeTokenUsage + * @static + * @param {atomic.ChangeTokenUsage.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeTokenUsage} ChangeTokenUsage instance + * @type {{ + * (properties: atomic.ChangeTokenUsage.$Shape): atomic.ChangeTokenUsage & atomic.ChangeTokenUsage.$Shape; + * (properties?: atomic.ChangeTokenUsage.$Properties): atomic.ChangeTokenUsage; + * }} + */ + ChangeTokenUsage.create = function(properties) { + return new ChangeTokenUsage(properties); + }; + + /** + * Encodes the specified ChangeTokenUsage message. Does not implicitly {@link atomic.ChangeTokenUsage.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeTokenUsage + * @static + * @param {atomic.ChangeTokenUsage.$Properties} message ChangeTokenUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeTokenUsage.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.inputTokens != null && $Object.hasOwnProperty.call(message, "inputTokens") && (typeof message.inputTokens === "object" ? message.inputTokens.low || message.inputTokens.high : message.inputTokens !== 0)) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.inputTokens); + if (message.outputTokens != null && $Object.hasOwnProperty.call(message, "outputTokens") && (typeof message.outputTokens === "object" ? message.outputTokens.low || message.outputTokens.high : message.outputTokens !== 0)) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.outputTokens); + if (message.totalTokens != null && $Object.hasOwnProperty.call(message, "totalTokens") && (typeof message.totalTokens === "object" ? message.totalTokens.low || message.totalTokens.high : message.totalTokens !== 0)) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.totalTokens); + if (message.cacheReadTokens != null && $Object.hasOwnProperty.call(message, "cacheReadTokens") && (typeof message.cacheReadTokens === "object" ? message.cacheReadTokens.low || message.cacheReadTokens.high : message.cacheReadTokens !== 0)) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.cacheReadTokens); + if (message.cacheWriteTokens != null && $Object.hasOwnProperty.call(message, "cacheWriteTokens") && (typeof message.cacheWriteTokens === "object" ? message.cacheWriteTokens.low || message.cacheWriteTokens.high : message.cacheWriteTokens !== 0)) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.cacheWriteTokens); + if (message.reasoningTokens != null && $Object.hasOwnProperty.call(message, "reasoningTokens") && (typeof message.reasoningTokens === "object" ? message.reasoningTokens.low || message.reasoningTokens.high : message.reasoningTokens !== 0)) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.reasoningTokens); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeTokenUsage message, length delimited. Does not implicitly {@link atomic.ChangeTokenUsage.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeTokenUsage + * @static + * @param {atomic.ChangeTokenUsage.$Properties} message ChangeTokenUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeTokenUsage.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeTokenUsage message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeTokenUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeTokenUsage & atomic.ChangeTokenUsage.$Shape} ChangeTokenUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeTokenUsage.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeTokenUsage(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.inputTokens = value; + else + delete message.inputTokens; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.outputTokens = value; + else + delete message.outputTokens; + continue; + } + case 3: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.totalTokens = value; + else + delete message.totalTokens; + continue; + } + case 4: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.cacheReadTokens = value; + else + delete message.cacheReadTokens; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.cacheWriteTokens = value; + else + delete message.cacheWriteTokens; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.reasoningTokens = value; + else + delete message.reasoningTokens; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeTokenUsage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeTokenUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeTokenUsage & atomic.ChangeTokenUsage.$Shape} ChangeTokenUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeTokenUsage.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeTokenUsage message. + * @function verify + * @memberof atomic.ChangeTokenUsage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeTokenUsage.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.inputTokens != null && $Object.hasOwnProperty.call(message, "inputTokens")) + if (!$util.isInteger(message.inputTokens) && !(message.inputTokens && $util.isInteger(message.inputTokens.low) && $util.isInteger(message.inputTokens.high))) + return "inputTokens: integer|Long expected"; + if (message.outputTokens != null && $Object.hasOwnProperty.call(message, "outputTokens")) + if (!$util.isInteger(message.outputTokens) && !(message.outputTokens && $util.isInteger(message.outputTokens.low) && $util.isInteger(message.outputTokens.high))) + return "outputTokens: integer|Long expected"; + if (message.totalTokens != null && $Object.hasOwnProperty.call(message, "totalTokens")) + if (!$util.isInteger(message.totalTokens) && !(message.totalTokens && $util.isInteger(message.totalTokens.low) && $util.isInteger(message.totalTokens.high))) + return "totalTokens: integer|Long expected"; + if (message.cacheReadTokens != null && $Object.hasOwnProperty.call(message, "cacheReadTokens")) + if (!$util.isInteger(message.cacheReadTokens) && !(message.cacheReadTokens && $util.isInteger(message.cacheReadTokens.low) && $util.isInteger(message.cacheReadTokens.high))) + return "cacheReadTokens: integer|Long expected"; + if (message.cacheWriteTokens != null && $Object.hasOwnProperty.call(message, "cacheWriteTokens")) + if (!$util.isInteger(message.cacheWriteTokens) && !(message.cacheWriteTokens && $util.isInteger(message.cacheWriteTokens.low) && $util.isInteger(message.cacheWriteTokens.high))) + return "cacheWriteTokens: integer|Long expected"; + if (message.reasoningTokens != null && $Object.hasOwnProperty.call(message, "reasoningTokens")) + if (!$util.isInteger(message.reasoningTokens) && !(message.reasoningTokens && $util.isInteger(message.reasoningTokens.low) && $util.isInteger(message.reasoningTokens.high))) + return "reasoningTokens: integer|Long expected"; + return null; + }; + + /** + * Creates a ChangeTokenUsage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeTokenUsage + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeTokenUsage} ChangeTokenUsage + */ + ChangeTokenUsage.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeTokenUsage) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeTokenUsage: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeTokenUsage(); + if (object.inputTokens != null) + if (typeof object.inputTokens === "object" ? object.inputTokens.low || object.inputTokens.high : $Number(object.inputTokens) !== 0) + if ($util.Long) + message.inputTokens = $util.Long.fromValue(object.inputTokens, true); + else if (typeof object.inputTokens === "string") + message.inputTokens = $parseInt(object.inputTokens, 10); + else if (typeof object.inputTokens === "number") + message.inputTokens = object.inputTokens; + else if (typeof object.inputTokens === "object") + message.inputTokens = new $util.LongBits(object.inputTokens.low >>> 0, object.inputTokens.high >>> 0).toNumber(true); + if (object.outputTokens != null) + if (typeof object.outputTokens === "object" ? object.outputTokens.low || object.outputTokens.high : $Number(object.outputTokens) !== 0) + if ($util.Long) + message.outputTokens = $util.Long.fromValue(object.outputTokens, true); + else if (typeof object.outputTokens === "string") + message.outputTokens = $parseInt(object.outputTokens, 10); + else if (typeof object.outputTokens === "number") + message.outputTokens = object.outputTokens; + else if (typeof object.outputTokens === "object") + message.outputTokens = new $util.LongBits(object.outputTokens.low >>> 0, object.outputTokens.high >>> 0).toNumber(true); + if (object.totalTokens != null) + if (typeof object.totalTokens === "object" ? object.totalTokens.low || object.totalTokens.high : $Number(object.totalTokens) !== 0) + if ($util.Long) + message.totalTokens = $util.Long.fromValue(object.totalTokens, true); + else if (typeof object.totalTokens === "string") + message.totalTokens = $parseInt(object.totalTokens, 10); + else if (typeof object.totalTokens === "number") + message.totalTokens = object.totalTokens; + else if (typeof object.totalTokens === "object") + message.totalTokens = new $util.LongBits(object.totalTokens.low >>> 0, object.totalTokens.high >>> 0).toNumber(true); + if (object.cacheReadTokens != null) + if (typeof object.cacheReadTokens === "object" ? object.cacheReadTokens.low || object.cacheReadTokens.high : $Number(object.cacheReadTokens) !== 0) + if ($util.Long) + message.cacheReadTokens = $util.Long.fromValue(object.cacheReadTokens, true); + else if (typeof object.cacheReadTokens === "string") + message.cacheReadTokens = $parseInt(object.cacheReadTokens, 10); + else if (typeof object.cacheReadTokens === "number") + message.cacheReadTokens = object.cacheReadTokens; + else if (typeof object.cacheReadTokens === "object") + message.cacheReadTokens = new $util.LongBits(object.cacheReadTokens.low >>> 0, object.cacheReadTokens.high >>> 0).toNumber(true); + if (object.cacheWriteTokens != null) + if (typeof object.cacheWriteTokens === "object" ? object.cacheWriteTokens.low || object.cacheWriteTokens.high : $Number(object.cacheWriteTokens) !== 0) + if ($util.Long) + message.cacheWriteTokens = $util.Long.fromValue(object.cacheWriteTokens, true); + else if (typeof object.cacheWriteTokens === "string") + message.cacheWriteTokens = $parseInt(object.cacheWriteTokens, 10); + else if (typeof object.cacheWriteTokens === "number") + message.cacheWriteTokens = object.cacheWriteTokens; + else if (typeof object.cacheWriteTokens === "object") + message.cacheWriteTokens = new $util.LongBits(object.cacheWriteTokens.low >>> 0, object.cacheWriteTokens.high >>> 0).toNumber(true); + if (object.reasoningTokens != null) + if (typeof object.reasoningTokens === "object" ? object.reasoningTokens.low || object.reasoningTokens.high : $Number(object.reasoningTokens) !== 0) + if ($util.Long) + message.reasoningTokens = $util.Long.fromValue(object.reasoningTokens, true); + else if (typeof object.reasoningTokens === "string") + message.reasoningTokens = $parseInt(object.reasoningTokens, 10); + else if (typeof object.reasoningTokens === "number") + message.reasoningTokens = object.reasoningTokens; + else if (typeof object.reasoningTokens === "object") + message.reasoningTokens = new $util.LongBits(object.reasoningTokens.low >>> 0, object.reasoningTokens.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ChangeTokenUsage message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeTokenUsage + * @static + * @param {atomic.ChangeTokenUsage} message ChangeTokenUsage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeTokenUsage.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.inputTokens = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.inputTokens = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.outputTokens = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.outputTokens = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.totalTokens = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.totalTokens = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.cacheReadTokens = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.cacheReadTokens = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.cacheWriteTokens = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.cacheWriteTokens = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.reasoningTokens = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.reasoningTokens = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + if (message.inputTokens != null && $Object.hasOwnProperty.call(message, "inputTokens")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.inputTokens = typeof message.inputTokens === "number" ? $BigInt(message.inputTokens) : $util.Long.fromBits(message.inputTokens.low >>> 0, message.inputTokens.high >>> 0, true).toBigInt(); + else if (typeof message.inputTokens === "number") + object.inputTokens = options.longs === $String ? $String(message.inputTokens) : message.inputTokens; + else + object.inputTokens = options.longs === $String ? $util.Long.prototype.toString.call(message.inputTokens) : options.longs === $Number ? new $util.LongBits(message.inputTokens.low >>> 0, message.inputTokens.high >>> 0).toNumber(true) : message.inputTokens; + if (message.outputTokens != null && $Object.hasOwnProperty.call(message, "outputTokens")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.outputTokens = typeof message.outputTokens === "number" ? $BigInt(message.outputTokens) : $util.Long.fromBits(message.outputTokens.low >>> 0, message.outputTokens.high >>> 0, true).toBigInt(); + else if (typeof message.outputTokens === "number") + object.outputTokens = options.longs === $String ? $String(message.outputTokens) : message.outputTokens; + else + object.outputTokens = options.longs === $String ? $util.Long.prototype.toString.call(message.outputTokens) : options.longs === $Number ? new $util.LongBits(message.outputTokens.low >>> 0, message.outputTokens.high >>> 0).toNumber(true) : message.outputTokens; + if (message.totalTokens != null && $Object.hasOwnProperty.call(message, "totalTokens")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.totalTokens = typeof message.totalTokens === "number" ? $BigInt(message.totalTokens) : $util.Long.fromBits(message.totalTokens.low >>> 0, message.totalTokens.high >>> 0, true).toBigInt(); + else if (typeof message.totalTokens === "number") + object.totalTokens = options.longs === $String ? $String(message.totalTokens) : message.totalTokens; + else + object.totalTokens = options.longs === $String ? $util.Long.prototype.toString.call(message.totalTokens) : options.longs === $Number ? new $util.LongBits(message.totalTokens.low >>> 0, message.totalTokens.high >>> 0).toNumber(true) : message.totalTokens; + if (message.cacheReadTokens != null && $Object.hasOwnProperty.call(message, "cacheReadTokens")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cacheReadTokens = typeof message.cacheReadTokens === "number" ? $BigInt(message.cacheReadTokens) : $util.Long.fromBits(message.cacheReadTokens.low >>> 0, message.cacheReadTokens.high >>> 0, true).toBigInt(); + else if (typeof message.cacheReadTokens === "number") + object.cacheReadTokens = options.longs === $String ? $String(message.cacheReadTokens) : message.cacheReadTokens; + else + object.cacheReadTokens = options.longs === $String ? $util.Long.prototype.toString.call(message.cacheReadTokens) : options.longs === $Number ? new $util.LongBits(message.cacheReadTokens.low >>> 0, message.cacheReadTokens.high >>> 0).toNumber(true) : message.cacheReadTokens; + if (message.cacheWriteTokens != null && $Object.hasOwnProperty.call(message, "cacheWriteTokens")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.cacheWriteTokens = typeof message.cacheWriteTokens === "number" ? $BigInt(message.cacheWriteTokens) : $util.Long.fromBits(message.cacheWriteTokens.low >>> 0, message.cacheWriteTokens.high >>> 0, true).toBigInt(); + else if (typeof message.cacheWriteTokens === "number") + object.cacheWriteTokens = options.longs === $String ? $String(message.cacheWriteTokens) : message.cacheWriteTokens; + else + object.cacheWriteTokens = options.longs === $String ? $util.Long.prototype.toString.call(message.cacheWriteTokens) : options.longs === $Number ? new $util.LongBits(message.cacheWriteTokens.low >>> 0, message.cacheWriteTokens.high >>> 0).toNumber(true) : message.cacheWriteTokens; + if (message.reasoningTokens != null && $Object.hasOwnProperty.call(message, "reasoningTokens")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.reasoningTokens = typeof message.reasoningTokens === "number" ? $BigInt(message.reasoningTokens) : $util.Long.fromBits(message.reasoningTokens.low >>> 0, message.reasoningTokens.high >>> 0, true).toBigInt(); + else if (typeof message.reasoningTokens === "number") + object.reasoningTokens = options.longs === $String ? $String(message.reasoningTokens) : message.reasoningTokens; + else + object.reasoningTokens = options.longs === $String ? $util.Long.prototype.toString.call(message.reasoningTokens) : options.longs === $Number ? new $util.LongBits(message.reasoningTokens.low >>> 0, message.reasoningTokens.high >>> 0).toNumber(true) : message.reasoningTokens; + return object; + }; + + /** + * Converts this ChangeTokenUsage to JSON. + * @function toJSON + * @memberof atomic.ChangeTokenUsage + * @instance + * @returns {Object.} JSON object + */ + ChangeTokenUsage.prototype.toJSON = function() { + return ChangeTokenUsage.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeTokenUsage + * @function getTypeUrl + * @memberof atomic.ChangeTokenUsage + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeTokenUsage.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeTokenUsage"; + }; + + return ChangeTokenUsage; + })(); + + atomic.ChangeGraphSummary = (function() { + + /** + * Properties of a ChangeGraphSummary. + * @typedef {Object} atomic.ChangeGraphSummary.$Properties + * @property {number|Long|null} [verticesAdded] ChangeGraphSummary verticesAdded + * @property {number|Long|null} [edgesChanged] ChangeGraphSummary edgesChanged + * @property {number|Long|null} [contentBytes] ChangeGraphSummary contentBytes + * @property {number|Long|null} [filesChanged] ChangeGraphSummary filesChanged + * @property {Array.|null} [files] ChangeGraphSummary files + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeGraphSummary. + * @memberof atomic + * @interface IChangeGraphSummary + * @augments atomic.ChangeGraphSummary.$Properties + * @deprecated Use atomic.ChangeGraphSummary.$Properties instead. + */ + + /** + * Shape of a ChangeGraphSummary. + * @typedef {atomic.ChangeGraphSummary.$Properties} atomic.ChangeGraphSummary.$Shape + */ + + /** + * Constructs a new ChangeGraphSummary. + * @memberof atomic + * @classdesc Represents a ChangeGraphSummary. + * @constructor + * @param {atomic.ChangeGraphSummary.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeGraphSummary = function (properties) { + this.files = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeGraphSummary verticesAdded. + * @member {number|Long} verticesAdded + * @memberof atomic.ChangeGraphSummary + * @instance + */ + ChangeGraphSummary.prototype.verticesAdded = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeGraphSummary edgesChanged. + * @member {number|Long} edgesChanged + * @memberof atomic.ChangeGraphSummary + * @instance + */ + ChangeGraphSummary.prototype.edgesChanged = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeGraphSummary contentBytes. + * @member {number|Long} contentBytes + * @memberof atomic.ChangeGraphSummary + * @instance + */ + ChangeGraphSummary.prototype.contentBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeGraphSummary filesChanged. + * @member {number|Long} filesChanged + * @memberof atomic.ChangeGraphSummary + * @instance + */ + ChangeGraphSummary.prototype.filesChanged = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ChangeGraphSummary files. + * @member {Array.} files + * @memberof atomic.ChangeGraphSummary + * @instance + */ + ChangeGraphSummary.prototype.files = $util.emptyArray; + + /** + * Creates a new ChangeGraphSummary instance using the specified properties. + * @function create + * @memberof atomic.ChangeGraphSummary + * @static + * @param {atomic.ChangeGraphSummary.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeGraphSummary} ChangeGraphSummary instance + * @type {{ + * (properties: atomic.ChangeGraphSummary.$Shape): atomic.ChangeGraphSummary & atomic.ChangeGraphSummary.$Shape; + * (properties?: atomic.ChangeGraphSummary.$Properties): atomic.ChangeGraphSummary; + * }} + */ + ChangeGraphSummary.create = function(properties) { + return new ChangeGraphSummary(properties); + }; + + /** + * Encodes the specified ChangeGraphSummary message. Does not implicitly {@link atomic.ChangeGraphSummary.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeGraphSummary + * @static + * @param {atomic.ChangeGraphSummary.$Properties} message ChangeGraphSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeGraphSummary.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.verticesAdded != null && $Object.hasOwnProperty.call(message, "verticesAdded") && (typeof message.verticesAdded === "object" ? message.verticesAdded.low || message.verticesAdded.high : message.verticesAdded !== 0)) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.verticesAdded); + if (message.edgesChanged != null && $Object.hasOwnProperty.call(message, "edgesChanged") && (typeof message.edgesChanged === "object" ? message.edgesChanged.low || message.edgesChanged.high : message.edgesChanged !== 0)) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.edgesChanged); + if (message.contentBytes != null && $Object.hasOwnProperty.call(message, "contentBytes") && (typeof message.contentBytes === "object" ? message.contentBytes.low || message.contentBytes.high : message.contentBytes !== 0)) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.contentBytes); + if (message.filesChanged != null && $Object.hasOwnProperty.call(message, "filesChanged") && (typeof message.filesChanged === "object" ? message.filesChanged.low || message.filesChanged.high : message.filesChanged !== 0)) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.filesChanged); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.atomic.ChangeFileSummary.encode(message.files[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeGraphSummary message, length delimited. Does not implicitly {@link atomic.ChangeGraphSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeGraphSummary + * @static + * @param {atomic.ChangeGraphSummary.$Properties} message ChangeGraphSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeGraphSummary.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeGraphSummary message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeGraphSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeGraphSummary & atomic.ChangeGraphSummary.$Shape} ChangeGraphSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeGraphSummary.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeGraphSummary(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.verticesAdded = value; + else + delete message.verticesAdded; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.edgesChanged = value; + else + delete message.edgesChanged; + continue; + } + case 3: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.contentBytes = value; + else + delete message.contentBytes; + continue; + } + case 4: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.filesChanged = value; + else + delete message.filesChanged; + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.atomic.ChangeFileSummary.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeGraphSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeGraphSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeGraphSummary & atomic.ChangeGraphSummary.$Shape} ChangeGraphSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeGraphSummary.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeGraphSummary message. + * @function verify + * @memberof atomic.ChangeGraphSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeGraphSummary.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.verticesAdded != null && $Object.hasOwnProperty.call(message, "verticesAdded")) + if (!$util.isInteger(message.verticesAdded) && !(message.verticesAdded && $util.isInteger(message.verticesAdded.low) && $util.isInteger(message.verticesAdded.high))) + return "verticesAdded: integer|Long expected"; + if (message.edgesChanged != null && $Object.hasOwnProperty.call(message, "edgesChanged")) + if (!$util.isInteger(message.edgesChanged) && !(message.edgesChanged && $util.isInteger(message.edgesChanged.low) && $util.isInteger(message.edgesChanged.high))) + return "edgesChanged: integer|Long expected"; + if (message.contentBytes != null && $Object.hasOwnProperty.call(message, "contentBytes")) + if (!$util.isInteger(message.contentBytes) && !(message.contentBytes && $util.isInteger(message.contentBytes.low) && $util.isInteger(message.contentBytes.high))) + return "contentBytes: integer|Long expected"; + if (message.filesChanged != null && $Object.hasOwnProperty.call(message, "filesChanged")) + if (!$util.isInteger(message.filesChanged) && !(message.filesChanged && $util.isInteger(message.filesChanged.low) && $util.isInteger(message.filesChanged.high))) + return "filesChanged: integer|Long expected"; + if (message.files != null && $Object.hasOwnProperty.call(message, "files")) { + if (!$Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) { + var error = $root.atomic.ChangeFileSummary.verify(message.files[i], _depth + 1); + if (error) + return "files." + error; + } + } + return null; + }; + + /** + * Creates a ChangeGraphSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeGraphSummary + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeGraphSummary} ChangeGraphSummary + */ + ChangeGraphSummary.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeGraphSummary) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeGraphSummary: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeGraphSummary(); + if (object.verticesAdded != null) + if (typeof object.verticesAdded === "object" ? object.verticesAdded.low || object.verticesAdded.high : $Number(object.verticesAdded) !== 0) + if ($util.Long) + message.verticesAdded = $util.Long.fromValue(object.verticesAdded, true); + else if (typeof object.verticesAdded === "string") + message.verticesAdded = $parseInt(object.verticesAdded, 10); + else if (typeof object.verticesAdded === "number") + message.verticesAdded = object.verticesAdded; + else if (typeof object.verticesAdded === "object") + message.verticesAdded = new $util.LongBits(object.verticesAdded.low >>> 0, object.verticesAdded.high >>> 0).toNumber(true); + if (object.edgesChanged != null) + if (typeof object.edgesChanged === "object" ? object.edgesChanged.low || object.edgesChanged.high : $Number(object.edgesChanged) !== 0) + if ($util.Long) + message.edgesChanged = $util.Long.fromValue(object.edgesChanged, true); + else if (typeof object.edgesChanged === "string") + message.edgesChanged = $parseInt(object.edgesChanged, 10); + else if (typeof object.edgesChanged === "number") + message.edgesChanged = object.edgesChanged; + else if (typeof object.edgesChanged === "object") + message.edgesChanged = new $util.LongBits(object.edgesChanged.low >>> 0, object.edgesChanged.high >>> 0).toNumber(true); + if (object.contentBytes != null) + if (typeof object.contentBytes === "object" ? object.contentBytes.low || object.contentBytes.high : $Number(object.contentBytes) !== 0) + if ($util.Long) + message.contentBytes = $util.Long.fromValue(object.contentBytes, true); + else if (typeof object.contentBytes === "string") + message.contentBytes = $parseInt(object.contentBytes, 10); + else if (typeof object.contentBytes === "number") + message.contentBytes = object.contentBytes; + else if (typeof object.contentBytes === "object") + message.contentBytes = new $util.LongBits(object.contentBytes.low >>> 0, object.contentBytes.high >>> 0).toNumber(true); + if (object.filesChanged != null) + if (typeof object.filesChanged === "object" ? object.filesChanged.low || object.filesChanged.high : $Number(object.filesChanged) !== 0) + if ($util.Long) + message.filesChanged = $util.Long.fromValue(object.filesChanged, true); + else if (typeof object.filesChanged === "string") + message.filesChanged = $parseInt(object.filesChanged, 10); + else if (typeof object.filesChanged === "number") + message.filesChanged = object.filesChanged; + else if (typeof object.filesChanged === "object") + message.filesChanged = new $util.LongBits(object.filesChanged.low >>> 0, object.filesChanged.high >>> 0).toNumber(true); + if (object.files) { + if (!$Array.isArray(object.files)) + throw $TypeError(".atomic.ChangeGraphSummary.files: array expected"); + message.files = $Array(object.files.length); + for (var i = 0; i < object.files.length; ++i) { + if (!$util.isObject(object.files[i])) + throw $TypeError(".atomic.ChangeGraphSummary.files: object expected"); + message.files[i] = $root.atomic.ChangeFileSummary.fromObject(object.files[i], _depth + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ChangeGraphSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeGraphSummary + * @static + * @param {atomic.ChangeGraphSummary} message ChangeGraphSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeGraphSummary.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.verticesAdded = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.verticesAdded = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.edgesChanged = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.edgesChanged = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.contentBytes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.contentBytes = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.filesChanged = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.filesChanged = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + if (message.verticesAdded != null && $Object.hasOwnProperty.call(message, "verticesAdded")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.verticesAdded = typeof message.verticesAdded === "number" ? $BigInt(message.verticesAdded) : $util.Long.fromBits(message.verticesAdded.low >>> 0, message.verticesAdded.high >>> 0, true).toBigInt(); + else if (typeof message.verticesAdded === "number") + object.verticesAdded = options.longs === $String ? $String(message.verticesAdded) : message.verticesAdded; + else + object.verticesAdded = options.longs === $String ? $util.Long.prototype.toString.call(message.verticesAdded) : options.longs === $Number ? new $util.LongBits(message.verticesAdded.low >>> 0, message.verticesAdded.high >>> 0).toNumber(true) : message.verticesAdded; + if (message.edgesChanged != null && $Object.hasOwnProperty.call(message, "edgesChanged")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.edgesChanged = typeof message.edgesChanged === "number" ? $BigInt(message.edgesChanged) : $util.Long.fromBits(message.edgesChanged.low >>> 0, message.edgesChanged.high >>> 0, true).toBigInt(); + else if (typeof message.edgesChanged === "number") + object.edgesChanged = options.longs === $String ? $String(message.edgesChanged) : message.edgesChanged; + else + object.edgesChanged = options.longs === $String ? $util.Long.prototype.toString.call(message.edgesChanged) : options.longs === $Number ? new $util.LongBits(message.edgesChanged.low >>> 0, message.edgesChanged.high >>> 0).toNumber(true) : message.edgesChanged; + if (message.contentBytes != null && $Object.hasOwnProperty.call(message, "contentBytes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.contentBytes = typeof message.contentBytes === "number" ? $BigInt(message.contentBytes) : $util.Long.fromBits(message.contentBytes.low >>> 0, message.contentBytes.high >>> 0, true).toBigInt(); + else if (typeof message.contentBytes === "number") + object.contentBytes = options.longs === $String ? $String(message.contentBytes) : message.contentBytes; + else + object.contentBytes = options.longs === $String ? $util.Long.prototype.toString.call(message.contentBytes) : options.longs === $Number ? new $util.LongBits(message.contentBytes.low >>> 0, message.contentBytes.high >>> 0).toNumber(true) : message.contentBytes; + if (message.filesChanged != null && $Object.hasOwnProperty.call(message, "filesChanged")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.filesChanged = typeof message.filesChanged === "number" ? $BigInt(message.filesChanged) : $util.Long.fromBits(message.filesChanged.low >>> 0, message.filesChanged.high >>> 0, true).toBigInt(); + else if (typeof message.filesChanged === "number") + object.filesChanged = options.longs === $String ? $String(message.filesChanged) : message.filesChanged; + else + object.filesChanged = options.longs === $String ? $util.Long.prototype.toString.call(message.filesChanged) : options.longs === $Number ? new $util.LongBits(message.filesChanged.low >>> 0, message.filesChanged.high >>> 0).toNumber(true) : message.filesChanged; + if (message.files && message.files.length) { + object.files = $Array(message.files.length); + for (var j = 0; j < message.files.length; ++j) + object.files[j] = $root.atomic.ChangeFileSummary.toObject(message.files[j], options, _depth + 1); + } + return object; + }; + + /** + * Converts this ChangeGraphSummary to JSON. + * @function toJSON + * @memberof atomic.ChangeGraphSummary + * @instance + * @returns {Object.} JSON object + */ + ChangeGraphSummary.prototype.toJSON = function() { + return ChangeGraphSummary.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeGraphSummary + * @function getTypeUrl + * @memberof atomic.ChangeGraphSummary + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeGraphSummary.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeGraphSummary"; + }; + + return ChangeGraphSummary; + })(); + + atomic.ChangeFileSummary = (function() { + + /** + * Properties of a ChangeFileSummary. + * @typedef {Object} atomic.ChangeFileSummary.$Properties + * @property {string|null} [symbol] ChangeFileSummary symbol + * @property {string|null} [path] ChangeFileSummary path + * @property {string|null} [info] ChangeFileSummary info + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeFileSummary. + * @memberof atomic + * @interface IChangeFileSummary + * @augments atomic.ChangeFileSummary.$Properties + * @deprecated Use atomic.ChangeFileSummary.$Properties instead. + */ + + /** + * Shape of a ChangeFileSummary. + * @typedef {atomic.ChangeFileSummary.$Properties} atomic.ChangeFileSummary.$Shape + */ + + /** + * Constructs a new ChangeFileSummary. + * @memberof atomic + * @classdesc Represents a ChangeFileSummary. + * @constructor + * @param {atomic.ChangeFileSummary.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeFileSummary = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeFileSummary symbol. + * @member {string} symbol + * @memberof atomic.ChangeFileSummary + * @instance + */ + ChangeFileSummary.prototype.symbol = ""; + + /** + * ChangeFileSummary path. + * @member {string} path + * @memberof atomic.ChangeFileSummary + * @instance + */ + ChangeFileSummary.prototype.path = ""; + + /** + * ChangeFileSummary info. + * @member {string} info + * @memberof atomic.ChangeFileSummary + * @instance + */ + ChangeFileSummary.prototype.info = ""; + + /** + * Creates a new ChangeFileSummary instance using the specified properties. + * @function create + * @memberof atomic.ChangeFileSummary + * @static + * @param {atomic.ChangeFileSummary.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeFileSummary} ChangeFileSummary instance + * @type {{ + * (properties: atomic.ChangeFileSummary.$Shape): atomic.ChangeFileSummary & atomic.ChangeFileSummary.$Shape; + * (properties?: atomic.ChangeFileSummary.$Properties): atomic.ChangeFileSummary; + * }} + */ + ChangeFileSummary.create = function(properties) { + return new ChangeFileSummary(properties); + }; + + /** + * Encodes the specified ChangeFileSummary message. Does not implicitly {@link atomic.ChangeFileSummary.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeFileSummary + * @static + * @param {atomic.ChangeFileSummary.$Properties} message ChangeFileSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeFileSummary.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.symbol != null && $Object.hasOwnProperty.call(message, "symbol") && message.symbol !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.symbol); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.info != null && $Object.hasOwnProperty.call(message, "info") && message.info !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.info); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeFileSummary message, length delimited. Does not implicitly {@link atomic.ChangeFileSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeFileSummary + * @static + * @param {atomic.ChangeFileSummary.$Properties} message ChangeFileSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeFileSummary.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeFileSummary message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeFileSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeFileSummary & atomic.ChangeFileSummary.$Shape} ChangeFileSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeFileSummary.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeFileSummary(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.symbol = value; + else + delete message.symbol; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.info = value; + else + delete message.info; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeFileSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeFileSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeFileSummary & atomic.ChangeFileSummary.$Shape} ChangeFileSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeFileSummary.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeFileSummary message. + * @function verify + * @memberof atomic.ChangeFileSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeFileSummary.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.symbol != null && $Object.hasOwnProperty.call(message, "symbol")) + if (!$util.isString(message.symbol)) + return "symbol: string expected"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.info != null && $Object.hasOwnProperty.call(message, "info")) + if (!$util.isString(message.info)) + return "info: string expected"; + return null; + }; + + /** + * Creates a ChangeFileSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeFileSummary + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeFileSummary} ChangeFileSummary + */ + ChangeFileSummary.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeFileSummary) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeFileSummary: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeFileSummary(); + if (object.symbol != null) + if (typeof object.symbol !== "string" || object.symbol.length) + message.symbol = $String(object.symbol); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + if (object.info != null) + if (typeof object.info !== "string" || object.info.length) + message.info = $String(object.info); + return message; + }; + + /** + * Creates a plain object from a ChangeFileSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeFileSummary + * @static + * @param {atomic.ChangeFileSummary} message ChangeFileSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeFileSummary.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.symbol = ""; + object.path = ""; + object.info = ""; + } + if (message.symbol != null && $Object.hasOwnProperty.call(message, "symbol")) + object.symbol = message.symbol; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.info != null && $Object.hasOwnProperty.call(message, "info")) + object.info = message.info; + return object; + }; + + /** + * Converts this ChangeFileSummary to JSON. + * @function toJSON + * @memberof atomic.ChangeFileSummary + * @instance + * @returns {Object.} JSON object + */ + ChangeFileSummary.prototype.toJSON = function() { + return ChangeFileSummary.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeFileSummary + * @function getTypeUrl + * @memberof atomic.ChangeFileSummary + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeFileSummary.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeFileSummary"; + }; + + return ChangeFileSummary; + })(); + + atomic.ChangeBlastRadius = (function() { + + /** + * Properties of a ChangeBlastRadius. + * @typedef {Object} atomic.ChangeBlastRadius.$Properties + * @property {atomic.Hash.$Properties|null} [changeHash] ChangeBlastRadius changeHash + * @property {string|null} [mode] ChangeBlastRadius mode + * @property {Array.|null} [files] ChangeBlastRadius files + * @property {Array.|null} [edges] ChangeBlastRadius edges + * @property {Array.|null} [warnings] ChangeBlastRadius warnings + * @property {string|null} [context] ChangeBlastRadius context + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeBlastRadius. + * @memberof atomic + * @interface IChangeBlastRadius + * @augments atomic.ChangeBlastRadius.$Properties + * @deprecated Use atomic.ChangeBlastRadius.$Properties instead. + */ + + /** + * Shape of a ChangeBlastRadius. + * @typedef {atomic.ChangeBlastRadius.$Properties} atomic.ChangeBlastRadius.$Shape + */ + + /** + * Constructs a new ChangeBlastRadius. + * @memberof atomic + * @classdesc Represents a ChangeBlastRadius. + * @constructor + * @param {atomic.ChangeBlastRadius.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeBlastRadius = function (properties) { + this.files = []; + this.edges = []; + this.warnings = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeBlastRadius changeHash. + * @member {atomic.Hash.$Properties|null|undefined} changeHash + * @memberof atomic.ChangeBlastRadius + * @instance + */ + ChangeBlastRadius.prototype.changeHash = null; + + /** + * ChangeBlastRadius mode. + * @member {string} mode + * @memberof atomic.ChangeBlastRadius + * @instance + */ + ChangeBlastRadius.prototype.mode = ""; + + /** + * ChangeBlastRadius files. + * @member {Array.} files + * @memberof atomic.ChangeBlastRadius + * @instance + */ + ChangeBlastRadius.prototype.files = $util.emptyArray; + + /** + * ChangeBlastRadius edges. + * @member {Array.} edges + * @memberof atomic.ChangeBlastRadius + * @instance + */ + ChangeBlastRadius.prototype.edges = $util.emptyArray; + + /** + * ChangeBlastRadius warnings. + * @member {Array.} warnings + * @memberof atomic.ChangeBlastRadius + * @instance + */ + ChangeBlastRadius.prototype.warnings = $util.emptyArray; + + /** + * ChangeBlastRadius context. + * @member {string} context + * @memberof atomic.ChangeBlastRadius + * @instance + */ + ChangeBlastRadius.prototype.context = ""; + + /** + * Creates a new ChangeBlastRadius instance using the specified properties. + * @function create + * @memberof atomic.ChangeBlastRadius + * @static + * @param {atomic.ChangeBlastRadius.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeBlastRadius} ChangeBlastRadius instance + * @type {{ + * (properties: atomic.ChangeBlastRadius.$Shape): atomic.ChangeBlastRadius & atomic.ChangeBlastRadius.$Shape; + * (properties?: atomic.ChangeBlastRadius.$Properties): atomic.ChangeBlastRadius; + * }} + */ + ChangeBlastRadius.create = function(properties) { + return new ChangeBlastRadius(properties); + }; + + /** + * Encodes the specified ChangeBlastRadius message. Does not implicitly {@link atomic.ChangeBlastRadius.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeBlastRadius + * @static + * @param {atomic.ChangeBlastRadius.$Properties} message ChangeBlastRadius message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeBlastRadius.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) + $root.atomic.Hash.encode(message.changeHash, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.mode != null && $Object.hasOwnProperty.call(message, "mode") && message.mode !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mode); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + $root.atomic.ChangeImpactFile.encode(message.files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.edges != null && message.edges.length) + for (var i = 0; i < message.edges.length; ++i) + $root.atomic.ChangeImpactEdge.encode(message.edges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.warnings != null && message.warnings.length) + for (var i = 0; i < message.warnings.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.warnings[i]); + if (message.context != null && $Object.hasOwnProperty.call(message, "context") && message.context !== "") + writer.uint32(/* id 6, wireType 2 =*/50).string(message.context); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeBlastRadius message, length delimited. Does not implicitly {@link atomic.ChangeBlastRadius.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeBlastRadius + * @static + * @param {atomic.ChangeBlastRadius.$Properties} message ChangeBlastRadius message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeBlastRadius.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeBlastRadius message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeBlastRadius + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeBlastRadius & atomic.ChangeBlastRadius.$Shape} ChangeBlastRadius + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeBlastRadius.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeBlastRadius(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.changeHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.changeHash); + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.mode = value; + else + delete message.mode; + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.files && message.files.length)) + message.files = []; + message.files.push($root.atomic.ChangeImpactFile.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.edges && message.edges.length)) + message.edges = []; + message.edges.push($root.atomic.ChangeImpactEdge.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.warnings && message.warnings.length)) + message.warnings = []; + message.warnings.push(reader.stringVerify()); + continue; + } + case 6: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.context = value; + else + delete message.context; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeBlastRadius message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeBlastRadius + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeBlastRadius & atomic.ChangeBlastRadius.$Shape} ChangeBlastRadius + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeBlastRadius.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeBlastRadius message. + * @function verify + * @memberof atomic.ChangeBlastRadius + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeBlastRadius.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) { + var error = $root.atomic.Hash.verify(message.changeHash, _depth + 1); + if (error) + return "changeHash." + error; + } + if (message.mode != null && $Object.hasOwnProperty.call(message, "mode")) + if (!$util.isString(message.mode)) + return "mode: string expected"; + if (message.files != null && $Object.hasOwnProperty.call(message, "files")) { + if (!$Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) { + var error = $root.atomic.ChangeImpactFile.verify(message.files[i], _depth + 1); + if (error) + return "files." + error; + } + } + if (message.edges != null && $Object.hasOwnProperty.call(message, "edges")) { + if (!$Array.isArray(message.edges)) + return "edges: array expected"; + for (var i = 0; i < message.edges.length; ++i) { + var error = $root.atomic.ChangeImpactEdge.verify(message.edges[i], _depth + 1); + if (error) + return "edges." + error; + } + } + if (message.warnings != null && $Object.hasOwnProperty.call(message, "warnings")) { + if (!$Array.isArray(message.warnings)) + return "warnings: array expected"; + for (var i = 0; i < message.warnings.length; ++i) + if (!$util.isString(message.warnings[i])) + return "warnings: string[] expected"; + } + if (message.context != null && $Object.hasOwnProperty.call(message, "context")) + if (!$util.isString(message.context)) + return "context: string expected"; + return null; + }; + + /** + * Creates a ChangeBlastRadius message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeBlastRadius + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeBlastRadius} ChangeBlastRadius + */ + ChangeBlastRadius.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeBlastRadius) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeBlastRadius: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeBlastRadius(); + if (object.changeHash != null) { + if (!$util.isObject(object.changeHash)) + throw $TypeError(".atomic.ChangeBlastRadius.changeHash: object expected"); + message.changeHash = $root.atomic.Hash.fromObject(object.changeHash, _depth + 1); + } + if (object.mode != null) + if (typeof object.mode !== "string" || object.mode.length) + message.mode = $String(object.mode); + if (object.files) { + if (!$Array.isArray(object.files)) + throw $TypeError(".atomic.ChangeBlastRadius.files: array expected"); + message.files = $Array(object.files.length); + for (var i = 0; i < object.files.length; ++i) { + if (!$util.isObject(object.files[i])) + throw $TypeError(".atomic.ChangeBlastRadius.files: object expected"); + message.files[i] = $root.atomic.ChangeImpactFile.fromObject(object.files[i], _depth + 1); + } + } + if (object.edges) { + if (!$Array.isArray(object.edges)) + throw $TypeError(".atomic.ChangeBlastRadius.edges: array expected"); + message.edges = $Array(object.edges.length); + for (var i = 0; i < object.edges.length; ++i) { + if (!$util.isObject(object.edges[i])) + throw $TypeError(".atomic.ChangeBlastRadius.edges: object expected"); + message.edges[i] = $root.atomic.ChangeImpactEdge.fromObject(object.edges[i], _depth + 1); + } + } + if (object.warnings) { + if (!$Array.isArray(object.warnings)) + throw $TypeError(".atomic.ChangeBlastRadius.warnings: array expected"); + message.warnings = $Array(object.warnings.length); + for (var i = 0; i < object.warnings.length; ++i) + message.warnings[i] = $String(object.warnings[i]); + } + if (object.context != null) + if (typeof object.context !== "string" || object.context.length) + message.context = $String(object.context); + return message; + }; + + /** + * Creates a plain object from a ChangeBlastRadius message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeBlastRadius + * @static + * @param {atomic.ChangeBlastRadius} message ChangeBlastRadius + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeBlastRadius.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.files = []; + object.edges = []; + object.warnings = []; + } + if (options.defaults) { + object.changeHash = null; + object.mode = ""; + object.context = ""; + } + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) + object.changeHash = $root.atomic.Hash.toObject(message.changeHash, options, _depth + 1); + if (message.mode != null && $Object.hasOwnProperty.call(message, "mode")) + object.mode = message.mode; + if (message.files && message.files.length) { + object.files = $Array(message.files.length); + for (var j = 0; j < message.files.length; ++j) + object.files[j] = $root.atomic.ChangeImpactFile.toObject(message.files[j], options, _depth + 1); + } + if (message.edges && message.edges.length) { + object.edges = $Array(message.edges.length); + for (var j = 0; j < message.edges.length; ++j) + object.edges[j] = $root.atomic.ChangeImpactEdge.toObject(message.edges[j], options, _depth + 1); + } + if (message.warnings && message.warnings.length) { + object.warnings = $Array(message.warnings.length); + for (var j = 0; j < message.warnings.length; ++j) + object.warnings[j] = message.warnings[j]; + } + if (message.context != null && $Object.hasOwnProperty.call(message, "context")) + object.context = message.context; + return object; + }; + + /** + * Converts this ChangeBlastRadius to JSON. + * @function toJSON + * @memberof atomic.ChangeBlastRadius + * @instance + * @returns {Object.} JSON object + */ + ChangeBlastRadius.prototype.toJSON = function() { + return ChangeBlastRadius.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeBlastRadius + * @function getTypeUrl + * @memberof atomic.ChangeBlastRadius + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeBlastRadius.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeBlastRadius"; + }; + + return ChangeBlastRadius; + })(); + + atomic.ChangeImpactFile = (function() { + + /** + * Properties of a ChangeImpactFile. + * @typedef {Object} atomic.ChangeImpactFile.$Properties + * @property {string|null} [path] ChangeImpactFile path + * @property {number|null} [hop] ChangeImpactFile hop + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeImpactFile. + * @memberof atomic + * @interface IChangeImpactFile + * @augments atomic.ChangeImpactFile.$Properties + * @deprecated Use atomic.ChangeImpactFile.$Properties instead. + */ + + /** + * Shape of a ChangeImpactFile. + * @typedef {atomic.ChangeImpactFile.$Properties} atomic.ChangeImpactFile.$Shape + */ + + /** + * Constructs a new ChangeImpactFile. + * @memberof atomic + * @classdesc Represents a ChangeImpactFile. + * @constructor + * @param {atomic.ChangeImpactFile.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeImpactFile = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeImpactFile path. + * @member {string} path + * @memberof atomic.ChangeImpactFile + * @instance + */ + ChangeImpactFile.prototype.path = ""; + + /** + * ChangeImpactFile hop. + * @member {number} hop + * @memberof atomic.ChangeImpactFile + * @instance + */ + ChangeImpactFile.prototype.hop = 0; + + /** + * Creates a new ChangeImpactFile instance using the specified properties. + * @function create + * @memberof atomic.ChangeImpactFile + * @static + * @param {atomic.ChangeImpactFile.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeImpactFile} ChangeImpactFile instance + * @type {{ + * (properties: atomic.ChangeImpactFile.$Shape): atomic.ChangeImpactFile & atomic.ChangeImpactFile.$Shape; + * (properties?: atomic.ChangeImpactFile.$Properties): atomic.ChangeImpactFile; + * }} + */ + ChangeImpactFile.create = function(properties) { + return new ChangeImpactFile(properties); + }; + + /** + * Encodes the specified ChangeImpactFile message. Does not implicitly {@link atomic.ChangeImpactFile.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeImpactFile + * @static + * @param {atomic.ChangeImpactFile.$Properties} message ChangeImpactFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeImpactFile.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.hop != null && $Object.hasOwnProperty.call(message, "hop") && message.hop !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.hop); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeImpactFile message, length delimited. Does not implicitly {@link atomic.ChangeImpactFile.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeImpactFile + * @static + * @param {atomic.ChangeImpactFile.$Properties} message ChangeImpactFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeImpactFile.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeImpactFile message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeImpactFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeImpactFile & atomic.ChangeImpactFile.$Shape} ChangeImpactFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeImpactFile.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeImpactFile(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.hop = value; + else + delete message.hop; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeImpactFile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeImpactFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeImpactFile & atomic.ChangeImpactFile.$Shape} ChangeImpactFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeImpactFile.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeImpactFile message. + * @function verify + * @memberof atomic.ChangeImpactFile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeImpactFile.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.hop != null && $Object.hasOwnProperty.call(message, "hop")) + if (!$util.isInteger(message.hop)) + return "hop: integer expected"; + return null; + }; + + /** + * Creates a ChangeImpactFile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeImpactFile + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeImpactFile} ChangeImpactFile + */ + ChangeImpactFile.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeImpactFile) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeImpactFile: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeImpactFile(); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + if (object.hop != null) + if ($Number(object.hop) !== 0) + message.hop = object.hop >>> 0; + return message; + }; + + /** + * Creates a plain object from a ChangeImpactFile message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeImpactFile + * @static + * @param {atomic.ChangeImpactFile} message ChangeImpactFile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeImpactFile.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.path = ""; + object.hop = 0; + } + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.hop != null && $Object.hasOwnProperty.call(message, "hop")) + object.hop = message.hop; + return object; + }; + + /** + * Converts this ChangeImpactFile to JSON. + * @function toJSON + * @memberof atomic.ChangeImpactFile + * @instance + * @returns {Object.} JSON object + */ + ChangeImpactFile.prototype.toJSON = function() { + return ChangeImpactFile.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeImpactFile + * @function getTypeUrl + * @memberof atomic.ChangeImpactFile + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeImpactFile.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeImpactFile"; + }; + + return ChangeImpactFile; + })(); + + atomic.ChangeImpactEdge = (function() { + + /** + * Properties of a ChangeImpactEdge. + * @typedef {Object} atomic.ChangeImpactEdge.$Properties + * @property {string|null} [fromPath] ChangeImpactEdge fromPath + * @property {string|null} [toPath] ChangeImpactEdge toPath + * @property {string|null} [relation] ChangeImpactEdge relation + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeImpactEdge. + * @memberof atomic + * @interface IChangeImpactEdge + * @augments atomic.ChangeImpactEdge.$Properties + * @deprecated Use atomic.ChangeImpactEdge.$Properties instead. + */ + + /** + * Shape of a ChangeImpactEdge. + * @typedef {atomic.ChangeImpactEdge.$Properties} atomic.ChangeImpactEdge.$Shape + */ + + /** + * Constructs a new ChangeImpactEdge. + * @memberof atomic + * @classdesc Represents a ChangeImpactEdge. + * @constructor + * @param {atomic.ChangeImpactEdge.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeImpactEdge = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeImpactEdge fromPath. + * @member {string} fromPath + * @memberof atomic.ChangeImpactEdge + * @instance + */ + ChangeImpactEdge.prototype.fromPath = ""; + + /** + * ChangeImpactEdge toPath. + * @member {string} toPath + * @memberof atomic.ChangeImpactEdge + * @instance + */ + ChangeImpactEdge.prototype.toPath = ""; + + /** + * ChangeImpactEdge relation. + * @member {string} relation + * @memberof atomic.ChangeImpactEdge + * @instance + */ + ChangeImpactEdge.prototype.relation = ""; + + /** + * Creates a new ChangeImpactEdge instance using the specified properties. + * @function create + * @memberof atomic.ChangeImpactEdge + * @static + * @param {atomic.ChangeImpactEdge.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeImpactEdge} ChangeImpactEdge instance + * @type {{ + * (properties: atomic.ChangeImpactEdge.$Shape): atomic.ChangeImpactEdge & atomic.ChangeImpactEdge.$Shape; + * (properties?: atomic.ChangeImpactEdge.$Properties): atomic.ChangeImpactEdge; + * }} + */ + ChangeImpactEdge.create = function(properties) { + return new ChangeImpactEdge(properties); + }; + + /** + * Encodes the specified ChangeImpactEdge message. Does not implicitly {@link atomic.ChangeImpactEdge.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeImpactEdge + * @static + * @param {atomic.ChangeImpactEdge.$Properties} message ChangeImpactEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeImpactEdge.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.fromPath != null && $Object.hasOwnProperty.call(message, "fromPath") && message.fromPath !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fromPath); + if (message.toPath != null && $Object.hasOwnProperty.call(message, "toPath") && message.toPath !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.toPath); + if (message.relation != null && $Object.hasOwnProperty.call(message, "relation") && message.relation !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.relation); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeImpactEdge message, length delimited. Does not implicitly {@link atomic.ChangeImpactEdge.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeImpactEdge + * @static + * @param {atomic.ChangeImpactEdge.$Properties} message ChangeImpactEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeImpactEdge.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeImpactEdge message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeImpactEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeImpactEdge & atomic.ChangeImpactEdge.$Shape} ChangeImpactEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeImpactEdge.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeImpactEdge(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.fromPath = value; + else + delete message.fromPath; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.toPath = value; + else + delete message.toPath; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.relation = value; + else + delete message.relation; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeImpactEdge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeImpactEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeImpactEdge & atomic.ChangeImpactEdge.$Shape} ChangeImpactEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeImpactEdge.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeImpactEdge message. + * @function verify + * @memberof atomic.ChangeImpactEdge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeImpactEdge.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.fromPath != null && $Object.hasOwnProperty.call(message, "fromPath")) + if (!$util.isString(message.fromPath)) + return "fromPath: string expected"; + if (message.toPath != null && $Object.hasOwnProperty.call(message, "toPath")) + if (!$util.isString(message.toPath)) + return "toPath: string expected"; + if (message.relation != null && $Object.hasOwnProperty.call(message, "relation")) + if (!$util.isString(message.relation)) + return "relation: string expected"; + return null; + }; + + /** + * Creates a ChangeImpactEdge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeImpactEdge + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeImpactEdge} ChangeImpactEdge + */ + ChangeImpactEdge.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeImpactEdge) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeImpactEdge: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeImpactEdge(); + if (object.fromPath != null) + if (typeof object.fromPath !== "string" || object.fromPath.length) + message.fromPath = $String(object.fromPath); + if (object.toPath != null) + if (typeof object.toPath !== "string" || object.toPath.length) + message.toPath = $String(object.toPath); + if (object.relation != null) + if (typeof object.relation !== "string" || object.relation.length) + message.relation = $String(object.relation); + return message; + }; + + /** + * Creates a plain object from a ChangeImpactEdge message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeImpactEdge + * @static + * @param {atomic.ChangeImpactEdge} message ChangeImpactEdge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeImpactEdge.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.fromPath = ""; + object.toPath = ""; + object.relation = ""; + } + if (message.fromPath != null && $Object.hasOwnProperty.call(message, "fromPath")) + object.fromPath = message.fromPath; + if (message.toPath != null && $Object.hasOwnProperty.call(message, "toPath")) + object.toPath = message.toPath; + if (message.relation != null && $Object.hasOwnProperty.call(message, "relation")) + object.relation = message.relation; + return object; + }; + + /** + * Converts this ChangeImpactEdge to JSON. + * @function toJSON + * @memberof atomic.ChangeImpactEdge + * @instance + * @returns {Object.} JSON object + */ + ChangeImpactEdge.prototype.toJSON = function() { + return ChangeImpactEdge.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeImpactEdge + * @function getTypeUrl + * @memberof atomic.ChangeImpactEdge + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeImpactEdge.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeImpactEdge"; + }; + + return ChangeImpactEdge; + })(); + + atomic.ChangeIntentContext = (function() { + + /** + * Properties of a ChangeIntentContext. + * @typedef {Object} atomic.ChangeIntentContext.$Properties + * @property {number|null} [schemaVersion] ChangeIntentContext schemaVersion + * @property {atomic.Hash.$Properties|null} [changeHash] ChangeIntentContext changeHash + * @property {string|null} [planId] ChangeIntentContext planId + * @property {string|null} [status] ChangeIntentContext status + * @property {Array.|null} [plans] ChangeIntentContext plans + * @property {Array.|null} [associatedIntents] ChangeIntentContext associatedIntents + * @property {Array.|null} [warnings] ChangeIntentContext warnings + * @property {string|null} [validationStatus] ChangeIntentContext validationStatus + * @property {string|null} [context] ChangeIntentContext context + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeIntentContext. + * @memberof atomic + * @interface IChangeIntentContext + * @augments atomic.ChangeIntentContext.$Properties + * @deprecated Use atomic.ChangeIntentContext.$Properties instead. + */ + + /** + * Shape of a ChangeIntentContext. + * @typedef {atomic.ChangeIntentContext.$Properties} atomic.ChangeIntentContext.$Shape + */ + + /** + * Constructs a new ChangeIntentContext. + * @memberof atomic + * @classdesc Represents a ChangeIntentContext. + * @constructor + * @param {atomic.ChangeIntentContext.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeIntentContext = function (properties) { + this.plans = []; + this.associatedIntents = []; + this.warnings = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeIntentContext schemaVersion. + * @member {number} schemaVersion + * @memberof atomic.ChangeIntentContext + * @instance + */ + ChangeIntentContext.prototype.schemaVersion = 0; + + /** + * ChangeIntentContext changeHash. + * @member {atomic.Hash.$Properties|null|undefined} changeHash + * @memberof atomic.ChangeIntentContext + * @instance + */ + ChangeIntentContext.prototype.changeHash = null; + + /** + * ChangeIntentContext planId. + * @member {string|null|undefined} planId + * @memberof atomic.ChangeIntentContext + * @instance + */ + ChangeIntentContext.prototype.planId = null; + + /** + * ChangeIntentContext status. + * @member {string} status + * @memberof atomic.ChangeIntentContext + * @instance + */ + ChangeIntentContext.prototype.status = ""; + + /** + * ChangeIntentContext plans. + * @member {Array.} plans + * @memberof atomic.ChangeIntentContext + * @instance + */ + ChangeIntentContext.prototype.plans = $util.emptyArray; + + /** + * ChangeIntentContext associatedIntents. + * @member {Array.} associatedIntents + * @memberof atomic.ChangeIntentContext + * @instance + */ + ChangeIntentContext.prototype.associatedIntents = $util.emptyArray; + + /** + * ChangeIntentContext warnings. + * @member {Array.} warnings + * @memberof atomic.ChangeIntentContext + * @instance + */ + ChangeIntentContext.prototype.warnings = $util.emptyArray; + + /** + * ChangeIntentContext validationStatus. + * @member {string} validationStatus + * @memberof atomic.ChangeIntentContext + * @instance + */ + ChangeIntentContext.prototype.validationStatus = ""; + + /** + * ChangeIntentContext context. + * @member {string} context + * @memberof atomic.ChangeIntentContext + * @instance + */ + ChangeIntentContext.prototype.context = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeIntentContext.prototype, "_plan_id", { + get: $util.oneOfGetter($oneOfFields = ["planId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeIntentContext instance using the specified properties. + * @function create + * @memberof atomic.ChangeIntentContext + * @static + * @param {atomic.ChangeIntentContext.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeIntentContext} ChangeIntentContext instance + * @type {{ + * (properties: atomic.ChangeIntentContext.$Shape): atomic.ChangeIntentContext & atomic.ChangeIntentContext.$Shape; + * (properties?: atomic.ChangeIntentContext.$Properties): atomic.ChangeIntentContext; + * }} + */ + ChangeIntentContext.create = function(properties) { + return new ChangeIntentContext(properties); + }; + + /** + * Encodes the specified ChangeIntentContext message. Does not implicitly {@link atomic.ChangeIntentContext.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeIntentContext + * @static + * @param {atomic.ChangeIntentContext.$Properties} message ChangeIntentContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeIntentContext.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.schemaVersion != null && $Object.hasOwnProperty.call(message, "schemaVersion") && message.schemaVersion !== 0) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.schemaVersion); + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) + $root.atomic.Hash.encode(message.changeHash, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.planId != null && $Object.hasOwnProperty.call(message, "planId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.planId); + if (message.status != null && $Object.hasOwnProperty.call(message, "status") && message.status !== "") + writer.uint32(/* id 4, wireType 2 =*/34).string(message.status); + if (message.plans != null && message.plans.length) + for (var i = 0; i < message.plans.length; ++i) + $root.atomic.ChangePlanBinding.encode(message.plans[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.associatedIntents != null && message.associatedIntents.length) + for (var i = 0; i < message.associatedIntents.length; ++i) + $root.atomic.ChangeIntentAssociation.encode(message.associatedIntents[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.warnings != null && message.warnings.length) + for (var i = 0; i < message.warnings.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.warnings[i]); + if (message.validationStatus != null && $Object.hasOwnProperty.call(message, "validationStatus") && message.validationStatus !== "") + writer.uint32(/* id 8, wireType 2 =*/66).string(message.validationStatus); + if (message.context != null && $Object.hasOwnProperty.call(message, "context") && message.context !== "") + writer.uint32(/* id 9, wireType 2 =*/74).string(message.context); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeIntentContext message, length delimited. Does not implicitly {@link atomic.ChangeIntentContext.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeIntentContext + * @static + * @param {atomic.ChangeIntentContext.$Properties} message ChangeIntentContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeIntentContext.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeIntentContext message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeIntentContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeIntentContext & atomic.ChangeIntentContext.$Shape} ChangeIntentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeIntentContext.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeIntentContext(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.schemaVersion = value; + else + delete message.schemaVersion; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.changeHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.changeHash); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.planId = reader.stringVerify(); + message._plan_id = "planId"; + continue; + } + case 4: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.status = value; + else + delete message.status; + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.plans && message.plans.length)) + message.plans = []; + message.plans.push($root.atomic.ChangePlanBinding.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.associatedIntents && message.associatedIntents.length)) + message.associatedIntents = []; + message.associatedIntents.push($root.atomic.ChangeIntentAssociation.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.warnings && message.warnings.length)) + message.warnings = []; + message.warnings.push(reader.stringVerify()); + continue; + } + case 8: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.validationStatus = value; + else + delete message.validationStatus; + continue; + } + case 9: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.context = value; + else + delete message.context; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeIntentContext message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeIntentContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeIntentContext & atomic.ChangeIntentContext.$Shape} ChangeIntentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeIntentContext.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeIntentContext message. + * @function verify + * @memberof atomic.ChangeIntentContext + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeIntentContext.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.schemaVersion != null && $Object.hasOwnProperty.call(message, "schemaVersion")) + if (!$util.isInteger(message.schemaVersion)) + return "schemaVersion: integer expected"; + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) { + var error = $root.atomic.Hash.verify(message.changeHash, _depth + 1); + if (error) + return "changeHash." + error; + } + if (message.planId != null && $Object.hasOwnProperty.call(message, "planId")) { + properties._plan_id = 1; + if (!$util.isString(message.planId)) + return "planId: string expected"; + } + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + if (!$util.isString(message.status)) + return "status: string expected"; + if (message.plans != null && $Object.hasOwnProperty.call(message, "plans")) { + if (!$Array.isArray(message.plans)) + return "plans: array expected"; + for (var i = 0; i < message.plans.length; ++i) { + var error = $root.atomic.ChangePlanBinding.verify(message.plans[i], _depth + 1); + if (error) + return "plans." + error; + } + } + if (message.associatedIntents != null && $Object.hasOwnProperty.call(message, "associatedIntents")) { + if (!$Array.isArray(message.associatedIntents)) + return "associatedIntents: array expected"; + for (var i = 0; i < message.associatedIntents.length; ++i) { + var error = $root.atomic.ChangeIntentAssociation.verify(message.associatedIntents[i], _depth + 1); + if (error) + return "associatedIntents." + error; + } + } + if (message.warnings != null && $Object.hasOwnProperty.call(message, "warnings")) { + if (!$Array.isArray(message.warnings)) + return "warnings: array expected"; + for (var i = 0; i < message.warnings.length; ++i) + if (!$util.isString(message.warnings[i])) + return "warnings: string[] expected"; + } + if (message.validationStatus != null && $Object.hasOwnProperty.call(message, "validationStatus")) + if (!$util.isString(message.validationStatus)) + return "validationStatus: string expected"; + if (message.context != null && $Object.hasOwnProperty.call(message, "context")) + if (!$util.isString(message.context)) + return "context: string expected"; + return null; + }; + + /** + * Creates a ChangeIntentContext message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeIntentContext + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeIntentContext} ChangeIntentContext + */ + ChangeIntentContext.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeIntentContext) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeIntentContext: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeIntentContext(); + if (object.schemaVersion != null) + if ($Number(object.schemaVersion) !== 0) + message.schemaVersion = object.schemaVersion >>> 0; + if (object.changeHash != null) { + if (!$util.isObject(object.changeHash)) + throw $TypeError(".atomic.ChangeIntentContext.changeHash: object expected"); + message.changeHash = $root.atomic.Hash.fromObject(object.changeHash, _depth + 1); + } + if (object.planId != null) + message.planId = $String(object.planId); + if (object.status != null) + if (typeof object.status !== "string" || object.status.length) + message.status = $String(object.status); + if (object.plans) { + if (!$Array.isArray(object.plans)) + throw $TypeError(".atomic.ChangeIntentContext.plans: array expected"); + message.plans = $Array(object.plans.length); + for (var i = 0; i < object.plans.length; ++i) { + if (!$util.isObject(object.plans[i])) + throw $TypeError(".atomic.ChangeIntentContext.plans: object expected"); + message.plans[i] = $root.atomic.ChangePlanBinding.fromObject(object.plans[i], _depth + 1); + } + } + if (object.associatedIntents) { + if (!$Array.isArray(object.associatedIntents)) + throw $TypeError(".atomic.ChangeIntentContext.associatedIntents: array expected"); + message.associatedIntents = $Array(object.associatedIntents.length); + for (var i = 0; i < object.associatedIntents.length; ++i) { + if (!$util.isObject(object.associatedIntents[i])) + throw $TypeError(".atomic.ChangeIntentContext.associatedIntents: object expected"); + message.associatedIntents[i] = $root.atomic.ChangeIntentAssociation.fromObject(object.associatedIntents[i], _depth + 1); + } + } + if (object.warnings) { + if (!$Array.isArray(object.warnings)) + throw $TypeError(".atomic.ChangeIntentContext.warnings: array expected"); + message.warnings = $Array(object.warnings.length); + for (var i = 0; i < object.warnings.length; ++i) + message.warnings[i] = $String(object.warnings[i]); + } + if (object.validationStatus != null) + if (typeof object.validationStatus !== "string" || object.validationStatus.length) + message.validationStatus = $String(object.validationStatus); + if (object.context != null) + if (typeof object.context !== "string" || object.context.length) + message.context = $String(object.context); + return message; + }; + + /** + * Creates a plain object from a ChangeIntentContext message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeIntentContext + * @static + * @param {atomic.ChangeIntentContext} message ChangeIntentContext + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeIntentContext.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.plans = []; + object.associatedIntents = []; + object.warnings = []; + } + if (options.defaults) { + object.schemaVersion = 0; + object.changeHash = null; + object.status = ""; + object.validationStatus = ""; + object.context = ""; + } + if (message.schemaVersion != null && $Object.hasOwnProperty.call(message, "schemaVersion")) + object.schemaVersion = message.schemaVersion; + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) + object.changeHash = $root.atomic.Hash.toObject(message.changeHash, options, _depth + 1); + if (message.planId != null && $Object.hasOwnProperty.call(message, "planId")) + object.planId = message.planId; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + object.status = message.status; + if (message.plans && message.plans.length) { + object.plans = $Array(message.plans.length); + for (var j = 0; j < message.plans.length; ++j) + object.plans[j] = $root.atomic.ChangePlanBinding.toObject(message.plans[j], options, _depth + 1); + } + if (message.associatedIntents && message.associatedIntents.length) { + object.associatedIntents = $Array(message.associatedIntents.length); + for (var j = 0; j < message.associatedIntents.length; ++j) + object.associatedIntents[j] = $root.atomic.ChangeIntentAssociation.toObject(message.associatedIntents[j], options, _depth + 1); + } + if (message.warnings && message.warnings.length) { + object.warnings = $Array(message.warnings.length); + for (var j = 0; j < message.warnings.length; ++j) + object.warnings[j] = message.warnings[j]; + } + if (message.validationStatus != null && $Object.hasOwnProperty.call(message, "validationStatus")) + object.validationStatus = message.validationStatus; + if (message.context != null && $Object.hasOwnProperty.call(message, "context")) + object.context = message.context; + return object; + }; + + /** + * Converts this ChangeIntentContext to JSON. + * @function toJSON + * @memberof atomic.ChangeIntentContext + * @instance + * @returns {Object.} JSON object + */ + ChangeIntentContext.prototype.toJSON = function() { + return ChangeIntentContext.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeIntentContext + * @function getTypeUrl + * @memberof atomic.ChangeIntentContext + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeIntentContext.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeIntentContext"; + }; + + return ChangeIntentContext; + })(); + + atomic.ChangePlanBinding = (function() { + + /** + * Properties of a ChangePlanBinding. + * @typedef {Object} atomic.ChangePlanBinding.$Properties + * @property {string|null} [planId] ChangePlanBinding planId + * @property {string|null} [source] ChangePlanBinding source + * @property {string|null} [sessionId] ChangePlanBinding sessionId + * @property {atomic.Hash.$Properties|null} [provenanceHash] ChangePlanBinding provenanceHash + * @property {number|null} [turnNumber] ChangePlanBinding turnNumber + * @property {atomic.ChangeIntentIdentity.$Properties|null} [intent] ChangePlanBinding intent + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangePlanBinding. + * @memberof atomic + * @interface IChangePlanBinding + * @augments atomic.ChangePlanBinding.$Properties + * @deprecated Use atomic.ChangePlanBinding.$Properties instead. + */ + + /** + * Shape of a ChangePlanBinding. + * @typedef {atomic.ChangePlanBinding.$Properties} atomic.ChangePlanBinding.$Shape + */ + + /** + * Constructs a new ChangePlanBinding. + * @memberof atomic + * @classdesc Represents a ChangePlanBinding. + * @constructor + * @param {atomic.ChangePlanBinding.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangePlanBinding = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangePlanBinding planId. + * @member {string} planId + * @memberof atomic.ChangePlanBinding + * @instance + */ + ChangePlanBinding.prototype.planId = ""; + + /** + * ChangePlanBinding source. + * @member {string} source + * @memberof atomic.ChangePlanBinding + * @instance + */ + ChangePlanBinding.prototype.source = ""; + + /** + * ChangePlanBinding sessionId. + * @member {string} sessionId + * @memberof atomic.ChangePlanBinding + * @instance + */ + ChangePlanBinding.prototype.sessionId = ""; + + /** + * ChangePlanBinding provenanceHash. + * @member {atomic.Hash.$Properties|null|undefined} provenanceHash + * @memberof atomic.ChangePlanBinding + * @instance + */ + ChangePlanBinding.prototype.provenanceHash = null; + + /** + * ChangePlanBinding turnNumber. + * @member {number|null|undefined} turnNumber + * @memberof atomic.ChangePlanBinding + * @instance + */ + ChangePlanBinding.prototype.turnNumber = null; + + /** + * ChangePlanBinding intent. + * @member {atomic.ChangeIntentIdentity.$Properties|null|undefined} intent + * @memberof atomic.ChangePlanBinding + * @instance + */ + ChangePlanBinding.prototype.intent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangePlanBinding.prototype, "_turn_number", { + get: $util.oneOfGetter($oneOfFields = ["turnNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangePlanBinding.prototype, "_intent", { + get: $util.oneOfGetter($oneOfFields = ["intent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangePlanBinding instance using the specified properties. + * @function create + * @memberof atomic.ChangePlanBinding + * @static + * @param {atomic.ChangePlanBinding.$Properties=} [properties] Properties to set + * @returns {atomic.ChangePlanBinding} ChangePlanBinding instance + * @type {{ + * (properties: atomic.ChangePlanBinding.$Shape): atomic.ChangePlanBinding & atomic.ChangePlanBinding.$Shape; + * (properties?: atomic.ChangePlanBinding.$Properties): atomic.ChangePlanBinding; + * }} + */ + ChangePlanBinding.create = function(properties) { + return new ChangePlanBinding(properties); + }; + + /** + * Encodes the specified ChangePlanBinding message. Does not implicitly {@link atomic.ChangePlanBinding.verify|verify} messages. + * @function encode + * @memberof atomic.ChangePlanBinding + * @static + * @param {atomic.ChangePlanBinding.$Properties} message ChangePlanBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangePlanBinding.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.planId != null && $Object.hasOwnProperty.call(message, "planId") && message.planId !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.planId); + if (message.source != null && $Object.hasOwnProperty.call(message, "source") && message.source !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.source); + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId") && message.sessionId !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); + if (message.provenanceHash != null && $Object.hasOwnProperty.call(message, "provenanceHash")) + $root.atomic.Hash.encode(message.provenanceHash, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.turnNumber != null && $Object.hasOwnProperty.call(message, "turnNumber")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.turnNumber); + if (message.intent != null && $Object.hasOwnProperty.call(message, "intent")) + $root.atomic.ChangeIntentIdentity.encode(message.intent, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangePlanBinding message, length delimited. Does not implicitly {@link atomic.ChangePlanBinding.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangePlanBinding + * @static + * @param {atomic.ChangePlanBinding.$Properties} message ChangePlanBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangePlanBinding.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangePlanBinding message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangePlanBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangePlanBinding & atomic.ChangePlanBinding.$Shape} ChangePlanBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangePlanBinding.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangePlanBinding(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.planId = value; + else + delete message.planId; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.source = value; + else + delete message.source; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.sessionId = value; + else + delete message.sessionId; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.provenanceHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.provenanceHash); + continue; + } + case 5: { + if (wireType !== 0) + break; + message.turnNumber = reader.uint32(); + message._turn_number = "turnNumber"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.intent = $root.atomic.ChangeIntentIdentity.decode(reader, reader.size(), $undefined, _depth + 1, message.intent); + message._intent = "intent"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangePlanBinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangePlanBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangePlanBinding & atomic.ChangePlanBinding.$Shape} ChangePlanBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangePlanBinding.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangePlanBinding message. + * @function verify + * @memberof atomic.ChangePlanBinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangePlanBinding.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.planId != null && $Object.hasOwnProperty.call(message, "planId")) + if (!$util.isString(message.planId)) + return "planId: string expected"; + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.provenanceHash != null && $Object.hasOwnProperty.call(message, "provenanceHash")) { + var error = $root.atomic.Hash.verify(message.provenanceHash, _depth + 1); + if (error) + return "provenanceHash." + error; + } + if (message.turnNumber != null && $Object.hasOwnProperty.call(message, "turnNumber")) { + properties._turn_number = 1; + if (!$util.isInteger(message.turnNumber)) + return "turnNumber: integer expected"; + } + if (message.intent != null && $Object.hasOwnProperty.call(message, "intent")) { + properties._intent = 1; + { + var error = $root.atomic.ChangeIntentIdentity.verify(message.intent, _depth + 1); + if (error) + return "intent." + error; + } + } + return null; + }; + + /** + * Creates a ChangePlanBinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangePlanBinding + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangePlanBinding} ChangePlanBinding + */ + ChangePlanBinding.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangePlanBinding) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangePlanBinding: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangePlanBinding(); + if (object.planId != null) + if (typeof object.planId !== "string" || object.planId.length) + message.planId = $String(object.planId); + if (object.source != null) + if (typeof object.source !== "string" || object.source.length) + message.source = $String(object.source); + if (object.sessionId != null) + if (typeof object.sessionId !== "string" || object.sessionId.length) + message.sessionId = $String(object.sessionId); + if (object.provenanceHash != null) { + if (!$util.isObject(object.provenanceHash)) + throw $TypeError(".atomic.ChangePlanBinding.provenanceHash: object expected"); + message.provenanceHash = $root.atomic.Hash.fromObject(object.provenanceHash, _depth + 1); + } + if (object.turnNumber != null) + message.turnNumber = object.turnNumber >>> 0; + if (object.intent != null) { + if (!$util.isObject(object.intent)) + throw $TypeError(".atomic.ChangePlanBinding.intent: object expected"); + message.intent = $root.atomic.ChangeIntentIdentity.fromObject(object.intent, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ChangePlanBinding message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangePlanBinding + * @static + * @param {atomic.ChangePlanBinding} message ChangePlanBinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangePlanBinding.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.planId = ""; + object.source = ""; + object.sessionId = ""; + object.provenanceHash = null; + } + if (message.planId != null && $Object.hasOwnProperty.call(message, "planId")) + object.planId = message.planId; + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) + object.source = message.source; + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) + object.sessionId = message.sessionId; + if (message.provenanceHash != null && $Object.hasOwnProperty.call(message, "provenanceHash")) + object.provenanceHash = $root.atomic.Hash.toObject(message.provenanceHash, options, _depth + 1); + if (message.turnNumber != null && $Object.hasOwnProperty.call(message, "turnNumber")) + object.turnNumber = message.turnNumber; + if (message.intent != null && $Object.hasOwnProperty.call(message, "intent")) + object.intent = $root.atomic.ChangeIntentIdentity.toObject(message.intent, options, _depth + 1); + return object; + }; + + /** + * Converts this ChangePlanBinding to JSON. + * @function toJSON + * @memberof atomic.ChangePlanBinding + * @instance + * @returns {Object.} JSON object + */ + ChangePlanBinding.prototype.toJSON = function() { + return ChangePlanBinding.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangePlanBinding + * @function getTypeUrl + * @memberof atomic.ChangePlanBinding + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangePlanBinding.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangePlanBinding"; + }; + + return ChangePlanBinding; + })(); + + atomic.ChangeIntentIdentity = (function() { + + /** + * Properties of a ChangeIntentIdentity. + * @typedef {Object} atomic.ChangeIntentIdentity.$Properties + * @property {string|null} [id] ChangeIntentIdentity id + * @property {string|null} [uid] ChangeIntentIdentity uid + * @property {string|null} [title] ChangeIntentIdentity title + * @property {string|null} [path] ChangeIntentIdentity path + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeIntentIdentity. + * @memberof atomic + * @interface IChangeIntentIdentity + * @augments atomic.ChangeIntentIdentity.$Properties + * @deprecated Use atomic.ChangeIntentIdentity.$Properties instead. + */ + + /** + * Shape of a ChangeIntentIdentity. + * @typedef {atomic.ChangeIntentIdentity.$Properties} atomic.ChangeIntentIdentity.$Shape + */ + + /** + * Constructs a new ChangeIntentIdentity. + * @memberof atomic + * @classdesc Represents a ChangeIntentIdentity. + * @constructor + * @param {atomic.ChangeIntentIdentity.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeIntentIdentity = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeIntentIdentity id. + * @member {string} id + * @memberof atomic.ChangeIntentIdentity + * @instance + */ + ChangeIntentIdentity.prototype.id = ""; + + /** + * ChangeIntentIdentity uid. + * @member {string} uid + * @memberof atomic.ChangeIntentIdentity + * @instance + */ + ChangeIntentIdentity.prototype.uid = ""; + + /** + * ChangeIntentIdentity title. + * @member {string} title + * @memberof atomic.ChangeIntentIdentity + * @instance + */ + ChangeIntentIdentity.prototype.title = ""; + + /** + * ChangeIntentIdentity path. + * @member {string} path + * @memberof atomic.ChangeIntentIdentity + * @instance + */ + ChangeIntentIdentity.prototype.path = ""; + + /** + * Creates a new ChangeIntentIdentity instance using the specified properties. + * @function create + * @memberof atomic.ChangeIntentIdentity + * @static + * @param {atomic.ChangeIntentIdentity.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeIntentIdentity} ChangeIntentIdentity instance + * @type {{ + * (properties: atomic.ChangeIntentIdentity.$Shape): atomic.ChangeIntentIdentity & atomic.ChangeIntentIdentity.$Shape; + * (properties?: atomic.ChangeIntentIdentity.$Properties): atomic.ChangeIntentIdentity; + * }} + */ + ChangeIntentIdentity.create = function(properties) { + return new ChangeIntentIdentity(properties); + }; + + /** + * Encodes the specified ChangeIntentIdentity message. Does not implicitly {@link atomic.ChangeIntentIdentity.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeIntentIdentity + * @static + * @param {atomic.ChangeIntentIdentity.$Properties} message ChangeIntentIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeIntentIdentity.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.id != null && $Object.hasOwnProperty.call(message, "id") && message.id !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.uid != null && $Object.hasOwnProperty.call(message, "uid") && message.uid !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.title != null && $Object.hasOwnProperty.call(message, "title") && message.title !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.title); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 4, wireType 2 =*/34).string(message.path); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeIntentIdentity message, length delimited. Does not implicitly {@link atomic.ChangeIntentIdentity.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeIntentIdentity + * @static + * @param {atomic.ChangeIntentIdentity.$Properties} message ChangeIntentIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeIntentIdentity.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeIntentIdentity message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeIntentIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeIntentIdentity & atomic.ChangeIntentIdentity.$Shape} ChangeIntentIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeIntentIdentity.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeIntentIdentity(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.id = value; + else + delete message.id; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.uid = value; + else + delete message.uid; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.title = value; + else + delete message.title; + continue; + } + case 4: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeIntentIdentity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeIntentIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeIntentIdentity & atomic.ChangeIntentIdentity.$Shape} ChangeIntentIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeIntentIdentity.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeIntentIdentity message. + * @function verify + * @memberof atomic.ChangeIntentIdentity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeIntentIdentity.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.uid != null && $Object.hasOwnProperty.call(message, "uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.title != null && $Object.hasOwnProperty.call(message, "title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a ChangeIntentIdentity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeIntentIdentity + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeIntentIdentity} ChangeIntentIdentity + */ + ChangeIntentIdentity.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeIntentIdentity) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeIntentIdentity: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeIntentIdentity(); + if (object.id != null) + if (typeof object.id !== "string" || object.id.length) + message.id = $String(object.id); + if (object.uid != null) + if (typeof object.uid !== "string" || object.uid.length) + message.uid = $String(object.uid); + if (object.title != null) + if (typeof object.title !== "string" || object.title.length) + message.title = $String(object.title); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + return message; + }; + + /** + * Creates a plain object from a ChangeIntentIdentity message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeIntentIdentity + * @static + * @param {atomic.ChangeIntentIdentity} message ChangeIntentIdentity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeIntentIdentity.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.id = ""; + object.uid = ""; + object.title = ""; + object.path = ""; + } + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + object.id = message.id; + if (message.uid != null && $Object.hasOwnProperty.call(message, "uid")) + object.uid = message.uid; + if (message.title != null && $Object.hasOwnProperty.call(message, "title")) + object.title = message.title; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + return object; + }; + + /** + * Converts this ChangeIntentIdentity to JSON. + * @function toJSON + * @memberof atomic.ChangeIntentIdentity + * @instance + * @returns {Object.} JSON object + */ + ChangeIntentIdentity.prototype.toJSON = function() { + return ChangeIntentIdentity.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeIntentIdentity + * @function getTypeUrl + * @memberof atomic.ChangeIntentIdentity + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeIntentIdentity.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeIntentIdentity"; + }; + + return ChangeIntentIdentity; + })(); + + atomic.ChangeIntentAssociation = (function() { + + /** + * Properties of a ChangeIntentAssociation. + * @typedef {Object} atomic.ChangeIntentAssociation.$Properties + * @property {string|null} [path] ChangeIntentAssociation path + * @property {atomic.ChangeIntentIdentity.$Properties|null} [intent] ChangeIntentAssociation intent + * @property {Array.|null} [commitmentNodeIds] ChangeIntentAssociation commitmentNodeIds + * @property {Array.|null} [patchNodeIds] ChangeIntentAssociation patchNodeIds + * @property {Array.|null} [provenanceHashes] ChangeIntentAssociation provenanceHashes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeIntentAssociation. + * @memberof atomic + * @interface IChangeIntentAssociation + * @augments atomic.ChangeIntentAssociation.$Properties + * @deprecated Use atomic.ChangeIntentAssociation.$Properties instead. + */ + + /** + * Shape of a ChangeIntentAssociation. + * @typedef {atomic.ChangeIntentAssociation.$Properties} atomic.ChangeIntentAssociation.$Shape + */ + + /** + * Constructs a new ChangeIntentAssociation. + * @memberof atomic + * @classdesc Represents a ChangeIntentAssociation. + * @constructor + * @param {atomic.ChangeIntentAssociation.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeIntentAssociation = function (properties) { + this.commitmentNodeIds = []; + this.patchNodeIds = []; + this.provenanceHashes = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeIntentAssociation path. + * @member {string} path + * @memberof atomic.ChangeIntentAssociation + * @instance + */ + ChangeIntentAssociation.prototype.path = ""; + + /** + * ChangeIntentAssociation intent. + * @member {atomic.ChangeIntentIdentity.$Properties|null|undefined} intent + * @memberof atomic.ChangeIntentAssociation + * @instance + */ + ChangeIntentAssociation.prototype.intent = null; + + /** + * ChangeIntentAssociation commitmentNodeIds. + * @member {Array.} commitmentNodeIds + * @memberof atomic.ChangeIntentAssociation + * @instance + */ + ChangeIntentAssociation.prototype.commitmentNodeIds = $util.emptyArray; + + /** + * ChangeIntentAssociation patchNodeIds. + * @member {Array.} patchNodeIds + * @memberof atomic.ChangeIntentAssociation + * @instance + */ + ChangeIntentAssociation.prototype.patchNodeIds = $util.emptyArray; + + /** + * ChangeIntentAssociation provenanceHashes. + * @member {Array.} provenanceHashes + * @memberof atomic.ChangeIntentAssociation + * @instance + */ + ChangeIntentAssociation.prototype.provenanceHashes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ChangeIntentAssociation.prototype, "_intent", { + get: $util.oneOfGetter($oneOfFields = ["intent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeIntentAssociation instance using the specified properties. + * @function create + * @memberof atomic.ChangeIntentAssociation + * @static + * @param {atomic.ChangeIntentAssociation.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeIntentAssociation} ChangeIntentAssociation instance + * @type {{ + * (properties: atomic.ChangeIntentAssociation.$Shape): atomic.ChangeIntentAssociation & atomic.ChangeIntentAssociation.$Shape; + * (properties?: atomic.ChangeIntentAssociation.$Properties): atomic.ChangeIntentAssociation; + * }} + */ + ChangeIntentAssociation.create = function(properties) { + return new ChangeIntentAssociation(properties); + }; + + /** + * Encodes the specified ChangeIntentAssociation message. Does not implicitly {@link atomic.ChangeIntentAssociation.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeIntentAssociation + * @static + * @param {atomic.ChangeIntentAssociation.$Properties} message ChangeIntentAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeIntentAssociation.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.intent != null && $Object.hasOwnProperty.call(message, "intent")) + $root.atomic.ChangeIntentIdentity.encode(message.intent, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.commitmentNodeIds != null && message.commitmentNodeIds.length) + for (var i = 0; i < message.commitmentNodeIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.commitmentNodeIds[i]); + if (message.patchNodeIds != null && message.patchNodeIds.length) + for (var i = 0; i < message.patchNodeIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.patchNodeIds[i]); + if (message.provenanceHashes != null && message.provenanceHashes.length) + for (var i = 0; i < message.provenanceHashes.length; ++i) + $root.atomic.Hash.encode(message.provenanceHashes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ChangeIntentAssociation message, length delimited. Does not implicitly {@link atomic.ChangeIntentAssociation.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeIntentAssociation + * @static + * @param {atomic.ChangeIntentAssociation.$Properties} message ChangeIntentAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeIntentAssociation.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeIntentAssociation message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeIntentAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeIntentAssociation & atomic.ChangeIntentAssociation.$Shape} ChangeIntentAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeIntentAssociation.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ChangeIntentAssociation(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.intent = $root.atomic.ChangeIntentIdentity.decode(reader, reader.size(), $undefined, _depth + 1, message.intent); + message._intent = "intent"; + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.commitmentNodeIds && message.commitmentNodeIds.length)) + message.commitmentNodeIds = []; + message.commitmentNodeIds.push(reader.stringVerify()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.patchNodeIds && message.patchNodeIds.length)) + message.patchNodeIds = []; + message.patchNodeIds.push(reader.stringVerify()); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.provenanceHashes && message.provenanceHashes.length)) + message.provenanceHashes = []; + message.provenanceHashes.push($root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ChangeIntentAssociation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeIntentAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeIntentAssociation & atomic.ChangeIntentAssociation.$Shape} ChangeIntentAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeIntentAssociation.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeIntentAssociation message. + * @function verify + * @memberof atomic.ChangeIntentAssociation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeIntentAssociation.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.intent != null && $Object.hasOwnProperty.call(message, "intent")) { + properties._intent = 1; + { + var error = $root.atomic.ChangeIntentIdentity.verify(message.intent, _depth + 1); + if (error) + return "intent." + error; + } + } + if (message.commitmentNodeIds != null && $Object.hasOwnProperty.call(message, "commitmentNodeIds")) { + if (!$Array.isArray(message.commitmentNodeIds)) + return "commitmentNodeIds: array expected"; + for (var i = 0; i < message.commitmentNodeIds.length; ++i) + if (!$util.isString(message.commitmentNodeIds[i])) + return "commitmentNodeIds: string[] expected"; + } + if (message.patchNodeIds != null && $Object.hasOwnProperty.call(message, "patchNodeIds")) { + if (!$Array.isArray(message.patchNodeIds)) + return "patchNodeIds: array expected"; + for (var i = 0; i < message.patchNodeIds.length; ++i) + if (!$util.isString(message.patchNodeIds[i])) + return "patchNodeIds: string[] expected"; + } + if (message.provenanceHashes != null && $Object.hasOwnProperty.call(message, "provenanceHashes")) { + if (!$Array.isArray(message.provenanceHashes)) + return "provenanceHashes: array expected"; + for (var i = 0; i < message.provenanceHashes.length; ++i) { + var error = $root.atomic.Hash.verify(message.provenanceHashes[i], _depth + 1); + if (error) + return "provenanceHashes." + error; + } + } + return null; + }; + + /** + * Creates a ChangeIntentAssociation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeIntentAssociation + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeIntentAssociation} ChangeIntentAssociation + */ + ChangeIntentAssociation.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeIntentAssociation) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeIntentAssociation: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeIntentAssociation(); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + if (object.intent != null) { + if (!$util.isObject(object.intent)) + throw $TypeError(".atomic.ChangeIntentAssociation.intent: object expected"); + message.intent = $root.atomic.ChangeIntentIdentity.fromObject(object.intent, _depth + 1); + } + if (object.commitmentNodeIds) { + if (!$Array.isArray(object.commitmentNodeIds)) + throw $TypeError(".atomic.ChangeIntentAssociation.commitmentNodeIds: array expected"); + message.commitmentNodeIds = $Array(object.commitmentNodeIds.length); + for (var i = 0; i < object.commitmentNodeIds.length; ++i) + message.commitmentNodeIds[i] = $String(object.commitmentNodeIds[i]); + } + if (object.patchNodeIds) { + if (!$Array.isArray(object.patchNodeIds)) + throw $TypeError(".atomic.ChangeIntentAssociation.patchNodeIds: array expected"); + message.patchNodeIds = $Array(object.patchNodeIds.length); + for (var i = 0; i < object.patchNodeIds.length; ++i) + message.patchNodeIds[i] = $String(object.patchNodeIds[i]); + } + if (object.provenanceHashes) { + if (!$Array.isArray(object.provenanceHashes)) + throw $TypeError(".atomic.ChangeIntentAssociation.provenanceHashes: array expected"); + message.provenanceHashes = $Array(object.provenanceHashes.length); + for (var i = 0; i < object.provenanceHashes.length; ++i) { + if (!$util.isObject(object.provenanceHashes[i])) + throw $TypeError(".atomic.ChangeIntentAssociation.provenanceHashes: object expected"); + message.provenanceHashes[i] = $root.atomic.Hash.fromObject(object.provenanceHashes[i], _depth + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ChangeIntentAssociation message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeIntentAssociation + * @static + * @param {atomic.ChangeIntentAssociation} message ChangeIntentAssociation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeIntentAssociation.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.commitmentNodeIds = []; + object.patchNodeIds = []; + object.provenanceHashes = []; + } + if (options.defaults) + object.path = ""; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.intent != null && $Object.hasOwnProperty.call(message, "intent")) + object.intent = $root.atomic.ChangeIntentIdentity.toObject(message.intent, options, _depth + 1); + if (message.commitmentNodeIds && message.commitmentNodeIds.length) { + object.commitmentNodeIds = $Array(message.commitmentNodeIds.length); + for (var j = 0; j < message.commitmentNodeIds.length; ++j) + object.commitmentNodeIds[j] = message.commitmentNodeIds[j]; + } + if (message.patchNodeIds && message.patchNodeIds.length) { + object.patchNodeIds = $Array(message.patchNodeIds.length); + for (var j = 0; j < message.patchNodeIds.length; ++j) + object.patchNodeIds[j] = message.patchNodeIds[j]; + } + if (message.provenanceHashes && message.provenanceHashes.length) { + object.provenanceHashes = $Array(message.provenanceHashes.length); + for (var j = 0; j < message.provenanceHashes.length; ++j) + object.provenanceHashes[j] = $root.atomic.Hash.toObject(message.provenanceHashes[j], options, _depth + 1); + } + return object; + }; + + /** + * Converts this ChangeIntentAssociation to JSON. + * @function toJSON + * @memberof atomic.ChangeIntentAssociation + * @instance + * @returns {Object.} JSON object + */ + ChangeIntentAssociation.prototype.toJSON = function() { + return ChangeIntentAssociation.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeIntentAssociation + * @function getTypeUrl + * @memberof atomic.ChangeIntentAssociation + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeIntentAssociation.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeIntentAssociation"; + }; + + return ChangeIntentAssociation; + })(); + + atomic.PreviewRestoreRequest = (function() { + + /** + * Properties of a PreviewRestoreRequest. + * @typedef {Object} atomic.PreviewRestoreRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] PreviewRestoreRequest repository + * @property {Array.|null} [paths] PreviewRestoreRequest paths + * @property {boolean|null} [force] PreviewRestoreRequest force + * @property {string|null} [contentPath] PreviewRestoreRequest contentPath + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PreviewRestoreRequest. + * @memberof atomic + * @interface IPreviewRestoreRequest + * @augments atomic.PreviewRestoreRequest.$Properties + * @deprecated Use atomic.PreviewRestoreRequest.$Properties instead. + */ + + /** + * Shape of a PreviewRestoreRequest. + * @typedef {atomic.PreviewRestoreRequest.$Properties} atomic.PreviewRestoreRequest.$Shape + */ + + /** + * Constructs a new PreviewRestoreRequest. + * @memberof atomic + * @classdesc Represents a PreviewRestoreRequest. + * @constructor + * @param {atomic.PreviewRestoreRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PreviewRestoreRequest = function (properties) { + this.paths = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * PreviewRestoreRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.PreviewRestoreRequest + * @instance + */ + PreviewRestoreRequest.prototype.repository = null; + + /** + * PreviewRestoreRequest paths. + * @member {Array.} paths + * @memberof atomic.PreviewRestoreRequest + * @instance + */ + PreviewRestoreRequest.prototype.paths = $util.emptyArray; + + /** + * PreviewRestoreRequest force. + * @member {boolean} force + * @memberof atomic.PreviewRestoreRequest + * @instance + */ + PreviewRestoreRequest.prototype.force = false; + + /** + * PreviewRestoreRequest contentPath. + * @member {string|null|undefined} contentPath + * @memberof atomic.PreviewRestoreRequest + * @instance + */ + PreviewRestoreRequest.prototype.contentPath = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PreviewRestoreRequest.prototype, "_content_path", { + get: $util.oneOfGetter($oneOfFields = ["contentPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PreviewRestoreRequest instance using the specified properties. + * @function create + * @memberof atomic.PreviewRestoreRequest + * @static + * @param {atomic.PreviewRestoreRequest.$Properties=} [properties] Properties to set + * @returns {atomic.PreviewRestoreRequest} PreviewRestoreRequest instance + * @type {{ + * (properties: atomic.PreviewRestoreRequest.$Shape): atomic.PreviewRestoreRequest & atomic.PreviewRestoreRequest.$Shape; + * (properties?: atomic.PreviewRestoreRequest.$Properties): atomic.PreviewRestoreRequest; + * }} + */ + PreviewRestoreRequest.create = function(properties) { + return new PreviewRestoreRequest(properties); + }; + + /** + * Encodes the specified PreviewRestoreRequest message. Does not implicitly {@link atomic.PreviewRestoreRequest.verify|verify} messages. + * @function encode + * @memberof atomic.PreviewRestoreRequest + * @static + * @param {atomic.PreviewRestoreRequest.$Properties} message PreviewRestoreRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewRestoreRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paths[i]); + if (message.force != null && $Object.hasOwnProperty.call(message, "force") && message.force !== false) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + if (message.contentPath != null && $Object.hasOwnProperty.call(message, "contentPath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.contentPath); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified PreviewRestoreRequest message, length delimited. Does not implicitly {@link atomic.PreviewRestoreRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PreviewRestoreRequest + * @static + * @param {atomic.PreviewRestoreRequest.$Properties} message PreviewRestoreRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewRestoreRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PreviewRestoreRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.PreviewRestoreRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PreviewRestoreRequest & atomic.PreviewRestoreRequest.$Shape} PreviewRestoreRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewRestoreRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.PreviewRestoreRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.stringVerify()); + continue; + } + case 3: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.force = value; + else + delete message.force; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.contentPath = reader.stringVerify(); + message._content_path = "contentPath"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a PreviewRestoreRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PreviewRestoreRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PreviewRestoreRequest & atomic.PreviewRestoreRequest.$Shape} PreviewRestoreRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewRestoreRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PreviewRestoreRequest message. + * @function verify + * @memberof atomic.PreviewRestoreRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreviewRestoreRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.paths != null && $Object.hasOwnProperty.call(message, "paths")) { + if (!$Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + if (message.force != null && $Object.hasOwnProperty.call(message, "force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.contentPath != null && $Object.hasOwnProperty.call(message, "contentPath")) { + properties._content_path = 1; + if (!$util.isString(message.contentPath)) + return "contentPath: string expected"; + } + return null; + }; + + /** + * Creates a PreviewRestoreRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PreviewRestoreRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.PreviewRestoreRequest} PreviewRestoreRequest + */ + PreviewRestoreRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PreviewRestoreRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PreviewRestoreRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PreviewRestoreRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.PreviewRestoreRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.paths) { + if (!$Array.isArray(object.paths)) + throw $TypeError(".atomic.PreviewRestoreRequest.paths: array expected"); + message.paths = $Array(object.paths.length); + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = $String(object.paths[i]); + } + if (object.force != null) + if (object.force) + message.force = $Boolean(object.force); + if (object.contentPath != null) + message.contentPath = $String(object.contentPath); + return message; + }; + + /** + * Creates a plain object from a PreviewRestoreRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PreviewRestoreRequest + * @static + * @param {atomic.PreviewRestoreRequest} message PreviewRestoreRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreviewRestoreRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.repository = null; + object.force = false; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.paths && message.paths.length) { + object.paths = $Array(message.paths.length); + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + if (message.force != null && $Object.hasOwnProperty.call(message, "force")) + object.force = message.force; + if (message.contentPath != null && $Object.hasOwnProperty.call(message, "contentPath")) + object.contentPath = message.contentPath; + return object; + }; + + /** + * Converts this PreviewRestoreRequest to JSON. + * @function toJSON + * @memberof atomic.PreviewRestoreRequest + * @instance + * @returns {Object.} JSON object + */ + PreviewRestoreRequest.prototype.toJSON = function() { + return PreviewRestoreRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PreviewRestoreRequest + * @function getTypeUrl + * @memberof atomic.PreviewRestoreRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PreviewRestoreRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PreviewRestoreRequest"; + }; + + return PreviewRestoreRequest; + })(); + + atomic.PreviewMutationResponse = (function() { + + /** + * Properties of a PreviewMutationResponse. + * @typedef {Object} atomic.PreviewMutationResponse.$Properties + * @property {Array.|null} [affectedPaths] PreviewMutationResponse affectedPaths + * @property {Array.|null} [changes] PreviewMutationResponse changes + * @property {Array.|null} [conflicts] PreviewMutationResponse conflicts + * @property {atomic.ViewSnapshot.$Properties|null} [snapshot] PreviewMutationResponse snapshot + * @property {Array.|null} [untracked] PreviewMutationResponse untracked + * @property {Uint8Array|null} [pristineContent] PreviewMutationResponse pristineContent + * @property {string|null} [view] PreviewMutationResponse view + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PreviewMutationResponse. + * @memberof atomic + * @interface IPreviewMutationResponse + * @augments atomic.PreviewMutationResponse.$Properties + * @deprecated Use atomic.PreviewMutationResponse.$Properties instead. + */ + + /** + * Shape of a PreviewMutationResponse. + * @typedef {atomic.PreviewMutationResponse.$Properties} atomic.PreviewMutationResponse.$Shape + */ + + /** + * Constructs a new PreviewMutationResponse. + * @memberof atomic + * @classdesc Represents a PreviewMutationResponse. + * @constructor + * @param {atomic.PreviewMutationResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PreviewMutationResponse = function (properties) { + this.affectedPaths = []; + this.changes = []; + this.conflicts = []; + this.untracked = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * PreviewMutationResponse affectedPaths. + * @member {Array.} affectedPaths + * @memberof atomic.PreviewMutationResponse + * @instance + */ + PreviewMutationResponse.prototype.affectedPaths = $util.emptyArray; + + /** + * PreviewMutationResponse changes. + * @member {Array.} changes + * @memberof atomic.PreviewMutationResponse + * @instance + */ + PreviewMutationResponse.prototype.changes = $util.emptyArray; + + /** + * PreviewMutationResponse conflicts. + * @member {Array.} conflicts + * @memberof atomic.PreviewMutationResponse + * @instance + */ + PreviewMutationResponse.prototype.conflicts = $util.emptyArray; + + /** + * PreviewMutationResponse snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.PreviewMutationResponse + * @instance + */ + PreviewMutationResponse.prototype.snapshot = null; + + /** + * PreviewMutationResponse untracked. + * @member {Array.} untracked + * @memberof atomic.PreviewMutationResponse + * @instance + */ + PreviewMutationResponse.prototype.untracked = $util.emptyArray; + + /** + * PreviewMutationResponse pristineContent. + * @member {Uint8Array|null|undefined} pristineContent + * @memberof atomic.PreviewMutationResponse + * @instance + */ + PreviewMutationResponse.prototype.pristineContent = null; + + /** + * PreviewMutationResponse view. + * @member {string|null|undefined} view + * @memberof atomic.PreviewMutationResponse + * @instance + */ + PreviewMutationResponse.prototype.view = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PreviewMutationResponse.prototype, "_pristine_content", { + get: $util.oneOfGetter($oneOfFields = ["pristineContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PreviewMutationResponse.prototype, "_view", { + get: $util.oneOfGetter($oneOfFields = ["view"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PreviewMutationResponse instance using the specified properties. + * @function create + * @memberof atomic.PreviewMutationResponse + * @static + * @param {atomic.PreviewMutationResponse.$Properties=} [properties] Properties to set + * @returns {atomic.PreviewMutationResponse} PreviewMutationResponse instance + * @type {{ + * (properties: atomic.PreviewMutationResponse.$Shape): atomic.PreviewMutationResponse & atomic.PreviewMutationResponse.$Shape; + * (properties?: atomic.PreviewMutationResponse.$Properties): atomic.PreviewMutationResponse; + * }} + */ + PreviewMutationResponse.create = function(properties) { + return new PreviewMutationResponse(properties); + }; + + /** + * Encodes the specified PreviewMutationResponse message. Does not implicitly {@link atomic.PreviewMutationResponse.verify|verify} messages. + * @function encode + * @memberof atomic.PreviewMutationResponse + * @static + * @param {atomic.PreviewMutationResponse.$Properties} message PreviewMutationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewMutationResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.affectedPaths != null && message.affectedPaths.length) + for (var i = 0; i < message.affectedPaths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.affectedPaths[i]); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.atomic.ChangeInfo.encode(message.changes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.conflicts != null && message.conflicts.length) + for (var i = 0; i < message.conflicts.length; ++i) + $root.atomic.ConflictInfo.encode(message.conflicts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + $root.atomic.ViewSnapshot.encode(message.snapshot, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.untracked != null && message.untracked.length) + for (var i = 0; i < message.untracked.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.untracked[i]); + if (message.pristineContent != null && $Object.hasOwnProperty.call(message, "pristineContent")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.pristineContent); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.view); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified PreviewMutationResponse message, length delimited. Does not implicitly {@link atomic.PreviewMutationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PreviewMutationResponse + * @static + * @param {atomic.PreviewMutationResponse.$Properties} message PreviewMutationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreviewMutationResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PreviewMutationResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.PreviewMutationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PreviewMutationResponse & atomic.PreviewMutationResponse.$Shape} PreviewMutationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewMutationResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.PreviewMutationResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.affectedPaths && message.affectedPaths.length)) + message.affectedPaths = []; + message.affectedPaths.push(reader.stringVerify()); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.atomic.ChangeInfo.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.conflicts && message.conflicts.length)) + message.conflicts = []; + message.conflicts.push($root.atomic.ConflictInfo.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.untracked && message.untracked.length)) + message.untracked = []; + message.untracked.push(reader.stringVerify()); + continue; + } + case 6: { + if (wireType !== 2) + break; + message.pristineContent = reader.bytes(); + message._pristine_content = "pristineContent"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.view = reader.stringVerify(); + message._view = "view"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a PreviewMutationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PreviewMutationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PreviewMutationResponse & atomic.PreviewMutationResponse.$Shape} PreviewMutationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreviewMutationResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PreviewMutationResponse message. + * @function verify + * @memberof atomic.PreviewMutationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreviewMutationResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.affectedPaths != null && $Object.hasOwnProperty.call(message, "affectedPaths")) { + if (!$Array.isArray(message.affectedPaths)) + return "affectedPaths: array expected"; + for (var i = 0; i < message.affectedPaths.length; ++i) + if (!$util.isString(message.affectedPaths[i])) + return "affectedPaths: string[] expected"; + } + if (message.changes != null && $Object.hasOwnProperty.call(message, "changes")) { + if (!$Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.atomic.ChangeInfo.verify(message.changes[i], _depth + 1); + if (error) + return "changes." + error; + } + } + if (message.conflicts != null && $Object.hasOwnProperty.call(message, "conflicts")) { + if (!$Array.isArray(message.conflicts)) + return "conflicts: array expected"; + for (var i = 0; i < message.conflicts.length; ++i) { + var error = $root.atomic.ConflictInfo.verify(message.conflicts[i], _depth + 1); + if (error) + return "conflicts." + error; + } + } + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { + var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); + if (error) + return "snapshot." + error; + } + if (message.untracked != null && $Object.hasOwnProperty.call(message, "untracked")) { + if (!$Array.isArray(message.untracked)) + return "untracked: array expected"; + for (var i = 0; i < message.untracked.length; ++i) + if (!$util.isString(message.untracked[i])) + return "untracked: string[] expected"; + } + if (message.pristineContent != null && $Object.hasOwnProperty.call(message, "pristineContent")) { + properties._pristine_content = 1; + if (!(message.pristineContent && typeof message.pristineContent.length === "number" || $util.isString(message.pristineContent))) + return "pristineContent: buffer expected"; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + properties._view = 1; + if (!$util.isString(message.view)) + return "view: string expected"; + } + return null; + }; + + /** + * Creates a PreviewMutationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PreviewMutationResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.PreviewMutationResponse} PreviewMutationResponse + */ + PreviewMutationResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PreviewMutationResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PreviewMutationResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PreviewMutationResponse(); + if (object.affectedPaths) { + if (!$Array.isArray(object.affectedPaths)) + throw $TypeError(".atomic.PreviewMutationResponse.affectedPaths: array expected"); + message.affectedPaths = $Array(object.affectedPaths.length); + for (var i = 0; i < object.affectedPaths.length; ++i) + message.affectedPaths[i] = $String(object.affectedPaths[i]); + } + if (object.changes) { + if (!$Array.isArray(object.changes)) + throw $TypeError(".atomic.PreviewMutationResponse.changes: array expected"); + message.changes = $Array(object.changes.length); + for (var i = 0; i < object.changes.length; ++i) { + if (!$util.isObject(object.changes[i])) + throw $TypeError(".atomic.PreviewMutationResponse.changes: object expected"); + message.changes[i] = $root.atomic.ChangeInfo.fromObject(object.changes[i], _depth + 1); + } + } + if (object.conflicts) { + if (!$Array.isArray(object.conflicts)) + throw $TypeError(".atomic.PreviewMutationResponse.conflicts: array expected"); + message.conflicts = $Array(object.conflicts.length); + for (var i = 0; i < object.conflicts.length; ++i) { + if (!$util.isObject(object.conflicts[i])) + throw $TypeError(".atomic.PreviewMutationResponse.conflicts: object expected"); + message.conflicts[i] = $root.atomic.ConflictInfo.fromObject(object.conflicts[i], _depth + 1); + } + } + if (object.snapshot != null) { + if (!$util.isObject(object.snapshot)) + throw $TypeError(".atomic.PreviewMutationResponse.snapshot: object expected"); + message.snapshot = $root.atomic.ViewSnapshot.fromObject(object.snapshot, _depth + 1); + } + if (object.untracked) { + if (!$Array.isArray(object.untracked)) + throw $TypeError(".atomic.PreviewMutationResponse.untracked: array expected"); + message.untracked = $Array(object.untracked.length); + for (var i = 0; i < object.untracked.length; ++i) + message.untracked[i] = $String(object.untracked[i]); + } + if (object.pristineContent != null) + if (typeof object.pristineContent === "string") + $util.base64.decode(object.pristineContent, message.pristineContent = $util.newBuffer($util.base64.length(object.pristineContent)), 0); + else if (object.pristineContent.length >= 0) + message.pristineContent = object.pristineContent; + if (object.view != null) + message.view = $String(object.view); + return message; + }; + + /** + * Creates a plain object from a PreviewMutationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PreviewMutationResponse + * @static + * @param {atomic.PreviewMutationResponse} message PreviewMutationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreviewMutationResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.affectedPaths = []; + object.changes = []; + object.conflicts = []; + object.untracked = []; + } + if (options.defaults) + object.snapshot = null; + if (message.affectedPaths && message.affectedPaths.length) { + object.affectedPaths = $Array(message.affectedPaths.length); + for (var j = 0; j < message.affectedPaths.length; ++j) + object.affectedPaths[j] = message.affectedPaths[j]; + } + if (message.changes && message.changes.length) { + object.changes = $Array(message.changes.length); + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.atomic.ChangeInfo.toObject(message.changes[j], options, _depth + 1); + } + if (message.conflicts && message.conflicts.length) { + object.conflicts = $Array(message.conflicts.length); + for (var j = 0; j < message.conflicts.length; ++j) + object.conflicts[j] = $root.atomic.ConflictInfo.toObject(message.conflicts[j], options, _depth + 1); + } + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + object.snapshot = $root.atomic.ViewSnapshot.toObject(message.snapshot, options, _depth + 1); + if (message.untracked && message.untracked.length) { + object.untracked = $Array(message.untracked.length); + for (var j = 0; j < message.untracked.length; ++j) + object.untracked[j] = message.untracked[j]; + } + if (message.pristineContent != null && $Object.hasOwnProperty.call(message, "pristineContent")) + object.pristineContent = options.bytes === $String ? $util.base64.encode(message.pristineContent, 0, message.pristineContent.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.pristineContent) : message.pristineContent; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + return object; + }; + + /** + * Converts this PreviewMutationResponse to JSON. + * @function toJSON + * @memberof atomic.PreviewMutationResponse + * @instance + * @returns {Object.} JSON object + */ + PreviewMutationResponse.prototype.toJSON = function() { + return PreviewMutationResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PreviewMutationResponse + * @function getTypeUrl + * @memberof atomic.PreviewMutationResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PreviewMutationResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PreviewMutationResponse"; + }; + + return PreviewMutationResponse; + })(); + + atomic.ConflictInfo = (function() { + + /** + * Properties of a ConflictInfo. + * @typedef {Object} atomic.ConflictInfo.$Properties + * @property {string|null} [path] ConflictInfo path + * @property {string|null} [view] ConflictInfo view + * @property {atomic.Hash.$Properties|null} [base] ConflictInfo base + * @property {string|null} [kind] ConflictInfo kind + * @property {number|Long|null} [line] ConflictInfo line + * @property {Array.|null} [sides] ConflictInfo sides + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ConflictInfo. + * @memberof atomic + * @interface IConflictInfo + * @augments atomic.ConflictInfo.$Properties + * @deprecated Use atomic.ConflictInfo.$Properties instead. + */ + + /** + * Shape of a ConflictInfo. + * @typedef {atomic.ConflictInfo.$Properties} atomic.ConflictInfo.$Shape + */ + + /** + * Constructs a new ConflictInfo. + * @memberof atomic + * @classdesc Represents a ConflictInfo. + * @constructor + * @param {atomic.ConflictInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ConflictInfo = function (properties) { + this.sides = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ConflictInfo path. + * @member {string} path + * @memberof atomic.ConflictInfo + * @instance + */ + ConflictInfo.prototype.path = ""; + + /** + * ConflictInfo view. + * @member {string|null|undefined} view + * @memberof atomic.ConflictInfo + * @instance + */ + ConflictInfo.prototype.view = null; + + /** + * ConflictInfo base. + * @member {atomic.Hash.$Properties|null|undefined} base + * @memberof atomic.ConflictInfo + * @instance + */ + ConflictInfo.prototype.base = null; + + /** + * ConflictInfo kind. + * @member {string|null|undefined} kind + * @memberof atomic.ConflictInfo + * @instance + */ + ConflictInfo.prototype.kind = null; + + /** + * ConflictInfo line. + * @member {number|Long|null|undefined} line + * @memberof atomic.ConflictInfo + * @instance + */ + ConflictInfo.prototype.line = null; + + /** + * ConflictInfo sides. + * @member {Array.} sides + * @memberof atomic.ConflictInfo + * @instance + */ + ConflictInfo.prototype.sides = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ConflictInfo.prototype, "_view", { + get: $util.oneOfGetter($oneOfFields = ["view"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ConflictInfo.prototype, "_base", { + get: $util.oneOfGetter($oneOfFields = ["base"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ConflictInfo.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ConflictInfo.prototype, "_line", { + get: $util.oneOfGetter($oneOfFields = ["line"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConflictInfo instance using the specified properties. + * @function create + * @memberof atomic.ConflictInfo + * @static + * @param {atomic.ConflictInfo.$Properties=} [properties] Properties to set + * @returns {atomic.ConflictInfo} ConflictInfo instance + * @type {{ + * (properties: atomic.ConflictInfo.$Shape): atomic.ConflictInfo & atomic.ConflictInfo.$Shape; + * (properties?: atomic.ConflictInfo.$Properties): atomic.ConflictInfo; + * }} + */ + ConflictInfo.create = function(properties) { + return new ConflictInfo(properties); + }; + + /** + * Encodes the specified ConflictInfo message. Does not implicitly {@link atomic.ConflictInfo.verify|verify} messages. + * @function encode + * @memberof atomic.ConflictInfo + * @static + * @param {atomic.ConflictInfo.$Properties} message ConflictInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConflictInfo.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.view); + if (message.base != null && $Object.hasOwnProperty.call(message, "base")) + $root.atomic.Hash.encode(message.base, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kind); + if (message.line != null && $Object.hasOwnProperty.call(message, "line")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.line); + if (message.sides != null && message.sides.length) + for (var i = 0; i < message.sides.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sides[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ConflictInfo message, length delimited. Does not implicitly {@link atomic.ConflictInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ConflictInfo + * @static + * @param {atomic.ConflictInfo.$Properties} message ConflictInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConflictInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ConflictInfo message from the specified reader or buffer. + * @function decode + * @memberof atomic.ConflictInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ConflictInfo & atomic.ConflictInfo.$Shape} ConflictInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConflictInfo.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ConflictInfo(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.view = reader.stringVerify(); + message._view = "view"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.base = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.base); + message._base = "base"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.kind = reader.stringVerify(); + message._kind = "kind"; + continue; + } + case 5: { + if (wireType !== 0) + break; + message.line = reader.uint64(); + message._line = "line"; + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.sides && message.sides.length)) + message.sides = []; + message.sides.push(reader.stringVerify()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ConflictInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ConflictInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ConflictInfo & atomic.ConflictInfo.$Shape} ConflictInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConflictInfo.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ConflictInfo message. + * @function verify + * @memberof atomic.ConflictInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConflictInfo.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + properties._view = 1; + if (!$util.isString(message.view)) + return "view: string expected"; + } + if (message.base != null && $Object.hasOwnProperty.call(message, "base")) { + properties._base = 1; + { + var error = $root.atomic.Hash.verify(message.base, _depth + 1); + if (error) + return "base." + error; + } + } + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) { + properties._kind = 1; + if (!$util.isString(message.kind)) + return "kind: string expected"; + } + if (message.line != null && $Object.hasOwnProperty.call(message, "line")) { + properties._line = 1; + if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) + return "line: integer|Long expected"; + } + if (message.sides != null && $Object.hasOwnProperty.call(message, "sides")) { + if (!$Array.isArray(message.sides)) + return "sides: array expected"; + for (var i = 0; i < message.sides.length; ++i) + if (!$util.isString(message.sides[i])) + return "sides: string[] expected"; + } + return null; + }; + + /** + * Creates a ConflictInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ConflictInfo + * @static + * @param {Object.} object Plain object + * @returns {atomic.ConflictInfo} ConflictInfo + */ + ConflictInfo.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ConflictInfo) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ConflictInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ConflictInfo(); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + if (object.view != null) + message.view = $String(object.view); + if (object.base != null) { + if (!$util.isObject(object.base)) + throw $TypeError(".atomic.ConflictInfo.base: object expected"); + message.base = $root.atomic.Hash.fromObject(object.base, _depth + 1); + } + if (object.kind != null) + message.kind = $String(object.kind); + if (object.line != null) + if ($util.Long) + message.line = $util.Long.fromValue(object.line, true); + else if (typeof object.line === "string") + message.line = $parseInt(object.line, 10); + else if (typeof object.line === "number") + message.line = object.line; + else if (typeof object.line === "object") + message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(true); + if (object.sides) { + if (!$Array.isArray(object.sides)) + throw $TypeError(".atomic.ConflictInfo.sides: array expected"); + message.sides = $Array(object.sides.length); + for (var i = 0; i < object.sides.length; ++i) + message.sides[i] = $String(object.sides[i]); + } + return message; + }; + + /** + * Creates a plain object from a ConflictInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ConflictInfo + * @static + * @param {atomic.ConflictInfo} message ConflictInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConflictInfo.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.sides = []; + if (options.defaults) + object.path = ""; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + if (message.base != null && $Object.hasOwnProperty.call(message, "base")) + object.base = $root.atomic.Hash.toObject(message.base, options, _depth + 1); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + object.kind = message.kind; + if (message.line != null && $Object.hasOwnProperty.call(message, "line")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.line = typeof message.line === "number" ? $BigInt(message.line) : $util.Long.fromBits(message.line.low >>> 0, message.line.high >>> 0, true).toBigInt(); + else if (typeof message.line === "number") + object.line = options.longs === $String ? $String(message.line) : message.line; + else + object.line = options.longs === $String ? $util.Long.prototype.toString.call(message.line) : options.longs === $Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber(true) : message.line; + if (message.sides && message.sides.length) { + object.sides = $Array(message.sides.length); + for (var j = 0; j < message.sides.length; ++j) + object.sides[j] = message.sides[j]; + } + return object; + }; + + /** + * Converts this ConflictInfo to JSON. + * @function toJSON + * @memberof atomic.ConflictInfo + * @instance + * @returns {Object.} JSON object + */ + ConflictInfo.prototype.toJSON = function() { + return ConflictInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ConflictInfo + * @function getTypeUrl + * @memberof atomic.ConflictInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ConflictInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ConflictInfo"; + }; + + return ConflictInfo; + })(); + + atomic.ListViewsRequest = (function() { + + /** + * Properties of a ListViewsRequest. + * @typedef {Object} atomic.ListViewsRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] ListViewsRequest repository + * @property {boolean|null} [includeDetails] ListViewsRequest includeDetails + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ListViewsRequest. + * @memberof atomic + * @interface IListViewsRequest + * @augments atomic.ListViewsRequest.$Properties + * @deprecated Use atomic.ListViewsRequest.$Properties instead. + */ + + /** + * Shape of a ListViewsRequest. + * @typedef {atomic.ListViewsRequest.$Properties} atomic.ListViewsRequest.$Shape + */ + + /** + * Constructs a new ListViewsRequest. + * @memberof atomic + * @classdesc Represents a ListViewsRequest. + * @constructor + * @param {atomic.ListViewsRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ListViewsRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ListViewsRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.repository = null; + + /** + * ListViewsRequest includeDetails. + * @member {boolean} includeDetails + * @memberof atomic.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.includeDetails = false; + + /** + * Creates a new ListViewsRequest instance using the specified properties. + * @function create + * @memberof atomic.ListViewsRequest + * @static + * @param {atomic.ListViewsRequest.$Properties=} [properties] Properties to set + * @returns {atomic.ListViewsRequest} ListViewsRequest instance + * @type {{ + * (properties: atomic.ListViewsRequest.$Shape): atomic.ListViewsRequest & atomic.ListViewsRequest.$Shape; + * (properties?: atomic.ListViewsRequest.$Properties): atomic.ListViewsRequest; + * }} + */ + ListViewsRequest.create = function(properties) { + return new ListViewsRequest(properties); + }; + + /** + * Encodes the specified ListViewsRequest message. Does not implicitly {@link atomic.ListViewsRequest.verify|verify} messages. + * @function encode + * @memberof atomic.ListViewsRequest + * @static + * @param {atomic.ListViewsRequest.$Properties} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.includeDetails != null && $Object.hasOwnProperty.call(message, "includeDetails") && message.includeDetails !== false) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeDetails); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link atomic.ListViewsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ListViewsRequest + * @static + * @param {atomic.ListViewsRequest.$Properties} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ListViewsRequest & atomic.ListViewsRequest.$Shape} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ListViewsRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.includeDetails = value; + else + delete message.includeDetails; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ListViewsRequest & atomic.ListViewsRequest.$Shape} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ListViewsRequest message. + * @function verify + * @memberof atomic.ListViewsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListViewsRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.includeDetails != null && $Object.hasOwnProperty.call(message, "includeDetails")) + if (typeof message.includeDetails !== "boolean") + return "includeDetails: boolean expected"; + return null; + }; + + /** + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ListViewsRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.ListViewsRequest} ListViewsRequest + */ + ListViewsRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ListViewsRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ListViewsRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ListViewsRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.ListViewsRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.includeDetails != null) + if (object.includeDetails) + message.includeDetails = $Boolean(object.includeDetails); + return message; + }; + + /** + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ListViewsRequest + * @static + * @param {atomic.ListViewsRequest} message ListViewsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListViewsRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.includeDetails = false; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.includeDetails != null && $Object.hasOwnProperty.call(message, "includeDetails")) + object.includeDetails = message.includeDetails; + return object; + }; + + /** + * Converts this ListViewsRequest to JSON. + * @function toJSON + * @memberof atomic.ListViewsRequest + * @instance + * @returns {Object.} JSON object + */ + ListViewsRequest.prototype.toJSON = function() { + return ListViewsRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ListViewsRequest + * @function getTypeUrl + * @memberof atomic.ListViewsRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ListViewsRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ListViewsRequest"; + }; + + return ListViewsRequest; + })(); + + atomic.ListViewsResponse = (function() { + + /** + * Properties of a ListViewsResponse. + * @typedef {Object} atomic.ListViewsResponse.$Properties + * @property {Array.|null} [views] ListViewsResponse views + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ListViewsResponse. + * @memberof atomic + * @interface IListViewsResponse + * @augments atomic.ListViewsResponse.$Properties + * @deprecated Use atomic.ListViewsResponse.$Properties instead. + */ + + /** + * Shape of a ListViewsResponse. + * @typedef {atomic.ListViewsResponse.$Properties} atomic.ListViewsResponse.$Shape + */ + + /** + * Constructs a new ListViewsResponse. + * @memberof atomic + * @classdesc Represents a ListViewsResponse. + * @constructor + * @param {atomic.ListViewsResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ListViewsResponse = function (properties) { + this.views = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ListViewsResponse views. + * @member {Array.} views + * @memberof atomic.ListViewsResponse + * @instance + */ + ListViewsResponse.prototype.views = $util.emptyArray; + + /** + * Creates a new ListViewsResponse instance using the specified properties. + * @function create + * @memberof atomic.ListViewsResponse + * @static + * @param {atomic.ListViewsResponse.$Properties=} [properties] Properties to set + * @returns {atomic.ListViewsResponse} ListViewsResponse instance + * @type {{ + * (properties: atomic.ListViewsResponse.$Shape): atomic.ListViewsResponse & atomic.ListViewsResponse.$Shape; + * (properties?: atomic.ListViewsResponse.$Properties): atomic.ListViewsResponse; + * }} + */ + ListViewsResponse.create = function(properties) { + return new ListViewsResponse(properties); + }; + + /** + * Encodes the specified ListViewsResponse message. Does not implicitly {@link atomic.ListViewsResponse.verify|verify} messages. + * @function encode + * @memberof atomic.ListViewsResponse + * @static + * @param {atomic.ListViewsResponse.$Properties} message ListViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.views != null && message.views.length) + for (var i = 0; i < message.views.length; ++i) + $root.atomic.ViewInfo.encode(message.views[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link atomic.ListViewsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ListViewsResponse + * @static + * @param {atomic.ListViewsResponse.$Properties} message ListViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.ListViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ListViewsResponse & atomic.ListViewsResponse.$Shape} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ListViewsResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.views && message.views.length)) + message.views = []; + message.views.push($root.atomic.ViewInfo.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ListViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ListViewsResponse & atomic.ListViewsResponse.$Shape} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ListViewsResponse message. + * @function verify + * @memberof atomic.ListViewsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListViewsResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.views != null && $Object.hasOwnProperty.call(message, "views")) { + if (!$Array.isArray(message.views)) + return "views: array expected"; + for (var i = 0; i < message.views.length; ++i) { + var error = $root.atomic.ViewInfo.verify(message.views[i], _depth + 1); + if (error) + return "views." + error; + } + } + return null; + }; + + /** + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ListViewsResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.ListViewsResponse} ListViewsResponse + */ + ListViewsResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ListViewsResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ListViewsResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ListViewsResponse(); + if (object.views) { + if (!$Array.isArray(object.views)) + throw $TypeError(".atomic.ListViewsResponse.views: array expected"); + message.views = $Array(object.views.length); + for (var i = 0; i < object.views.length; ++i) { + if (!$util.isObject(object.views[i])) + throw $TypeError(".atomic.ListViewsResponse.views: object expected"); + message.views[i] = $root.atomic.ViewInfo.fromObject(object.views[i], _depth + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ListViewsResponse + * @static + * @param {atomic.ListViewsResponse} message ListViewsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListViewsResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.views = []; + if (message.views && message.views.length) { + object.views = $Array(message.views.length); + for (var j = 0; j < message.views.length; ++j) + object.views[j] = $root.atomic.ViewInfo.toObject(message.views[j], options, _depth + 1); + } + return object; + }; + + /** + * Converts this ListViewsResponse to JSON. + * @function toJSON + * @memberof atomic.ListViewsResponse + * @instance + * @returns {Object.} JSON object + */ + ListViewsResponse.prototype.toJSON = function() { + return ListViewsResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ListViewsResponse + * @function getTypeUrl + * @memberof atomic.ListViewsResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ListViewsResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ListViewsResponse"; + }; + + return ListViewsResponse; + })(); + + atomic.ViewInfo = (function() { + + /** + * Properties of a ViewInfo. + * @typedef {Object} atomic.ViewInfo.$Properties + * @property {string|null} [name] ViewInfo name + * @property {atomic.ViewScope|null} [scope] ViewInfo scope + * @property {string|null} [parent] ViewInfo parent + * @property {atomic.Hash.$Properties|null} [head] ViewInfo head + * @property {number|Long|null} [changeCount] ViewInfo changeCount + * @property {boolean|null} [current] ViewInfo current + * @property {atomic.ViewRef.$Properties|null} [ref] ViewInfo ref + * @property {atomic.ViewSnapshot.$Properties|null} [snapshot] ViewInfo snapshot + * @property {number|Long|null} [ownChangeCount] ViewInfo ownChangeCount + * @property {number|Long|null} [inheritedChangeCount] ViewInfo inheritedChangeCount + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ViewInfo. + * @memberof atomic + * @interface IViewInfo + * @augments atomic.ViewInfo.$Properties + * @deprecated Use atomic.ViewInfo.$Properties instead. + */ + + /** + * Shape of a ViewInfo. + * @typedef {atomic.ViewInfo.$Properties} atomic.ViewInfo.$Shape + */ + + /** + * Constructs a new ViewInfo. + * @memberof atomic + * @classdesc Represents a ViewInfo. + * @constructor + * @param {atomic.ViewInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ViewInfo = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ViewInfo name. + * @member {string} name + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.name = ""; + + /** + * ViewInfo scope. + * @member {atomic.ViewScope} scope + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.scope = 0; + + /** + * ViewInfo parent. + * @member {string|null|undefined} parent + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.parent = null; + + /** + * ViewInfo head. + * @member {atomic.Hash.$Properties|null|undefined} head + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.head = null; + + /** + * ViewInfo changeCount. + * @member {number|Long} changeCount + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.changeCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ViewInfo current. + * @member {boolean} current + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.current = false; + + /** + * ViewInfo ref. + * @member {atomic.ViewRef.$Properties|null|undefined} ref + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.ref = null; + + /** + * ViewInfo snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.snapshot = null; + + /** + * ViewInfo ownChangeCount. + * @member {number|Long|null|undefined} ownChangeCount + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.ownChangeCount = null; + + /** + * ViewInfo inheritedChangeCount. + * @member {number|Long|null|undefined} inheritedChangeCount + * @memberof atomic.ViewInfo + * @instance + */ + ViewInfo.prototype.inheritedChangeCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ViewInfo.prototype, "_parent", { + get: $util.oneOfGetter($oneOfFields = ["parent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ViewInfo.prototype, "_head", { + get: $util.oneOfGetter($oneOfFields = ["head"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ViewInfo.prototype, "_own_change_count", { + get: $util.oneOfGetter($oneOfFields = ["ownChangeCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ViewInfo.prototype, "_inherited_change_count", { + get: $util.oneOfGetter($oneOfFields = ["inheritedChangeCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ViewInfo instance using the specified properties. + * @function create + * @memberof atomic.ViewInfo + * @static + * @param {atomic.ViewInfo.$Properties=} [properties] Properties to set + * @returns {atomic.ViewInfo} ViewInfo instance + * @type {{ + * (properties: atomic.ViewInfo.$Shape): atomic.ViewInfo & atomic.ViewInfo.$Shape; + * (properties?: atomic.ViewInfo.$Properties): atomic.ViewInfo; + * }} + */ + ViewInfo.create = function(properties) { + return new ViewInfo(properties); + }; + + /** + * Encodes the specified ViewInfo message. Does not implicitly {@link atomic.ViewInfo.verify|verify} messages. + * @function encode + * @memberof atomic.ViewInfo + * @static + * @param {atomic.ViewInfo.$Properties} message ViewInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewInfo.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.name != null && $Object.hasOwnProperty.call(message, "name") && message.name !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope") && message.scope !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.scope); + if (message.parent != null && $Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); + if (message.head != null && $Object.hasOwnProperty.call(message, "head")) + $root.atomic.Hash.encode(message.head, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.changeCount != null && $Object.hasOwnProperty.call(message, "changeCount") && (typeof message.changeCount === "object" ? message.changeCount.low || message.changeCount.high : message.changeCount !== 0)) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.changeCount); + if (message.current != null && $Object.hasOwnProperty.call(message, "current") && message.current !== false) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.current); + if (message.ref != null && $Object.hasOwnProperty.call(message, "ref")) + $root.atomic.ViewRef.encode(message.ref, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + $root.atomic.ViewSnapshot.encode(message.snapshot, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.ownChangeCount != null && $Object.hasOwnProperty.call(message, "ownChangeCount")) + writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.ownChangeCount); + if (message.inheritedChangeCount != null && $Object.hasOwnProperty.call(message, "inheritedChangeCount")) + writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.inheritedChangeCount); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ViewInfo message, length delimited. Does not implicitly {@link atomic.ViewInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ViewInfo + * @static + * @param {atomic.ViewInfo.$Properties} message ViewInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ViewInfo message from the specified reader or buffer. + * @function decode + * @memberof atomic.ViewInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ViewInfo & atomic.ViewInfo.$Shape} ViewInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewInfo.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ViewInfo(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.name = value; + else + delete message.name; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.int32()) + message.scope = value; + else + delete message.scope; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.parent = reader.stringVerify(); + message._parent = "parent"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.head = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.head); + message._head = "head"; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.changeCount = value; + else + delete message.changeCount; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.current = value; + else + delete message.current; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.ref = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.ref); + continue; + } + case 8: { + if (wireType !== 2) + break; + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + continue; + } + case 9: { + if (wireType !== 0) + break; + message.ownChangeCount = reader.uint64(); + message._own_change_count = "ownChangeCount"; + continue; + } + case 10: { + if (wireType !== 0) + break; + message.inheritedChangeCount = reader.uint64(); + message._inherited_change_count = "inheritedChangeCount"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ViewInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ViewInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ViewInfo & atomic.ViewInfo.$Shape} ViewInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewInfo.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ViewInfo message. + * @function verify + * @memberof atomic.ViewInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ViewInfo.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope")) + if (typeof message.scope !== "number" || (message.scope | 0) !== message.scope) + return "scope: enum value expected"; + if (message.parent != null && $Object.hasOwnProperty.call(message, "parent")) { + properties._parent = 1; + if (!$util.isString(message.parent)) + return "parent: string expected"; + } + if (message.head != null && $Object.hasOwnProperty.call(message, "head")) { + properties._head = 1; + { + var error = $root.atomic.Hash.verify(message.head, _depth + 1); + if (error) + return "head." + error; + } + } + if (message.changeCount != null && $Object.hasOwnProperty.call(message, "changeCount")) + if (!$util.isInteger(message.changeCount) && !(message.changeCount && $util.isInteger(message.changeCount.low) && $util.isInteger(message.changeCount.high))) + return "changeCount: integer|Long expected"; + if (message.current != null && $Object.hasOwnProperty.call(message, "current")) + if (typeof message.current !== "boolean") + return "current: boolean expected"; + if (message.ref != null && $Object.hasOwnProperty.call(message, "ref")) { + var error = $root.atomic.ViewRef.verify(message.ref, _depth + 1); + if (error) + return "ref." + error; + } + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { + var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); + if (error) + return "snapshot." + error; + } + if (message.ownChangeCount != null && $Object.hasOwnProperty.call(message, "ownChangeCount")) { + properties._own_change_count = 1; + if (!$util.isInteger(message.ownChangeCount) && !(message.ownChangeCount && $util.isInteger(message.ownChangeCount.low) && $util.isInteger(message.ownChangeCount.high))) + return "ownChangeCount: integer|Long expected"; + } + if (message.inheritedChangeCount != null && $Object.hasOwnProperty.call(message, "inheritedChangeCount")) { + properties._inherited_change_count = 1; + if (!$util.isInteger(message.inheritedChangeCount) && !(message.inheritedChangeCount && $util.isInteger(message.inheritedChangeCount.low) && $util.isInteger(message.inheritedChangeCount.high))) + return "inheritedChangeCount: integer|Long expected"; + } + return null; + }; + + /** + * Creates a ViewInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ViewInfo + * @static + * @param {Object.} object Plain object + * @returns {atomic.ViewInfo} ViewInfo + */ + ViewInfo.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ViewInfo) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ViewInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ViewInfo(); + if (object.name != null) + if (typeof object.name !== "string" || object.name.length) + message.name = $String(object.name); + if (object.scope !== 0 && (typeof object.scope !== "string" || $root.atomic.ViewScope[object.scope] !== 0)) + switch (object.scope) { + case "VIEW_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "VIEW_SCOPE_DRAFT": + case 1: + message.scope = 1; + break; + case "VIEW_SCOPE_SHARED": + case 2: + message.scope = 2; + break; + default: + if (typeof object.scope === "number" && (object.scope | 0) === object.scope) + message.scope = object.scope; + } + if (object.parent != null) + message.parent = $String(object.parent); + if (object.head != null) { + if (!$util.isObject(object.head)) + throw $TypeError(".atomic.ViewInfo.head: object expected"); + message.head = $root.atomic.Hash.fromObject(object.head, _depth + 1); + } + if (object.changeCount != null) + if (typeof object.changeCount === "object" ? object.changeCount.low || object.changeCount.high : $Number(object.changeCount) !== 0) + if ($util.Long) + message.changeCount = $util.Long.fromValue(object.changeCount, true); + else if (typeof object.changeCount === "string") + message.changeCount = $parseInt(object.changeCount, 10); + else if (typeof object.changeCount === "number") + message.changeCount = object.changeCount; + else if (typeof object.changeCount === "object") + message.changeCount = new $util.LongBits(object.changeCount.low >>> 0, object.changeCount.high >>> 0).toNumber(true); + if (object.current != null) + if (object.current) + message.current = $Boolean(object.current); + if (object.ref != null) { + if (!$util.isObject(object.ref)) + throw $TypeError(".atomic.ViewInfo.ref: object expected"); + message.ref = $root.atomic.ViewRef.fromObject(object.ref, _depth + 1); + } + if (object.snapshot != null) { + if (!$util.isObject(object.snapshot)) + throw $TypeError(".atomic.ViewInfo.snapshot: object expected"); + message.snapshot = $root.atomic.ViewSnapshot.fromObject(object.snapshot, _depth + 1); + } + if (object.ownChangeCount != null) + if ($util.Long) + message.ownChangeCount = $util.Long.fromValue(object.ownChangeCount, true); + else if (typeof object.ownChangeCount === "string") + message.ownChangeCount = $parseInt(object.ownChangeCount, 10); + else if (typeof object.ownChangeCount === "number") + message.ownChangeCount = object.ownChangeCount; + else if (typeof object.ownChangeCount === "object") + message.ownChangeCount = new $util.LongBits(object.ownChangeCount.low >>> 0, object.ownChangeCount.high >>> 0).toNumber(true); + if (object.inheritedChangeCount != null) + if ($util.Long) + message.inheritedChangeCount = $util.Long.fromValue(object.inheritedChangeCount, true); + else if (typeof object.inheritedChangeCount === "string") + message.inheritedChangeCount = $parseInt(object.inheritedChangeCount, 10); + else if (typeof object.inheritedChangeCount === "number") + message.inheritedChangeCount = object.inheritedChangeCount; + else if (typeof object.inheritedChangeCount === "object") + message.inheritedChangeCount = new $util.LongBits(object.inheritedChangeCount.low >>> 0, object.inheritedChangeCount.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ViewInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ViewInfo + * @static + * @param {atomic.ViewInfo} message ViewInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ViewInfo.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.name = ""; + object.scope = options.enums === $String ? "VIEW_SCOPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.changeCount = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.changeCount = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.current = false; + object.ref = null; + object.snapshot = null; + } + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope")) + object.scope = options.enums === $String ? $root.atomic.ViewScope[message.scope] === $undefined ? message.scope : $root.atomic.ViewScope[message.scope] : message.scope; + if (message.parent != null && $Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.head != null && $Object.hasOwnProperty.call(message, "head")) + object.head = $root.atomic.Hash.toObject(message.head, options, _depth + 1); + if (message.changeCount != null && $Object.hasOwnProperty.call(message, "changeCount")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.changeCount = typeof message.changeCount === "number" ? $BigInt(message.changeCount) : $util.Long.fromBits(message.changeCount.low >>> 0, message.changeCount.high >>> 0, true).toBigInt(); + else if (typeof message.changeCount === "number") + object.changeCount = options.longs === $String ? $String(message.changeCount) : message.changeCount; + else + object.changeCount = options.longs === $String ? $util.Long.prototype.toString.call(message.changeCount) : options.longs === $Number ? new $util.LongBits(message.changeCount.low >>> 0, message.changeCount.high >>> 0).toNumber(true) : message.changeCount; + if (message.current != null && $Object.hasOwnProperty.call(message, "current")) + object.current = message.current; + if (message.ref != null && $Object.hasOwnProperty.call(message, "ref")) + object.ref = $root.atomic.ViewRef.toObject(message.ref, options, _depth + 1); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + object.snapshot = $root.atomic.ViewSnapshot.toObject(message.snapshot, options, _depth + 1); + if (message.ownChangeCount != null && $Object.hasOwnProperty.call(message, "ownChangeCount")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.ownChangeCount = typeof message.ownChangeCount === "number" ? $BigInt(message.ownChangeCount) : $util.Long.fromBits(message.ownChangeCount.low >>> 0, message.ownChangeCount.high >>> 0, true).toBigInt(); + else if (typeof message.ownChangeCount === "number") + object.ownChangeCount = options.longs === $String ? $String(message.ownChangeCount) : message.ownChangeCount; + else + object.ownChangeCount = options.longs === $String ? $util.Long.prototype.toString.call(message.ownChangeCount) : options.longs === $Number ? new $util.LongBits(message.ownChangeCount.low >>> 0, message.ownChangeCount.high >>> 0).toNumber(true) : message.ownChangeCount; + if (message.inheritedChangeCount != null && $Object.hasOwnProperty.call(message, "inheritedChangeCount")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.inheritedChangeCount = typeof message.inheritedChangeCount === "number" ? $BigInt(message.inheritedChangeCount) : $util.Long.fromBits(message.inheritedChangeCount.low >>> 0, message.inheritedChangeCount.high >>> 0, true).toBigInt(); + else if (typeof message.inheritedChangeCount === "number") + object.inheritedChangeCount = options.longs === $String ? $String(message.inheritedChangeCount) : message.inheritedChangeCount; + else + object.inheritedChangeCount = options.longs === $String ? $util.Long.prototype.toString.call(message.inheritedChangeCount) : options.longs === $Number ? new $util.LongBits(message.inheritedChangeCount.low >>> 0, message.inheritedChangeCount.high >>> 0).toNumber(true) : message.inheritedChangeCount; + return object; + }; + + /** + * Converts this ViewInfo to JSON. + * @function toJSON + * @memberof atomic.ViewInfo + * @instance + * @returns {Object.} JSON object + */ + ViewInfo.prototype.toJSON = function() { + return ViewInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ViewInfo + * @function getTypeUrl + * @memberof atomic.ViewInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ViewInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ViewInfo"; + }; + + return ViewInfo; + })(); + + /** + * ViewScope enum. + * @name atomic.ViewScope + * @enum {number} + * @property {number} VIEW_SCOPE_UNSPECIFIED=0 VIEW_SCOPE_UNSPECIFIED value + * @property {number} VIEW_SCOPE_DRAFT=1 VIEW_SCOPE_DRAFT value + * @property {number} VIEW_SCOPE_SHARED=2 VIEW_SCOPE_SHARED value + */ + atomic.ViewScope = (function() { + var valuesById = $Object.create(null), values = $Object.create(valuesById); + values[valuesById[0] = "VIEW_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIEW_SCOPE_DRAFT"] = 1; + values[valuesById[2] = "VIEW_SCOPE_SHARED"] = 2; + return values; + })(); + + atomic.CreateViewRequest = (function() { + + /** + * Properties of a CreateViewRequest. + * @typedef {Object} atomic.CreateViewRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] CreateViewRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] CreateViewRequest meta + * @property {string|null} [name] CreateViewRequest name + * @property {string|null} [fromView] CreateViewRequest fromView + * @property {boolean|null} [empty] CreateViewRequest empty + * @property {string|null} [parent] CreateViewRequest parent + * @property {atomic.ViewScope|null} [scope] CreateViewRequest scope + * @property {atomic.ViewSnapshot.$Properties|null} [baseSnapshot] CreateViewRequest baseSnapshot + * @property {"fromView"|"empty"|"parent"} [base] CreateViewRequest base + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CreateViewRequest. + * @memberof atomic + * @interface ICreateViewRequest + * @augments atomic.CreateViewRequest.$Properties + * @deprecated Use atomic.CreateViewRequest.$Properties instead. + */ + + /** + * Narrowed shape of a CreateViewRequest. + * @typedef {{ + * repository?: atomic.RepositoryRef.$Shape|null; + * meta?: atomic.RequestMeta.$Shape|null; + * name?: string|null; + * fromView?: string|null; + * empty?: boolean|null; + * parent?: string|null; + * scope?: atomic.ViewScope|null; + * baseSnapshot?: atomic.ViewSnapshot.$Shape|null; + * $unknowns?: Array.; + * } & ( + * ({ base?: undefined; fromView?: null; empty?: null; parent?: null }|{ base?: "fromView"; fromView: string; empty?: null; parent?: null }|{ base?: "empty"; fromView?: null; empty: boolean; parent?: null }|{ base?: "parent"; fromView?: null; empty?: null; parent: string }) + * )} atomic.CreateViewRequest.$Shape + */ + + /** + * Constructs a new CreateViewRequest. + * @memberof atomic + * @classdesc Represents a CreateViewRequest. + * @constructor + * @param {atomic.CreateViewRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var CreateViewRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * CreateViewRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.repository = null; + + /** + * CreateViewRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.meta = null; + + /** + * CreateViewRequest name. + * @member {string} name + * @memberof atomic.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.name = ""; + + /** + * CreateViewRequest fromView. + * @member {string|null|undefined} fromView + * @memberof atomic.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.fromView = null; + + /** + * CreateViewRequest empty. + * @member {boolean|null|undefined} empty + * @memberof atomic.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.empty = null; + + /** + * CreateViewRequest parent. + * @member {string|null|undefined} parent + * @memberof atomic.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.parent = null; + + /** + * CreateViewRequest scope. + * @member {atomic.ViewScope} scope + * @memberof atomic.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.scope = 0; + + /** + * CreateViewRequest baseSnapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} baseSnapshot + * @memberof atomic.CreateViewRequest + * @instance + */ + CreateViewRequest.prototype.baseSnapshot = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CreateViewRequest base. + * @member {"fromView"|"empty"|"parent"|undefined} base + * @memberof atomic.CreateViewRequest + * @instance + */ + $Object.defineProperty(CreateViewRequest.prototype, "base", { + get: $util.oneOfGetter($oneOfFields = ["fromView", "empty", "parent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(CreateViewRequest.prototype, "_base_snapshot", { + get: $util.oneOfGetter($oneOfFields = ["baseSnapshot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CreateViewRequest instance using the specified properties. + * @function create + * @memberof atomic.CreateViewRequest + * @static + * @param {atomic.CreateViewRequest.$Properties=} [properties] Properties to set + * @returns {atomic.CreateViewRequest} CreateViewRequest instance + * @type {{ + * (properties: atomic.CreateViewRequest.$Shape): atomic.CreateViewRequest & atomic.CreateViewRequest.$Shape; + * (properties?: atomic.CreateViewRequest.$Properties): atomic.CreateViewRequest; + * }} + */ + CreateViewRequest.create = function(properties) { + return new CreateViewRequest(properties); + }; + + /** + * Encodes the specified CreateViewRequest message. Does not implicitly {@link atomic.CreateViewRequest.verify|verify} messages. + * @function encode + * @memberof atomic.CreateViewRequest + * @static + * @param {atomic.CreateViewRequest.$Properties} message CreateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateViewRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.RequestMeta.encode(message.meta, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.name != null && $Object.hasOwnProperty.call(message, "name") && message.name !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.fromView); + if (message.empty != null && $Object.hasOwnProperty.call(message, "empty")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.empty); + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope") && message.scope !== 0) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.scope); + if (message.baseSnapshot != null && $Object.hasOwnProperty.call(message, "baseSnapshot")) + $root.atomic.ViewSnapshot.encode(message.baseSnapshot, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.parent != null && $Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.parent); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link atomic.CreateViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.CreateViewRequest + * @static + * @param {atomic.CreateViewRequest.$Properties} message CreateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateViewRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.CreateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.CreateViewRequest & atomic.CreateViewRequest.$Shape} CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateViewRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.CreateViewRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.meta = $root.atomic.RequestMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.name = value; + else + delete message.name; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.fromView = reader.stringVerify(); + message.base = "fromView"; + continue; + } + case 6: { + if (wireType !== 0) + break; + message.empty = reader.bool(); + message.base = "empty"; + continue; + } + case 10: { + if (wireType !== 2) + break; + message.parent = reader.stringVerify(); + message.base = "parent"; + continue; + } + case 8: { + if (wireType !== 0) + break; + if (value = reader.int32()) + message.scope = value; + else + delete message.scope; + continue; + } + case 9: { + if (wireType !== 2) + break; + message.baseSnapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.baseSnapshot); + message._base_snapshot = "baseSnapshot"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.CreateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.CreateViewRequest & atomic.CreateViewRequest.$Shape} CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateViewRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a CreateViewRequest message. + * @function verify + * @memberof atomic.CreateViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateViewRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.RequestMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) { + properties.base = 1; + if (!$util.isString(message.fromView)) + return "fromView: string expected"; + } + if (message.empty != null && $Object.hasOwnProperty.call(message, "empty")) { + if (properties.base === 1) + return "base: multiple values"; + properties.base = 1; + if (typeof message.empty !== "boolean") + return "empty: boolean expected"; + } + if (message.parent != null && $Object.hasOwnProperty.call(message, "parent")) { + if (properties.base === 1) + return "base: multiple values"; + properties.base = 1; + if (!$util.isString(message.parent)) + return "parent: string expected"; + } + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope")) + if (typeof message.scope !== "number" || (message.scope | 0) !== message.scope) + return "scope: enum value expected"; + if (message.baseSnapshot != null && $Object.hasOwnProperty.call(message, "baseSnapshot")) { + properties._base_snapshot = 1; + { + var error = $root.atomic.ViewSnapshot.verify(message.baseSnapshot, _depth + 1); + if (error) + return "baseSnapshot." + error; + } + } + return null; + }; + + /** + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.CreateViewRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.CreateViewRequest} CreateViewRequest + */ + CreateViewRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.CreateViewRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.CreateViewRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.CreateViewRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.CreateViewRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.CreateViewRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.name != null) + if (typeof object.name !== "string" || object.name.length) + message.name = $String(object.name); + if (object.fromView != null) + message.fromView = $String(object.fromView); + if (object.empty != null) + message.empty = $Boolean(object.empty); + if (object.parent != null) + message.parent = $String(object.parent); + if (object.scope !== 0 && (typeof object.scope !== "string" || $root.atomic.ViewScope[object.scope] !== 0)) + switch (object.scope) { + case "VIEW_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "VIEW_SCOPE_DRAFT": + case 1: + message.scope = 1; + break; + case "VIEW_SCOPE_SHARED": + case 2: + message.scope = 2; + break; + default: + if (typeof object.scope === "number" && (object.scope | 0) === object.scope) + message.scope = object.scope; + } + if (object.baseSnapshot != null) { + if (!$util.isObject(object.baseSnapshot)) + throw $TypeError(".atomic.CreateViewRequest.baseSnapshot: object expected"); + message.baseSnapshot = $root.atomic.ViewSnapshot.fromObject(object.baseSnapshot, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.CreateViewRequest + * @static + * @param {atomic.CreateViewRequest} message CreateViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateViewRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.meta = null; + object.name = ""; + object.scope = options.enums === $String ? "VIEW_SCOPE_UNSPECIFIED" : 0; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.RequestMeta.toObject(message.meta, options, _depth + 1); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) { + object.fromView = message.fromView; + if (options.oneofs) + object.base = "fromView"; + } + if (message.empty != null && $Object.hasOwnProperty.call(message, "empty")) { + object.empty = message.empty; + if (options.oneofs) + object.base = "empty"; + } + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope")) + object.scope = options.enums === $String ? $root.atomic.ViewScope[message.scope] === $undefined ? message.scope : $root.atomic.ViewScope[message.scope] : message.scope; + if (message.baseSnapshot != null && $Object.hasOwnProperty.call(message, "baseSnapshot")) + object.baseSnapshot = $root.atomic.ViewSnapshot.toObject(message.baseSnapshot, options, _depth + 1); + if (message.parent != null && $Object.hasOwnProperty.call(message, "parent")) { + object.parent = message.parent; + if (options.oneofs) + object.base = "parent"; + } + return object; + }; + + /** + * Converts this CreateViewRequest to JSON. + * @function toJSON + * @memberof atomic.CreateViewRequest + * @instance + * @returns {Object.} JSON object + */ + CreateViewRequest.prototype.toJSON = function() { + return CreateViewRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CreateViewRequest + * @function getTypeUrl + * @memberof atomic.CreateViewRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CreateViewRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.CreateViewRequest"; + }; + + return CreateViewRequest; + })(); + + atomic.CreateViewResponse = (function() { + + /** + * Properties of a CreateViewResponse. + * @typedef {Object} atomic.CreateViewResponse.$Properties + * @property {atomic.ViewInfo.$Properties|null} [view] CreateViewResponse view + * @property {atomic.ResponseMeta.$Properties|null} [meta] CreateViewResponse meta + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CreateViewResponse. + * @memberof atomic + * @interface ICreateViewResponse + * @augments atomic.CreateViewResponse.$Properties + * @deprecated Use atomic.CreateViewResponse.$Properties instead. + */ + + /** + * Shape of a CreateViewResponse. + * @typedef {atomic.CreateViewResponse.$Properties} atomic.CreateViewResponse.$Shape + */ + + /** + * Constructs a new CreateViewResponse. + * @memberof atomic + * @classdesc Represents a CreateViewResponse. + * @constructor + * @param {atomic.CreateViewResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var CreateViewResponse = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * CreateViewResponse view. + * @member {atomic.ViewInfo.$Properties|null|undefined} view + * @memberof atomic.CreateViewResponse + * @instance + */ + CreateViewResponse.prototype.view = null; + + /** + * CreateViewResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.CreateViewResponse + * @instance + */ + CreateViewResponse.prototype.meta = null; + + /** + * Creates a new CreateViewResponse instance using the specified properties. + * @function create + * @memberof atomic.CreateViewResponse + * @static + * @param {atomic.CreateViewResponse.$Properties=} [properties] Properties to set + * @returns {atomic.CreateViewResponse} CreateViewResponse instance + * @type {{ + * (properties: atomic.CreateViewResponse.$Shape): atomic.CreateViewResponse & atomic.CreateViewResponse.$Shape; + * (properties?: atomic.CreateViewResponse.$Properties): atomic.CreateViewResponse; + * }} + */ + CreateViewResponse.create = function(properties) { + return new CreateViewResponse(properties); + }; + + /** + * Encodes the specified CreateViewResponse message. Does not implicitly {@link atomic.CreateViewResponse.verify|verify} messages. + * @function encode + * @memberof atomic.CreateViewResponse + * @static + * @param {atomic.CreateViewResponse.$Properties} message CreateViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateViewResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + $root.atomic.ViewInfo.encode(message.view, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.ResponseMeta.encode(message.meta, writer.uint32(/* id 100, wireType 2 =*/802).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified CreateViewResponse message, length delimited. Does not implicitly {@link atomic.CreateViewResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.CreateViewResponse + * @static + * @param {atomic.CreateViewResponse.$Properties} message CreateViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateViewResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a CreateViewResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.CreateViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.CreateViewResponse & atomic.CreateViewResponse.$Shape} CreateViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateViewResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.CreateViewResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.view = $root.atomic.ViewInfo.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + continue; + } + case 100: { + if (wireType !== 2) + break; + message.meta = $root.atomic.ResponseMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a CreateViewResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.CreateViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.CreateViewResponse & atomic.CreateViewResponse.$Shape} CreateViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateViewResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a CreateViewResponse message. + * @function verify + * @memberof atomic.CreateViewResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateViewResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + var error = $root.atomic.ViewInfo.verify(message.view, _depth + 1); + if (error) + return "view." + error; + } + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.ResponseMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + return null; + }; + + /** + * Creates a CreateViewResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.CreateViewResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.CreateViewResponse} CreateViewResponse + */ + CreateViewResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.CreateViewResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.CreateViewResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.CreateViewResponse(); + if (object.view != null) { + if (!$util.isObject(object.view)) + throw $TypeError(".atomic.CreateViewResponse.view: object expected"); + message.view = $root.atomic.ViewInfo.fromObject(object.view, _depth + 1); + } + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.CreateViewResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateViewResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.CreateViewResponse + * @static + * @param {atomic.CreateViewResponse} message CreateViewResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateViewResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.view = null; + object.meta = null; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = $root.atomic.ViewInfo.toObject(message.view, options, _depth + 1); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.ResponseMeta.toObject(message.meta, options, _depth + 1); + return object; + }; + + /** + * Converts this CreateViewResponse to JSON. + * @function toJSON + * @memberof atomic.CreateViewResponse + * @instance + * @returns {Object.} JSON object + */ + CreateViewResponse.prototype.toJSON = function() { + return CreateViewResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CreateViewResponse + * @function getTypeUrl + * @memberof atomic.CreateViewResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CreateViewResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.CreateViewResponse"; + }; + + return CreateViewResponse; + })(); + + atomic.SwitchViewRequest = (function() { + + /** + * Properties of a SwitchViewRequest. + * @typedef {Object} atomic.SwitchViewRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] SwitchViewRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] SwitchViewRequest meta + * @property {string|null} [view] SwitchViewRequest view + * @property {boolean|null} [bypassDirtyCheck] SwitchViewRequest bypassDirtyCheck + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SwitchViewRequest. + * @memberof atomic + * @interface ISwitchViewRequest + * @augments atomic.SwitchViewRequest.$Properties + * @deprecated Use atomic.SwitchViewRequest.$Properties instead. + */ + + /** + * Shape of a SwitchViewRequest. + * @typedef {atomic.SwitchViewRequest.$Properties} atomic.SwitchViewRequest.$Shape + */ + + /** + * Constructs a new SwitchViewRequest. + * @memberof atomic + * @classdesc Represents a SwitchViewRequest. + * @constructor + * @param {atomic.SwitchViewRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var SwitchViewRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * SwitchViewRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.SwitchViewRequest + * @instance + */ + SwitchViewRequest.prototype.repository = null; + + /** + * SwitchViewRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.SwitchViewRequest + * @instance + */ + SwitchViewRequest.prototype.meta = null; + + /** + * SwitchViewRequest view. + * @member {string} view + * @memberof atomic.SwitchViewRequest + * @instance + */ + SwitchViewRequest.prototype.view = ""; + + /** + * SwitchViewRequest bypassDirtyCheck. + * @member {boolean|null|undefined} bypassDirtyCheck + * @memberof atomic.SwitchViewRequest + * @instance + */ + SwitchViewRequest.prototype.bypassDirtyCheck = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(SwitchViewRequest.prototype, "_bypass_dirty_check", { + get: $util.oneOfGetter($oneOfFields = ["bypassDirtyCheck"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SwitchViewRequest instance using the specified properties. + * @function create + * @memberof atomic.SwitchViewRequest + * @static + * @param {atomic.SwitchViewRequest.$Properties=} [properties] Properties to set + * @returns {atomic.SwitchViewRequest} SwitchViewRequest instance + * @type {{ + * (properties: atomic.SwitchViewRequest.$Shape): atomic.SwitchViewRequest & atomic.SwitchViewRequest.$Shape; + * (properties?: atomic.SwitchViewRequest.$Properties): atomic.SwitchViewRequest; + * }} + */ + SwitchViewRequest.create = function(properties) { + return new SwitchViewRequest(properties); + }; + + /** + * Encodes the specified SwitchViewRequest message. Does not implicitly {@link atomic.SwitchViewRequest.verify|verify} messages. + * @function encode + * @memberof atomic.SwitchViewRequest + * @static + * @param {atomic.SwitchViewRequest.$Properties} message SwitchViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SwitchViewRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.RequestMeta.encode(message.meta, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.view != null && $Object.hasOwnProperty.call(message, "view") && message.view !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.view); + if (message.bypassDirtyCheck != null && $Object.hasOwnProperty.call(message, "bypassDirtyCheck")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.bypassDirtyCheck); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified SwitchViewRequest message, length delimited. Does not implicitly {@link atomic.SwitchViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.SwitchViewRequest + * @static + * @param {atomic.SwitchViewRequest.$Properties} message SwitchViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SwitchViewRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a SwitchViewRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.SwitchViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.SwitchViewRequest & atomic.SwitchViewRequest.$Shape} SwitchViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SwitchViewRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.SwitchViewRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.meta = $root.atomic.RequestMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.view = value; + else + delete message.view; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.bypassDirtyCheck = reader.bool(); + message._bypass_dirty_check = "bypassDirtyCheck"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a SwitchViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.SwitchViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.SwitchViewRequest & atomic.SwitchViewRequest.$Shape} SwitchViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SwitchViewRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a SwitchViewRequest message. + * @function verify + * @memberof atomic.SwitchViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SwitchViewRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.RequestMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + if (!$util.isString(message.view)) + return "view: string expected"; + if (message.bypassDirtyCheck != null && $Object.hasOwnProperty.call(message, "bypassDirtyCheck")) { + properties._bypass_dirty_check = 1; + if (typeof message.bypassDirtyCheck !== "boolean") + return "bypassDirtyCheck: boolean expected"; + } + return null; + }; + + /** + * Creates a SwitchViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.SwitchViewRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.SwitchViewRequest} SwitchViewRequest + */ + SwitchViewRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.SwitchViewRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.SwitchViewRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.SwitchViewRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.SwitchViewRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.SwitchViewRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.view != null) + if (typeof object.view !== "string" || object.view.length) + message.view = $String(object.view); + if (object.bypassDirtyCheck != null) + message.bypassDirtyCheck = $Boolean(object.bypassDirtyCheck); + return message; + }; + + /** + * Creates a plain object from a SwitchViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.SwitchViewRequest + * @static + * @param {atomic.SwitchViewRequest} message SwitchViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SwitchViewRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.meta = null; + object.view = ""; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.RequestMeta.toObject(message.meta, options, _depth + 1); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + if (message.bypassDirtyCheck != null && $Object.hasOwnProperty.call(message, "bypassDirtyCheck")) + object.bypassDirtyCheck = message.bypassDirtyCheck; + return object; + }; + + /** + * Converts this SwitchViewRequest to JSON. + * @function toJSON + * @memberof atomic.SwitchViewRequest + * @instance + * @returns {Object.} JSON object + */ + SwitchViewRequest.prototype.toJSON = function() { + return SwitchViewRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SwitchViewRequest + * @function getTypeUrl + * @memberof atomic.SwitchViewRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SwitchViewRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.SwitchViewRequest"; + }; + + return SwitchViewRequest; + })(); + + atomic.SwitchViewResponse = (function() { + + /** + * Properties of a SwitchViewResponse. + * @typedef {Object} atomic.SwitchViewResponse.$Properties + * @property {number|Long|null} [filesWritten] SwitchViewResponse filesWritten + * @property {atomic.ResponseMeta.$Properties|null} [meta] SwitchViewResponse meta + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a SwitchViewResponse. + * @memberof atomic + * @interface ISwitchViewResponse + * @augments atomic.SwitchViewResponse.$Properties + * @deprecated Use atomic.SwitchViewResponse.$Properties instead. + */ + + /** + * Shape of a SwitchViewResponse. + * @typedef {atomic.SwitchViewResponse.$Properties} atomic.SwitchViewResponse.$Shape + */ + + /** + * Constructs a new SwitchViewResponse. + * @memberof atomic + * @classdesc Represents a SwitchViewResponse. + * @constructor + * @param {atomic.SwitchViewResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var SwitchViewResponse = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * SwitchViewResponse filesWritten. + * @member {number|Long} filesWritten + * @memberof atomic.SwitchViewResponse + * @instance + */ + SwitchViewResponse.prototype.filesWritten = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SwitchViewResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.SwitchViewResponse + * @instance + */ + SwitchViewResponse.prototype.meta = null; + + /** + * Creates a new SwitchViewResponse instance using the specified properties. + * @function create + * @memberof atomic.SwitchViewResponse + * @static + * @param {atomic.SwitchViewResponse.$Properties=} [properties] Properties to set + * @returns {atomic.SwitchViewResponse} SwitchViewResponse instance + * @type {{ + * (properties: atomic.SwitchViewResponse.$Shape): atomic.SwitchViewResponse & atomic.SwitchViewResponse.$Shape; + * (properties?: atomic.SwitchViewResponse.$Properties): atomic.SwitchViewResponse; + * }} + */ + SwitchViewResponse.create = function(properties) { + return new SwitchViewResponse(properties); + }; + + /** + * Encodes the specified SwitchViewResponse message. Does not implicitly {@link atomic.SwitchViewResponse.verify|verify} messages. + * @function encode + * @memberof atomic.SwitchViewResponse + * @static + * @param {atomic.SwitchViewResponse.$Properties} message SwitchViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SwitchViewResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.filesWritten != null && $Object.hasOwnProperty.call(message, "filesWritten") && (typeof message.filesWritten === "object" ? message.filesWritten.low || message.filesWritten.high : message.filesWritten !== 0)) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.filesWritten); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.ResponseMeta.encode(message.meta, writer.uint32(/* id 100, wireType 2 =*/802).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified SwitchViewResponse message, length delimited. Does not implicitly {@link atomic.SwitchViewResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.SwitchViewResponse + * @static + * @param {atomic.SwitchViewResponse.$Properties} message SwitchViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SwitchViewResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a SwitchViewResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.SwitchViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.SwitchViewResponse & atomic.SwitchViewResponse.$Shape} SwitchViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SwitchViewResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.SwitchViewResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.filesWritten = value; + else + delete message.filesWritten; + continue; + } + case 100: { + if (wireType !== 2) + break; + message.meta = $root.atomic.ResponseMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a SwitchViewResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.SwitchViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.SwitchViewResponse & atomic.SwitchViewResponse.$Shape} SwitchViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SwitchViewResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a SwitchViewResponse message. + * @function verify + * @memberof atomic.SwitchViewResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SwitchViewResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.filesWritten != null && $Object.hasOwnProperty.call(message, "filesWritten")) + if (!$util.isInteger(message.filesWritten) && !(message.filesWritten && $util.isInteger(message.filesWritten.low) && $util.isInteger(message.filesWritten.high))) + return "filesWritten: integer|Long expected"; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.ResponseMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + return null; + }; + + /** + * Creates a SwitchViewResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.SwitchViewResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.SwitchViewResponse} SwitchViewResponse + */ + SwitchViewResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.SwitchViewResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.SwitchViewResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.SwitchViewResponse(); + if (object.filesWritten != null) + if (typeof object.filesWritten === "object" ? object.filesWritten.low || object.filesWritten.high : $Number(object.filesWritten) !== 0) + if ($util.Long) + message.filesWritten = $util.Long.fromValue(object.filesWritten, true); + else if (typeof object.filesWritten === "string") + message.filesWritten = $parseInt(object.filesWritten, 10); + else if (typeof object.filesWritten === "number") + message.filesWritten = object.filesWritten; + else if (typeof object.filesWritten === "object") + message.filesWritten = new $util.LongBits(object.filesWritten.low >>> 0, object.filesWritten.high >>> 0).toNumber(true); + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.SwitchViewResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a SwitchViewResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.SwitchViewResponse + * @static + * @param {atomic.SwitchViewResponse} message SwitchViewResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SwitchViewResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.filesWritten = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.filesWritten = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.meta = null; + } + if (message.filesWritten != null && $Object.hasOwnProperty.call(message, "filesWritten")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.filesWritten = typeof message.filesWritten === "number" ? $BigInt(message.filesWritten) : $util.Long.fromBits(message.filesWritten.low >>> 0, message.filesWritten.high >>> 0, true).toBigInt(); + else if (typeof message.filesWritten === "number") + object.filesWritten = options.longs === $String ? $String(message.filesWritten) : message.filesWritten; + else + object.filesWritten = options.longs === $String ? $util.Long.prototype.toString.call(message.filesWritten) : options.longs === $Number ? new $util.LongBits(message.filesWritten.low >>> 0, message.filesWritten.high >>> 0).toNumber(true) : message.filesWritten; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.ResponseMeta.toObject(message.meta, options, _depth + 1); + return object; + }; + + /** + * Converts this SwitchViewResponse to JSON. + * @function toJSON + * @memberof atomic.SwitchViewResponse + * @instance + * @returns {Object.} JSON object + */ + SwitchViewResponse.prototype.toJSON = function() { + return SwitchViewResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for SwitchViewResponse + * @function getTypeUrl + * @memberof atomic.SwitchViewResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + SwitchViewResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.SwitchViewResponse"; + }; + + return SwitchViewResponse; + })(); + + atomic.DeleteViewRequest = (function() { + + /** + * Properties of a DeleteViewRequest. + * @typedef {Object} atomic.DeleteViewRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] DeleteViewRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] DeleteViewRequest meta + * @property {string|null} [view] DeleteViewRequest view + * @property {atomic.ExpectedState.$Properties|null} [expected] DeleteViewRequest expected + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a DeleteViewRequest. + * @memberof atomic + * @interface IDeleteViewRequest + * @augments atomic.DeleteViewRequest.$Properties + * @deprecated Use atomic.DeleteViewRequest.$Properties instead. + */ + + /** + * Shape of a DeleteViewRequest. + * @typedef {{ + * repository?: atomic.RepositoryRef.$Shape|null; + * meta?: atomic.RequestMeta.$Shape|null; + * view?: string|null; + * expected?: atomic.ExpectedState.$Shape|null; + * $unknowns?: Array.; + * }} atomic.DeleteViewRequest.$Shape + */ + + /** + * Constructs a new DeleteViewRequest. + * @memberof atomic + * @classdesc Represents a DeleteViewRequest. + * @constructor + * @param {atomic.DeleteViewRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var DeleteViewRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * DeleteViewRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.DeleteViewRequest + * @instance + */ + DeleteViewRequest.prototype.repository = null; + + /** + * DeleteViewRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.DeleteViewRequest + * @instance + */ + DeleteViewRequest.prototype.meta = null; + + /** + * DeleteViewRequest view. + * @member {string} view + * @memberof atomic.DeleteViewRequest + * @instance + */ + DeleteViewRequest.prototype.view = ""; + + /** + * DeleteViewRequest expected. + * @member {atomic.ExpectedState.$Properties|null|undefined} expected + * @memberof atomic.DeleteViewRequest + * @instance + */ + DeleteViewRequest.prototype.expected = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(DeleteViewRequest.prototype, "_expected", { + get: $util.oneOfGetter($oneOfFields = ["expected"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeleteViewRequest instance using the specified properties. + * @function create + * @memberof atomic.DeleteViewRequest + * @static + * @param {atomic.DeleteViewRequest.$Properties=} [properties] Properties to set + * @returns {atomic.DeleteViewRequest} DeleteViewRequest instance + * @type {{ + * (properties: atomic.DeleteViewRequest.$Shape): atomic.DeleteViewRequest & atomic.DeleteViewRequest.$Shape; + * (properties?: atomic.DeleteViewRequest.$Properties): atomic.DeleteViewRequest; + * }} + */ + DeleteViewRequest.create = function(properties) { + return new DeleteViewRequest(properties); + }; + + /** + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link atomic.DeleteViewRequest.verify|verify} messages. + * @function encode + * @memberof atomic.DeleteViewRequest + * @static + * @param {atomic.DeleteViewRequest.$Properties} message DeleteViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.RequestMeta.encode(message.meta, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.view != null && $Object.hasOwnProperty.call(message, "view") && message.view !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.view); + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) + $root.atomic.ExpectedState.encode(message.expected, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link atomic.DeleteViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.DeleteViewRequest + * @static + * @param {atomic.DeleteViewRequest.$Properties} message DeleteViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.DeleteViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.DeleteViewRequest & atomic.DeleteViewRequest.$Shape} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.DeleteViewRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.meta = $root.atomic.RequestMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.view = value; + else + delete message.view; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.expected = $root.atomic.ExpectedState.decode(reader, reader.size(), $undefined, _depth + 1, message.expected); + message._expected = "expected"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.DeleteViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.DeleteViewRequest & atomic.DeleteViewRequest.$Shape} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a DeleteViewRequest message. + * @function verify + * @memberof atomic.DeleteViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteViewRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.RequestMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + if (!$util.isString(message.view)) + return "view: string expected"; + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) { + properties._expected = 1; + { + var error = $root.atomic.ExpectedState.verify(message.expected, _depth + 1); + if (error) + return "expected." + error; + } + } + return null; + }; + + /** + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.DeleteViewRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.DeleteViewRequest} DeleteViewRequest + */ + DeleteViewRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.DeleteViewRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.DeleteViewRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.DeleteViewRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.DeleteViewRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.DeleteViewRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.view != null) + if (typeof object.view !== "string" || object.view.length) + message.view = $String(object.view); + if (object.expected != null) { + if (!$util.isObject(object.expected)) + throw $TypeError(".atomic.DeleteViewRequest.expected: object expected"); + message.expected = $root.atomic.ExpectedState.fromObject(object.expected, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.DeleteViewRequest + * @static + * @param {atomic.DeleteViewRequest} message DeleteViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteViewRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.meta = null; + object.view = ""; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.RequestMeta.toObject(message.meta, options, _depth + 1); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) + object.expected = $root.atomic.ExpectedState.toObject(message.expected, options, _depth + 1); + return object; + }; + + /** + * Converts this DeleteViewRequest to JSON. + * @function toJSON + * @memberof atomic.DeleteViewRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteViewRequest.prototype.toJSON = function() { + return DeleteViewRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DeleteViewRequest + * @function getTypeUrl + * @memberof atomic.DeleteViewRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DeleteViewRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.DeleteViewRequest"; + }; + + return DeleteViewRequest; + })(); + + atomic.DeleteViewResponse = (function() { + + /** + * Properties of a DeleteViewResponse. + * @typedef {Object} atomic.DeleteViewResponse.$Properties + * @property {atomic.ResponseMeta.$Properties|null} [meta] DeleteViewResponse meta + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a DeleteViewResponse. + * @memberof atomic + * @interface IDeleteViewResponse + * @augments atomic.DeleteViewResponse.$Properties + * @deprecated Use atomic.DeleteViewResponse.$Properties instead. + */ + + /** + * Shape of a DeleteViewResponse. + * @typedef {atomic.DeleteViewResponse.$Properties} atomic.DeleteViewResponse.$Shape + */ + + /** + * Constructs a new DeleteViewResponse. + * @memberof atomic + * @classdesc Represents a DeleteViewResponse. + * @constructor + * @param {atomic.DeleteViewResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var DeleteViewResponse = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * DeleteViewResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.DeleteViewResponse + * @instance + */ + DeleteViewResponse.prototype.meta = null; + + /** + * Creates a new DeleteViewResponse instance using the specified properties. + * @function create + * @memberof atomic.DeleteViewResponse + * @static + * @param {atomic.DeleteViewResponse.$Properties=} [properties] Properties to set + * @returns {atomic.DeleteViewResponse} DeleteViewResponse instance + * @type {{ + * (properties: atomic.DeleteViewResponse.$Shape): atomic.DeleteViewResponse & atomic.DeleteViewResponse.$Shape; + * (properties?: atomic.DeleteViewResponse.$Properties): atomic.DeleteViewResponse; + * }} + */ + DeleteViewResponse.create = function(properties) { + return new DeleteViewResponse(properties); + }; + + /** + * Encodes the specified DeleteViewResponse message. Does not implicitly {@link atomic.DeleteViewResponse.verify|verify} messages. + * @function encode + * @memberof atomic.DeleteViewResponse + * @static + * @param {atomic.DeleteViewResponse.$Properties} message DeleteViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.ResponseMeta.encode(message.meta, writer.uint32(/* id 100, wireType 2 =*/802).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified DeleteViewResponse message, length delimited. Does not implicitly {@link atomic.DeleteViewResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.DeleteViewResponse + * @static + * @param {atomic.DeleteViewResponse.$Properties} message DeleteViewResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a DeleteViewResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.DeleteViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.DeleteViewResponse & atomic.DeleteViewResponse.$Shape} DeleteViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.DeleteViewResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 100: { + if (wireType !== 2) + break; + message.meta = $root.atomic.ResponseMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a DeleteViewResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.DeleteViewResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.DeleteViewResponse & atomic.DeleteViewResponse.$Shape} DeleteViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a DeleteViewResponse message. + * @function verify + * @memberof atomic.DeleteViewResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteViewResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.ResponseMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + return null; + }; + + /** + * Creates a DeleteViewResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.DeleteViewResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.DeleteViewResponse} DeleteViewResponse + */ + DeleteViewResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.DeleteViewResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.DeleteViewResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.DeleteViewResponse(); + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.DeleteViewResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a DeleteViewResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.DeleteViewResponse + * @static + * @param {atomic.DeleteViewResponse} message DeleteViewResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteViewResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.meta = null; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.ResponseMeta.toObject(message.meta, options, _depth + 1); + return object; + }; + + /** + * Converts this DeleteViewResponse to JSON. + * @function toJSON + * @memberof atomic.DeleteViewResponse + * @instance + * @returns {Object.} JSON object + */ + DeleteViewResponse.prototype.toJSON = function() { + return DeleteViewResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for DeleteViewResponse + * @function getTypeUrl + * @memberof atomic.DeleteViewResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + DeleteViewResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.DeleteViewResponse"; + }; + + return DeleteViewResponse; + })(); + + atomic.GetVaultEntryRequest = (function() { + + /** + * Properties of a GetVaultEntryRequest. + * @typedef {Object} atomic.GetVaultEntryRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] GetVaultEntryRequest repository + * @property {atomic.VaultEntityKind|null} [kind] GetVaultEntryRequest kind + * @property {string|null} [id] GetVaultEntryRequest id + * @property {string|null} [path] GetVaultEntryRequest path + * @property {boolean|null} [includeBundle] GetVaultEntryRequest includeBundle + * @property {atomic.ViewRef.$Properties|null} [view] GetVaultEntryRequest view + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetVaultEntryRequest. + * @memberof atomic + * @interface IGetVaultEntryRequest + * @augments atomic.GetVaultEntryRequest.$Properties + * @deprecated Use atomic.GetVaultEntryRequest.$Properties instead. + */ + + /** + * Shape of a GetVaultEntryRequest. + * @typedef {atomic.GetVaultEntryRequest.$Properties} atomic.GetVaultEntryRequest.$Shape + */ + + /** + * Constructs a new GetVaultEntryRequest. + * @memberof atomic + * @classdesc Represents a GetVaultEntryRequest. + * @constructor + * @param {atomic.GetVaultEntryRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetVaultEntryRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetVaultEntryRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.GetVaultEntryRequest + * @instance + */ + GetVaultEntryRequest.prototype.repository = null; + + /** + * GetVaultEntryRequest kind. + * @member {atomic.VaultEntityKind} kind + * @memberof atomic.GetVaultEntryRequest + * @instance + */ + GetVaultEntryRequest.prototype.kind = 0; + + /** + * GetVaultEntryRequest id. + * @member {string} id + * @memberof atomic.GetVaultEntryRequest + * @instance + */ + GetVaultEntryRequest.prototype.id = ""; + + /** + * GetVaultEntryRequest path. + * @member {string|null|undefined} path + * @memberof atomic.GetVaultEntryRequest + * @instance + */ + GetVaultEntryRequest.prototype.path = null; + + /** + * GetVaultEntryRequest includeBundle. + * @member {boolean} includeBundle + * @memberof atomic.GetVaultEntryRequest + * @instance + */ + GetVaultEntryRequest.prototype.includeBundle = false; + + /** + * GetVaultEntryRequest view. + * @member {atomic.ViewRef.$Properties|null|undefined} view + * @memberof atomic.GetVaultEntryRequest + * @instance + */ + GetVaultEntryRequest.prototype.view = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetVaultEntryRequest.prototype, "_path", { + get: $util.oneOfGetter($oneOfFields = ["path"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetVaultEntryRequest instance using the specified properties. + * @function create + * @memberof atomic.GetVaultEntryRequest + * @static + * @param {atomic.GetVaultEntryRequest.$Properties=} [properties] Properties to set + * @returns {atomic.GetVaultEntryRequest} GetVaultEntryRequest instance + * @type {{ + * (properties: atomic.GetVaultEntryRequest.$Shape): atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape; + * (properties?: atomic.GetVaultEntryRequest.$Properties): atomic.GetVaultEntryRequest; + * }} + */ + GetVaultEntryRequest.create = function(properties) { + return new GetVaultEntryRequest(properties); + }; + + /** + * Encodes the specified GetVaultEntryRequest message. Does not implicitly {@link atomic.GetVaultEntryRequest.verify|verify} messages. + * @function encode + * @memberof atomic.GetVaultEntryRequest + * @static + * @param {atomic.GetVaultEntryRequest.$Properties} message GetVaultEntryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVaultEntryRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind") && message.kind !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.kind); + if (message.id != null && $Object.hasOwnProperty.call(message, "id") && message.id !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.id); + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.path); + if (message.includeBundle != null && $Object.hasOwnProperty.call(message, "includeBundle") && message.includeBundle !== false) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.includeBundle); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + $root.atomic.ViewRef.encode(message.view, writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetVaultEntryRequest message, length delimited. Does not implicitly {@link atomic.GetVaultEntryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetVaultEntryRequest + * @static + * @param {atomic.GetVaultEntryRequest.$Properties} message GetVaultEntryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVaultEntryRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetVaultEntryRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetVaultEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape} GetVaultEntryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVaultEntryRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetVaultEntryRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.int32()) + message.kind = value; + else + delete message.kind; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.id = value; + else + delete message.id; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.path = reader.stringVerify(); + message._path = "path"; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.includeBundle = value; + else + delete message.includeBundle; + continue; + } + case 20: { + if (wireType !== 2) + break; + message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetVaultEntryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetVaultEntryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape} GetVaultEntryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVaultEntryRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetVaultEntryRequest message. + * @function verify + * @memberof atomic.GetVaultEntryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVaultEntryRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + if (typeof message.kind !== "number" || (message.kind | 0) !== message.kind) + return "kind: enum value expected"; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) { + properties._path = 1; + if (!$util.isString(message.path)) + return "path: string expected"; + } + if (message.includeBundle != null && $Object.hasOwnProperty.call(message, "includeBundle")) + if (typeof message.includeBundle !== "boolean") + return "includeBundle: boolean expected"; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + var error = $root.atomic.ViewRef.verify(message.view, _depth + 1); + if (error) + return "view." + error; + } + return null; + }; + + /** + * Creates a GetVaultEntryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetVaultEntryRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetVaultEntryRequest} GetVaultEntryRequest + */ + GetVaultEntryRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetVaultEntryRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetVaultEntryRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetVaultEntryRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.GetVaultEntryRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.kind !== 0 && (typeof object.kind !== "string" || $root.atomic.VaultEntityKind[object.kind] !== 0)) + switch (object.kind) { + case "VAULT_ENTITY_KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "VAULT_ENTITY_KIND_INTENT": + case 1: + message.kind = 1; + break; + case "VAULT_ENTITY_KIND_MEMORY": + case 2: + message.kind = 2; + break; + case "VAULT_ENTITY_KIND_GOAL": + case 3: + message.kind = 3; + break; + default: + if (typeof object.kind === "number" && (object.kind | 0) === object.kind) + message.kind = object.kind; + } + if (object.id != null) + if (typeof object.id !== "string" || object.id.length) + message.id = $String(object.id); + if (object.path != null) + message.path = $String(object.path); + if (object.includeBundle != null) + if (object.includeBundle) + message.includeBundle = $Boolean(object.includeBundle); + if (object.view != null) { + if (!$util.isObject(object.view)) + throw $TypeError(".atomic.GetVaultEntryRequest.view: object expected"); + message.view = $root.atomic.ViewRef.fromObject(object.view, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a GetVaultEntryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetVaultEntryRequest + * @static + * @param {atomic.GetVaultEntryRequest} message GetVaultEntryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVaultEntryRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.kind = options.enums === $String ? "VAULT_ENTITY_KIND_UNSPECIFIED" : 0; + object.id = ""; + object.includeBundle = false; + object.view = null; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + object.kind = options.enums === $String ? $root.atomic.VaultEntityKind[message.kind] === $undefined ? message.kind : $root.atomic.VaultEntityKind[message.kind] : message.kind; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + object.id = message.id; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.includeBundle != null && $Object.hasOwnProperty.call(message, "includeBundle")) + object.includeBundle = message.includeBundle; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = $root.atomic.ViewRef.toObject(message.view, options, _depth + 1); + return object; + }; + + /** + * Converts this GetVaultEntryRequest to JSON. + * @function toJSON + * @memberof atomic.GetVaultEntryRequest + * @instance + * @returns {Object.} JSON object + */ + GetVaultEntryRequest.prototype.toJSON = function() { + return GetVaultEntryRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetVaultEntryRequest + * @function getTypeUrl + * @memberof atomic.GetVaultEntryRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetVaultEntryRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetVaultEntryRequest"; + }; + + return GetVaultEntryRequest; + })(); + + /** + * VaultEntityKind enum. + * @name atomic.VaultEntityKind + * @enum {number} + * @property {number} VAULT_ENTITY_KIND_UNSPECIFIED=0 VAULT_ENTITY_KIND_UNSPECIFIED value + * @property {number} VAULT_ENTITY_KIND_INTENT=1 VAULT_ENTITY_KIND_INTENT value + * @property {number} VAULT_ENTITY_KIND_MEMORY=2 VAULT_ENTITY_KIND_MEMORY value + * @property {number} VAULT_ENTITY_KIND_GOAL=3 VAULT_ENTITY_KIND_GOAL value + */ + atomic.VaultEntityKind = (function() { + var valuesById = $Object.create(null), values = $Object.create(valuesById); + values[valuesById[0] = "VAULT_ENTITY_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "VAULT_ENTITY_KIND_INTENT"] = 1; + values[valuesById[2] = "VAULT_ENTITY_KIND_MEMORY"] = 2; + values[valuesById[3] = "VAULT_ENTITY_KIND_GOAL"] = 3; + return values; + })(); + + atomic.GetVaultEntryResponse = (function() { + + /** + * Properties of a GetVaultEntryResponse. + * @typedef {Object} atomic.GetVaultEntryResponse.$Properties + * @property {atomic.VaultEntry.$Properties|null} [entry] GetVaultEntryResponse entry + * @property {atomic.ViewSnapshot.$Properties|null} [snapshot] GetVaultEntryResponse snapshot + * @property {atomic.VersionedBytes.$Properties|null} [entryBundle] GetVaultEntryResponse entryBundle + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetVaultEntryResponse. + * @memberof atomic + * @interface IGetVaultEntryResponse + * @augments atomic.GetVaultEntryResponse.$Properties + * @deprecated Use atomic.GetVaultEntryResponse.$Properties instead. + */ + + /** + * Shape of a GetVaultEntryResponse. + * @typedef {atomic.GetVaultEntryResponse.$Properties} atomic.GetVaultEntryResponse.$Shape + */ + + /** + * Constructs a new GetVaultEntryResponse. + * @memberof atomic + * @classdesc Represents a GetVaultEntryResponse. + * @constructor + * @param {atomic.GetVaultEntryResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetVaultEntryResponse = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetVaultEntryResponse entry. + * @member {atomic.VaultEntry.$Properties|null|undefined} entry + * @memberof atomic.GetVaultEntryResponse + * @instance + */ + GetVaultEntryResponse.prototype.entry = null; + + /** + * GetVaultEntryResponse snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.GetVaultEntryResponse + * @instance + */ + GetVaultEntryResponse.prototype.snapshot = null; + + /** + * GetVaultEntryResponse entryBundle. + * @member {atomic.VersionedBytes.$Properties|null|undefined} entryBundle + * @memberof atomic.GetVaultEntryResponse + * @instance + */ + GetVaultEntryResponse.prototype.entryBundle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetVaultEntryResponse.prototype, "_entry_bundle", { + get: $util.oneOfGetter($oneOfFields = ["entryBundle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetVaultEntryResponse instance using the specified properties. + * @function create + * @memberof atomic.GetVaultEntryResponse + * @static + * @param {atomic.GetVaultEntryResponse.$Properties=} [properties] Properties to set + * @returns {atomic.GetVaultEntryResponse} GetVaultEntryResponse instance + * @type {{ + * (properties: atomic.GetVaultEntryResponse.$Shape): atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape; + * (properties?: atomic.GetVaultEntryResponse.$Properties): atomic.GetVaultEntryResponse; + * }} + */ + GetVaultEntryResponse.create = function(properties) { + return new GetVaultEntryResponse(properties); + }; + + /** + * Encodes the specified GetVaultEntryResponse message. Does not implicitly {@link atomic.GetVaultEntryResponse.verify|verify} messages. + * @function encode + * @memberof atomic.GetVaultEntryResponse + * @static + * @param {atomic.GetVaultEntryResponse.$Properties} message GetVaultEntryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVaultEntryResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.entry != null && $Object.hasOwnProperty.call(message, "entry")) + $root.atomic.VaultEntry.encode(message.entry, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + $root.atomic.ViewSnapshot.encode(message.snapshot, writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); + if (message.entryBundle != null && $Object.hasOwnProperty.call(message, "entryBundle")) + $root.atomic.VersionedBytes.encode(message.entryBundle, writer.uint32(/* id 21, wireType 2 =*/170).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetVaultEntryResponse message, length delimited. Does not implicitly {@link atomic.GetVaultEntryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetVaultEntryResponse + * @static + * @param {atomic.GetVaultEntryResponse.$Properties} message GetVaultEntryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVaultEntryResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetVaultEntryResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetVaultEntryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape} GetVaultEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVaultEntryResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetVaultEntryResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.entry = $root.atomic.VaultEntry.decode(reader, reader.size(), $undefined, _depth + 1, message.entry); + continue; + } + case 20: { + if (wireType !== 2) + break; + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + continue; + } + case 21: { + if (wireType !== 2) + break; + message.entryBundle = $root.atomic.VersionedBytes.decode(reader, reader.size(), $undefined, _depth + 1, message.entryBundle); + message._entry_bundle = "entryBundle"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetVaultEntryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetVaultEntryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape} GetVaultEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVaultEntryResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetVaultEntryResponse message. + * @function verify + * @memberof atomic.GetVaultEntryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVaultEntryResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.entry != null && $Object.hasOwnProperty.call(message, "entry")) { + var error = $root.atomic.VaultEntry.verify(message.entry, _depth + 1); + if (error) + return "entry." + error; + } + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { + var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); + if (error) + return "snapshot." + error; + } + if (message.entryBundle != null && $Object.hasOwnProperty.call(message, "entryBundle")) { + properties._entry_bundle = 1; + { + var error = $root.atomic.VersionedBytes.verify(message.entryBundle, _depth + 1); + if (error) + return "entryBundle." + error; + } + } + return null; + }; + + /** + * Creates a GetVaultEntryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetVaultEntryResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetVaultEntryResponse} GetVaultEntryResponse + */ + GetVaultEntryResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetVaultEntryResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetVaultEntryResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetVaultEntryResponse(); + if (object.entry != null) { + if (!$util.isObject(object.entry)) + throw $TypeError(".atomic.GetVaultEntryResponse.entry: object expected"); + message.entry = $root.atomic.VaultEntry.fromObject(object.entry, _depth + 1); + } + if (object.snapshot != null) { + if (!$util.isObject(object.snapshot)) + throw $TypeError(".atomic.GetVaultEntryResponse.snapshot: object expected"); + message.snapshot = $root.atomic.ViewSnapshot.fromObject(object.snapshot, _depth + 1); + } + if (object.entryBundle != null) { + if (!$util.isObject(object.entryBundle)) + throw $TypeError(".atomic.GetVaultEntryResponse.entryBundle: object expected"); + message.entryBundle = $root.atomic.VersionedBytes.fromObject(object.entryBundle, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a GetVaultEntryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetVaultEntryResponse + * @static + * @param {atomic.GetVaultEntryResponse} message GetVaultEntryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVaultEntryResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.entry = null; + object.snapshot = null; + } + if (message.entry != null && $Object.hasOwnProperty.call(message, "entry")) + object.entry = $root.atomic.VaultEntry.toObject(message.entry, options, _depth + 1); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + object.snapshot = $root.atomic.ViewSnapshot.toObject(message.snapshot, options, _depth + 1); + if (message.entryBundle != null && $Object.hasOwnProperty.call(message, "entryBundle")) + object.entryBundle = $root.atomic.VersionedBytes.toObject(message.entryBundle, options, _depth + 1); + return object; + }; + + /** + * Converts this GetVaultEntryResponse to JSON. + * @function toJSON + * @memberof atomic.GetVaultEntryResponse + * @instance + * @returns {Object.} JSON object + */ + GetVaultEntryResponse.prototype.toJSON = function() { + return GetVaultEntryResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetVaultEntryResponse + * @function getTypeUrl + * @memberof atomic.GetVaultEntryResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetVaultEntryResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetVaultEntryResponse"; + }; + + return GetVaultEntryResponse; + })(); + + atomic.VaultEntry = (function() { + + /** + * Properties of a VaultEntry. + * @typedef {Object} atomic.VaultEntry.$Properties + * @property {atomic.VaultEntityKind|null} [kind] VaultEntry kind + * @property {string|null} [id] VaultEntry id + * @property {string|null} [title] VaultEntry title + * @property {atomic.VaultEntityStatus|null} [status] VaultEntry status + * @property {string|null} [body] VaultEntry body + * @property {google.protobuf.Timestamp.$Properties|null} [createdAt] VaultEntry createdAt + * @property {google.protobuf.Timestamp.$Properties|null} [updatedAt] VaultEntry updatedAt + * @property {Array.|null} [linked] VaultEntry linked + * @property {string|null} [vaultPath] VaultEntry vaultPath + * @property {string|null} [priority] VaultEntry priority + * @property {string|null} [manifestKind] VaultEntry manifestKind + * @property {string|null} [attested] VaultEntry attested + * @property {string|null} [verifies] VaultEntry verifies + * @property {string|null} [memoryKind] VaultEntry memoryKind + * @property {string|null} [memoryStatus] VaultEntry memoryStatus + * @property {number|null} [aboutCount] VaultEntry aboutCount + * @property {number|Long|null} [contentSize] VaultEntry contentSize + * @property {string|null} [updatedAtLabel] VaultEntry updatedAtLabel + * @property {string|null} [entryType] VaultEntry entryType + * @property {string|null} [startedAt] VaultEntry startedAt + * @property {number|null} [turns] VaultEntry turns + * @property {string|null} [assignee] VaultEntry assignee + * @property {string|null} [statusLabel] VaultEntry statusLabel + * @property {string|null} [developer] VaultEntry developer + * @property {string|null} [goalDir] VaultEntry goalDir + * @property {string|null} [goalFile] VaultEntry goalFile + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a VaultEntry. + * @memberof atomic + * @interface IVaultEntry + * @augments atomic.VaultEntry.$Properties + * @deprecated Use atomic.VaultEntry.$Properties instead. + */ + + /** + * Shape of a VaultEntry. + * @typedef {atomic.VaultEntry.$Properties} atomic.VaultEntry.$Shape + */ + + /** + * Constructs a new VaultEntry. + * @memberof atomic + * @classdesc Represents a VaultEntry. + * @constructor + * @param {atomic.VaultEntry.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var VaultEntry = function (properties) { + this.linked = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * VaultEntry kind. + * @member {atomic.VaultEntityKind} kind + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.kind = 0; + + /** + * VaultEntry id. + * @member {string} id + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.id = ""; + + /** + * VaultEntry title. + * @member {string} title + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.title = ""; + + /** + * VaultEntry status. + * @member {atomic.VaultEntityStatus|null|undefined} status + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.status = null; + + /** + * VaultEntry body. + * @member {string|null|undefined} body + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.body = null; + + /** + * VaultEntry createdAt. + * @member {google.protobuf.Timestamp.$Properties|null|undefined} createdAt + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.createdAt = null; + + /** + * VaultEntry updatedAt. + * @member {google.protobuf.Timestamp.$Properties|null|undefined} updatedAt + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.updatedAt = null; + + /** + * VaultEntry linked. + * @member {Array.} linked + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.linked = $util.emptyArray; + + /** + * VaultEntry vaultPath. + * @member {string|null|undefined} vaultPath + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.vaultPath = null; + + /** + * VaultEntry priority. + * @member {string|null|undefined} priority + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.priority = null; + + /** + * VaultEntry manifestKind. + * @member {string|null|undefined} manifestKind + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.manifestKind = null; + + /** + * VaultEntry attested. + * @member {string|null|undefined} attested + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.attested = null; + + /** + * VaultEntry verifies. + * @member {string|null|undefined} verifies + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.verifies = null; + + /** + * VaultEntry memoryKind. + * @member {string|null|undefined} memoryKind + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.memoryKind = null; + + /** + * VaultEntry memoryStatus. + * @member {string|null|undefined} memoryStatus + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.memoryStatus = null; + + /** + * VaultEntry aboutCount. + * @member {number|null|undefined} aboutCount + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.aboutCount = null; + + /** + * VaultEntry contentSize. + * @member {number|Long|null|undefined} contentSize + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.contentSize = null; + + /** + * VaultEntry updatedAtLabel. + * @member {string|null|undefined} updatedAtLabel + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.updatedAtLabel = null; + + /** + * VaultEntry entryType. + * @member {string|null|undefined} entryType + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.entryType = null; + + /** + * VaultEntry startedAt. + * @member {string|null|undefined} startedAt + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.startedAt = null; + + /** + * VaultEntry turns. + * @member {number|null|undefined} turns + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.turns = null; + + /** + * VaultEntry assignee. + * @member {string|null|undefined} assignee + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.assignee = null; + + /** + * VaultEntry statusLabel. + * @member {string|null|undefined} statusLabel + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.statusLabel = null; + + /** + * VaultEntry developer. + * @member {string|null|undefined} developer + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.developer = null; + + /** + * VaultEntry goalDir. + * @member {string|null|undefined} goalDir + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.goalDir = null; + + /** + * VaultEntry goalFile. + * @member {string|null|undefined} goalFile + * @memberof atomic.VaultEntry + * @instance + */ + VaultEntry.prototype.goalFile = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_body", { + get: $util.oneOfGetter($oneOfFields = ["body"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_created_at", { + get: $util.oneOfGetter($oneOfFields = ["createdAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_updated_at", { + get: $util.oneOfGetter($oneOfFields = ["updatedAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_vault_path", { + get: $util.oneOfGetter($oneOfFields = ["vaultPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_priority", { + get: $util.oneOfGetter($oneOfFields = ["priority"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_manifest_kind", { + get: $util.oneOfGetter($oneOfFields = ["manifestKind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_attested", { + get: $util.oneOfGetter($oneOfFields = ["attested"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_verifies", { + get: $util.oneOfGetter($oneOfFields = ["verifies"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_memory_kind", { + get: $util.oneOfGetter($oneOfFields = ["memoryKind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_memory_status", { + get: $util.oneOfGetter($oneOfFields = ["memoryStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_about_count", { + get: $util.oneOfGetter($oneOfFields = ["aboutCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_content_size", { + get: $util.oneOfGetter($oneOfFields = ["contentSize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_updated_at_label", { + get: $util.oneOfGetter($oneOfFields = ["updatedAtLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_entry_type", { + get: $util.oneOfGetter($oneOfFields = ["entryType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_started_at", { + get: $util.oneOfGetter($oneOfFields = ["startedAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_turns", { + get: $util.oneOfGetter($oneOfFields = ["turns"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_assignee", { + get: $util.oneOfGetter($oneOfFields = ["assignee"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_status_label", { + get: $util.oneOfGetter($oneOfFields = ["statusLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_developer", { + get: $util.oneOfGetter($oneOfFields = ["developer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_goal_dir", { + get: $util.oneOfGetter($oneOfFields = ["goalDir"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VaultEntry.prototype, "_goal_file", { + get: $util.oneOfGetter($oneOfFields = ["goalFile"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VaultEntry instance using the specified properties. + * @function create + * @memberof atomic.VaultEntry + * @static + * @param {atomic.VaultEntry.$Properties=} [properties] Properties to set + * @returns {atomic.VaultEntry} VaultEntry instance + * @type {{ + * (properties: atomic.VaultEntry.$Shape): atomic.VaultEntry & atomic.VaultEntry.$Shape; + * (properties?: atomic.VaultEntry.$Properties): atomic.VaultEntry; + * }} + */ + VaultEntry.create = function(properties) { + return new VaultEntry(properties); + }; + + /** + * Encodes the specified VaultEntry message. Does not implicitly {@link atomic.VaultEntry.verify|verify} messages. + * @function encode + * @memberof atomic.VaultEntry + * @static + * @param {atomic.VaultEntry.$Properties} message VaultEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VaultEntry.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind") && message.kind !== 0) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); + if (message.id != null && $Object.hasOwnProperty.call(message, "id") && message.id !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.title != null && $Object.hasOwnProperty.call(message, "title") && message.title !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.title); + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.body); + if (message.createdAt != null && $Object.hasOwnProperty.call(message, "createdAt")) + $root.google.protobuf.Timestamp.encode(message.createdAt, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.updatedAt != null && $Object.hasOwnProperty.call(message, "updatedAt")) + $root.google.protobuf.Timestamp.encode(message.updatedAt, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.linked != null && message.linked.length) + for (var i = 0; i < message.linked.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.linked[i]); + if (message.vaultPath != null && $Object.hasOwnProperty.call(message, "vaultPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.vaultPath); + if (message.priority != null && $Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.priority); + if (message.manifestKind != null && $Object.hasOwnProperty.call(message, "manifestKind")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.manifestKind); + if (message.attested != null && $Object.hasOwnProperty.call(message, "attested")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.attested); + if (message.verifies != null && $Object.hasOwnProperty.call(message, "verifies")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.verifies); + if (message.memoryKind != null && $Object.hasOwnProperty.call(message, "memoryKind")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.memoryKind); + if (message.memoryStatus != null && $Object.hasOwnProperty.call(message, "memoryStatus")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.memoryStatus); + if (message.aboutCount != null && $Object.hasOwnProperty.call(message, "aboutCount")) + writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.aboutCount); + if (message.contentSize != null && $Object.hasOwnProperty.call(message, "contentSize")) + writer.uint32(/* id 17, wireType 0 =*/136).uint64(message.contentSize); + if (message.updatedAtLabel != null && $Object.hasOwnProperty.call(message, "updatedAtLabel")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.updatedAtLabel); + if (message.entryType != null && $Object.hasOwnProperty.call(message, "entryType")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.entryType); + if (message.startedAt != null && $Object.hasOwnProperty.call(message, "startedAt")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.startedAt); + if (message.turns != null && $Object.hasOwnProperty.call(message, "turns")) + writer.uint32(/* id 21, wireType 0 =*/168).uint32(message.turns); + if (message.assignee != null && $Object.hasOwnProperty.call(message, "assignee")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.assignee); + if (message.statusLabel != null && $Object.hasOwnProperty.call(message, "statusLabel")) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.statusLabel); + if (message.developer != null && $Object.hasOwnProperty.call(message, "developer")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.developer); + if (message.goalDir != null && $Object.hasOwnProperty.call(message, "goalDir")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.goalDir); + if (message.goalFile != null && $Object.hasOwnProperty.call(message, "goalFile")) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.goalFile); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified VaultEntry message, length delimited. Does not implicitly {@link atomic.VaultEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.VaultEntry + * @static + * @param {atomic.VaultEntry.$Properties} message VaultEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VaultEntry.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a VaultEntry message from the specified reader or buffer. + * @function decode + * @memberof atomic.VaultEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.VaultEntry & atomic.VaultEntry.$Shape} VaultEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VaultEntry.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.VaultEntry(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (value = reader.int32()) + message.kind = value; + else + delete message.kind; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.id = value; + else + delete message.id; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.title = value; + else + delete message.title; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.status = reader.int32(); + message._status = "status"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.body = reader.stringVerify(); + message._body = "body"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.createdAt = $root.google.protobuf.Timestamp.decode(reader, reader.size(), $undefined, _depth + 1, message.createdAt); + message._created_at = "createdAt"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.updatedAt = $root.google.protobuf.Timestamp.decode(reader, reader.size(), $undefined, _depth + 1, message.updatedAt); + message._updated_at = "updatedAt"; + continue; + } + case 8: { + if (wireType !== 2) + break; + if (!(message.linked && message.linked.length)) + message.linked = []; + message.linked.push(reader.stringVerify()); + continue; + } + case 9: { + if (wireType !== 2) + break; + message.vaultPath = reader.stringVerify(); + message._vault_path = "vaultPath"; + continue; + } + case 10: { + if (wireType !== 2) + break; + message.priority = reader.stringVerify(); + message._priority = "priority"; + continue; + } + case 11: { + if (wireType !== 2) + break; + message.manifestKind = reader.stringVerify(); + message._manifest_kind = "manifestKind"; + continue; + } + case 12: { + if (wireType !== 2) + break; + message.attested = reader.stringVerify(); + message._attested = "attested"; + continue; + } + case 13: { + if (wireType !== 2) + break; + message.verifies = reader.stringVerify(); + message._verifies = "verifies"; + continue; + } + case 14: { + if (wireType !== 2) + break; + message.memoryKind = reader.stringVerify(); + message._memory_kind = "memoryKind"; + continue; + } + case 15: { + if (wireType !== 2) + break; + message.memoryStatus = reader.stringVerify(); + message._memory_status = "memoryStatus"; + continue; + } + case 16: { + if (wireType !== 0) + break; + message.aboutCount = reader.uint32(); + message._about_count = "aboutCount"; + continue; + } + case 17: { + if (wireType !== 0) + break; + message.contentSize = reader.uint64(); + message._content_size = "contentSize"; + continue; + } + case 18: { + if (wireType !== 2) + break; + message.updatedAtLabel = reader.stringVerify(); + message._updated_at_label = "updatedAtLabel"; + continue; + } + case 19: { + if (wireType !== 2) + break; + message.entryType = reader.stringVerify(); + message._entry_type = "entryType"; + continue; + } + case 20: { + if (wireType !== 2) + break; + message.startedAt = reader.stringVerify(); + message._started_at = "startedAt"; + continue; + } + case 21: { + if (wireType !== 0) + break; + message.turns = reader.uint32(); + message._turns = "turns"; + continue; + } + case 22: { + if (wireType !== 2) + break; + message.assignee = reader.stringVerify(); + message._assignee = "assignee"; + continue; + } + case 23: { + if (wireType !== 2) + break; + message.statusLabel = reader.stringVerify(); + message._status_label = "statusLabel"; + continue; + } + case 24: { + if (wireType !== 2) + break; + message.developer = reader.stringVerify(); + message._developer = "developer"; + continue; + } + case 25: { + if (wireType !== 2) + break; + message.goalDir = reader.stringVerify(); + message._goal_dir = "goalDir"; + continue; + } + case 26: { + if (wireType !== 2) + break; + message.goalFile = reader.stringVerify(); + message._goal_file = "goalFile"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a VaultEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.VaultEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.VaultEntry & atomic.VaultEntry.$Shape} VaultEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VaultEntry.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a VaultEntry message. + * @function verify + * @memberof atomic.VaultEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VaultEntry.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + if (typeof message.kind !== "number" || (message.kind | 0) !== message.kind) + return "kind: enum value expected"; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.title != null && $Object.hasOwnProperty.call(message, "title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) { + properties._status = 1; + if (typeof message.status !== "number" || (message.status | 0) !== message.status) + return "status: enum value expected"; + } + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) { + properties._body = 1; + if (!$util.isString(message.body)) + return "body: string expected"; + } + if (message.createdAt != null && $Object.hasOwnProperty.call(message, "createdAt")) { + properties._created_at = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createdAt, _depth + 1); + if (error) + return "createdAt." + error; + } + } + if (message.updatedAt != null && $Object.hasOwnProperty.call(message, "updatedAt")) { + properties._updated_at = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updatedAt, _depth + 1); + if (error) + return "updatedAt." + error; + } + } + if (message.linked != null && $Object.hasOwnProperty.call(message, "linked")) { + if (!$Array.isArray(message.linked)) + return "linked: array expected"; + for (var i = 0; i < message.linked.length; ++i) + if (!$util.isString(message.linked[i])) + return "linked: string[] expected"; + } + if (message.vaultPath != null && $Object.hasOwnProperty.call(message, "vaultPath")) { + properties._vault_path = 1; + if (!$util.isString(message.vaultPath)) + return "vaultPath: string expected"; + } + if (message.priority != null && $Object.hasOwnProperty.call(message, "priority")) { + properties._priority = 1; + if (!$util.isString(message.priority)) + return "priority: string expected"; + } + if (message.manifestKind != null && $Object.hasOwnProperty.call(message, "manifestKind")) { + properties._manifest_kind = 1; + if (!$util.isString(message.manifestKind)) + return "manifestKind: string expected"; + } + if (message.attested != null && $Object.hasOwnProperty.call(message, "attested")) { + properties._attested = 1; + if (!$util.isString(message.attested)) + return "attested: string expected"; + } + if (message.verifies != null && $Object.hasOwnProperty.call(message, "verifies")) { + properties._verifies = 1; + if (!$util.isString(message.verifies)) + return "verifies: string expected"; + } + if (message.memoryKind != null && $Object.hasOwnProperty.call(message, "memoryKind")) { + properties._memory_kind = 1; + if (!$util.isString(message.memoryKind)) + return "memoryKind: string expected"; + } + if (message.memoryStatus != null && $Object.hasOwnProperty.call(message, "memoryStatus")) { + properties._memory_status = 1; + if (!$util.isString(message.memoryStatus)) + return "memoryStatus: string expected"; + } + if (message.aboutCount != null && $Object.hasOwnProperty.call(message, "aboutCount")) { + properties._about_count = 1; + if (!$util.isInteger(message.aboutCount)) + return "aboutCount: integer expected"; + } + if (message.contentSize != null && $Object.hasOwnProperty.call(message, "contentSize")) { + properties._content_size = 1; + if (!$util.isInteger(message.contentSize) && !(message.contentSize && $util.isInteger(message.contentSize.low) && $util.isInteger(message.contentSize.high))) + return "contentSize: integer|Long expected"; + } + if (message.updatedAtLabel != null && $Object.hasOwnProperty.call(message, "updatedAtLabel")) { + properties._updated_at_label = 1; + if (!$util.isString(message.updatedAtLabel)) + return "updatedAtLabel: string expected"; + } + if (message.entryType != null && $Object.hasOwnProperty.call(message, "entryType")) { + properties._entry_type = 1; + if (!$util.isString(message.entryType)) + return "entryType: string expected"; + } + if (message.startedAt != null && $Object.hasOwnProperty.call(message, "startedAt")) { + properties._started_at = 1; + if (!$util.isString(message.startedAt)) + return "startedAt: string expected"; + } + if (message.turns != null && $Object.hasOwnProperty.call(message, "turns")) { + properties._turns = 1; + if (!$util.isInteger(message.turns)) + return "turns: integer expected"; + } + if (message.assignee != null && $Object.hasOwnProperty.call(message, "assignee")) { + properties._assignee = 1; + if (!$util.isString(message.assignee)) + return "assignee: string expected"; + } + if (message.statusLabel != null && $Object.hasOwnProperty.call(message, "statusLabel")) { + properties._status_label = 1; + if (!$util.isString(message.statusLabel)) + return "statusLabel: string expected"; + } + if (message.developer != null && $Object.hasOwnProperty.call(message, "developer")) { + properties._developer = 1; + if (!$util.isString(message.developer)) + return "developer: string expected"; + } + if (message.goalDir != null && $Object.hasOwnProperty.call(message, "goalDir")) { + properties._goal_dir = 1; + if (!$util.isString(message.goalDir)) + return "goalDir: string expected"; + } + if (message.goalFile != null && $Object.hasOwnProperty.call(message, "goalFile")) { + properties._goal_file = 1; + if (!$util.isString(message.goalFile)) + return "goalFile: string expected"; + } + return null; + }; + + /** + * Creates a VaultEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.VaultEntry + * @static + * @param {Object.} object Plain object + * @returns {atomic.VaultEntry} VaultEntry + */ + VaultEntry.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.VaultEntry) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.VaultEntry: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.VaultEntry(); + if (object.kind !== 0 && (typeof object.kind !== "string" || $root.atomic.VaultEntityKind[object.kind] !== 0)) + switch (object.kind) { + case "VAULT_ENTITY_KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "VAULT_ENTITY_KIND_INTENT": + case 1: + message.kind = 1; + break; + case "VAULT_ENTITY_KIND_MEMORY": + case 2: + message.kind = 2; + break; + case "VAULT_ENTITY_KIND_GOAL": + case 3: + message.kind = 3; + break; + default: + if (typeof object.kind === "number" && (object.kind | 0) === object.kind) + message.kind = object.kind; + } + if (object.id != null) + if (typeof object.id !== "string" || object.id.length) + message.id = $String(object.id); + if (object.title != null) + if (typeof object.title !== "string" || object.title.length) + message.title = $String(object.title); + switch (object.status) { + case "VAULT_ENTITY_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "VAULT_ENTITY_STATUS_BACKLOG": + case 1: + message.status = 1; + break; + case "VAULT_ENTITY_STATUS_IN_PROGRESS": + case 2: + message.status = 2; + break; + case "VAULT_ENTITY_STATUS_NEEDS_REVIEW": + case 3: + message.status = 3; + break; + case "VAULT_ENTITY_STATUS_PLANNED": + case 4: + message.status = 4; + break; + case "VAULT_ENTITY_STATUS_DONE": + case 5: + message.status = 5; + break; + case "VAULT_ENTITY_STATUS_ACTIVE": + case 6: + message.status = 6; + break; + case "VAULT_ENTITY_STATUS_SUSPENDED": + case 7: + message.status = 7; + break; + case "VAULT_ENTITY_STATUS_COMPLETED": + case 8: + message.status = 8; + break; + case "VAULT_ENTITY_STATUS_SUPERSEDED": + case 9: + message.status = 9; + break; + case "VAULT_ENTITY_STATUS_RETRACTED": + case 10: + message.status = 10; + break; + default: + if (typeof object.status === "number" && (object.status | 0) === object.status) + message.status = object.status; + } + if (object.body != null) + message.body = $String(object.body); + if (object.createdAt != null) { + if (!$util.isObject(object.createdAt)) + throw $TypeError(".atomic.VaultEntry.createdAt: object expected"); + message.createdAt = $root.google.protobuf.Timestamp.fromObject(object.createdAt, _depth + 1); + } + if (object.updatedAt != null) { + if (!$util.isObject(object.updatedAt)) + throw $TypeError(".atomic.VaultEntry.updatedAt: object expected"); + message.updatedAt = $root.google.protobuf.Timestamp.fromObject(object.updatedAt, _depth + 1); + } + if (object.linked) { + if (!$Array.isArray(object.linked)) + throw $TypeError(".atomic.VaultEntry.linked: array expected"); + message.linked = $Array(object.linked.length); + for (var i = 0; i < object.linked.length; ++i) + message.linked[i] = $String(object.linked[i]); + } + if (object.vaultPath != null) + message.vaultPath = $String(object.vaultPath); + if (object.priority != null) + message.priority = $String(object.priority); + if (object.manifestKind != null) + message.manifestKind = $String(object.manifestKind); + if (object.attested != null) + message.attested = $String(object.attested); + if (object.verifies != null) + message.verifies = $String(object.verifies); + if (object.memoryKind != null) + message.memoryKind = $String(object.memoryKind); + if (object.memoryStatus != null) + message.memoryStatus = $String(object.memoryStatus); + if (object.aboutCount != null) + message.aboutCount = object.aboutCount >>> 0; + if (object.contentSize != null) + if ($util.Long) + message.contentSize = $util.Long.fromValue(object.contentSize, true); + else if (typeof object.contentSize === "string") + message.contentSize = $parseInt(object.contentSize, 10); + else if (typeof object.contentSize === "number") + message.contentSize = object.contentSize; + else if (typeof object.contentSize === "object") + message.contentSize = new $util.LongBits(object.contentSize.low >>> 0, object.contentSize.high >>> 0).toNumber(true); + if (object.updatedAtLabel != null) + message.updatedAtLabel = $String(object.updatedAtLabel); + if (object.entryType != null) + message.entryType = $String(object.entryType); + if (object.startedAt != null) + message.startedAt = $String(object.startedAt); + if (object.turns != null) + message.turns = object.turns >>> 0; + if (object.assignee != null) + message.assignee = $String(object.assignee); + if (object.statusLabel != null) + message.statusLabel = $String(object.statusLabel); + if (object.developer != null) + message.developer = $String(object.developer); + if (object.goalDir != null) + message.goalDir = $String(object.goalDir); + if (object.goalFile != null) + message.goalFile = $String(object.goalFile); + return message; + }; + + /** + * Creates a plain object from a VaultEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.VaultEntry + * @static + * @param {atomic.VaultEntry} message VaultEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VaultEntry.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.linked = []; + if (options.defaults) { + object.kind = options.enums === $String ? "VAULT_ENTITY_KIND_UNSPECIFIED" : 0; + object.id = ""; + object.title = ""; + } + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + object.kind = options.enums === $String ? $root.atomic.VaultEntityKind[message.kind] === $undefined ? message.kind : $root.atomic.VaultEntityKind[message.kind] : message.kind; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + object.id = message.id; + if (message.title != null && $Object.hasOwnProperty.call(message, "title")) + object.title = message.title; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + object.status = options.enums === $String ? $root.atomic.VaultEntityStatus[message.status] === $undefined ? message.status : $root.atomic.VaultEntityStatus[message.status] : message.status; + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = message.body; + if (message.createdAt != null && $Object.hasOwnProperty.call(message, "createdAt")) + object.createdAt = $root.google.protobuf.Timestamp.toObject(message.createdAt, options, _depth + 1); + if (message.updatedAt != null && $Object.hasOwnProperty.call(message, "updatedAt")) + object.updatedAt = $root.google.protobuf.Timestamp.toObject(message.updatedAt, options, _depth + 1); + if (message.linked && message.linked.length) { + object.linked = $Array(message.linked.length); + for (var j = 0; j < message.linked.length; ++j) + object.linked[j] = message.linked[j]; + } + if (message.vaultPath != null && $Object.hasOwnProperty.call(message, "vaultPath")) + object.vaultPath = message.vaultPath; + if (message.priority != null && $Object.hasOwnProperty.call(message, "priority")) + object.priority = message.priority; + if (message.manifestKind != null && $Object.hasOwnProperty.call(message, "manifestKind")) + object.manifestKind = message.manifestKind; + if (message.attested != null && $Object.hasOwnProperty.call(message, "attested")) + object.attested = message.attested; + if (message.verifies != null && $Object.hasOwnProperty.call(message, "verifies")) + object.verifies = message.verifies; + if (message.memoryKind != null && $Object.hasOwnProperty.call(message, "memoryKind")) + object.memoryKind = message.memoryKind; + if (message.memoryStatus != null && $Object.hasOwnProperty.call(message, "memoryStatus")) + object.memoryStatus = message.memoryStatus; + if (message.aboutCount != null && $Object.hasOwnProperty.call(message, "aboutCount")) + object.aboutCount = message.aboutCount; + if (message.contentSize != null && $Object.hasOwnProperty.call(message, "contentSize")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.contentSize = typeof message.contentSize === "number" ? $BigInt(message.contentSize) : $util.Long.fromBits(message.contentSize.low >>> 0, message.contentSize.high >>> 0, true).toBigInt(); + else if (typeof message.contentSize === "number") + object.contentSize = options.longs === $String ? $String(message.contentSize) : message.contentSize; + else + object.contentSize = options.longs === $String ? $util.Long.prototype.toString.call(message.contentSize) : options.longs === $Number ? new $util.LongBits(message.contentSize.low >>> 0, message.contentSize.high >>> 0).toNumber(true) : message.contentSize; + if (message.updatedAtLabel != null && $Object.hasOwnProperty.call(message, "updatedAtLabel")) + object.updatedAtLabel = message.updatedAtLabel; + if (message.entryType != null && $Object.hasOwnProperty.call(message, "entryType")) + object.entryType = message.entryType; + if (message.startedAt != null && $Object.hasOwnProperty.call(message, "startedAt")) + object.startedAt = message.startedAt; + if (message.turns != null && $Object.hasOwnProperty.call(message, "turns")) + object.turns = message.turns; + if (message.assignee != null && $Object.hasOwnProperty.call(message, "assignee")) + object.assignee = message.assignee; + if (message.statusLabel != null && $Object.hasOwnProperty.call(message, "statusLabel")) + object.statusLabel = message.statusLabel; + if (message.developer != null && $Object.hasOwnProperty.call(message, "developer")) + object.developer = message.developer; + if (message.goalDir != null && $Object.hasOwnProperty.call(message, "goalDir")) + object.goalDir = message.goalDir; + if (message.goalFile != null && $Object.hasOwnProperty.call(message, "goalFile")) + object.goalFile = message.goalFile; + return object; + }; + + /** + * Converts this VaultEntry to JSON. + * @function toJSON + * @memberof atomic.VaultEntry + * @instance + * @returns {Object.} JSON object + */ + VaultEntry.prototype.toJSON = function() { + return VaultEntry.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for VaultEntry + * @function getTypeUrl + * @memberof atomic.VaultEntry + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + VaultEntry.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.VaultEntry"; + }; + + return VaultEntry; + })(); + + /** + * VaultEntityStatus enum. + * @name atomic.VaultEntityStatus + * @enum {number} + * @property {number} VAULT_ENTITY_STATUS_UNSPECIFIED=0 VAULT_ENTITY_STATUS_UNSPECIFIED value + * @property {number} VAULT_ENTITY_STATUS_BACKLOG=1 VAULT_ENTITY_STATUS_BACKLOG value + * @property {number} VAULT_ENTITY_STATUS_IN_PROGRESS=2 VAULT_ENTITY_STATUS_IN_PROGRESS value + * @property {number} VAULT_ENTITY_STATUS_NEEDS_REVIEW=3 VAULT_ENTITY_STATUS_NEEDS_REVIEW value + * @property {number} VAULT_ENTITY_STATUS_PLANNED=4 VAULT_ENTITY_STATUS_PLANNED value + * @property {number} VAULT_ENTITY_STATUS_DONE=5 VAULT_ENTITY_STATUS_DONE value + * @property {number} VAULT_ENTITY_STATUS_ACTIVE=6 VAULT_ENTITY_STATUS_ACTIVE value + * @property {number} VAULT_ENTITY_STATUS_SUSPENDED=7 VAULT_ENTITY_STATUS_SUSPENDED value + * @property {number} VAULT_ENTITY_STATUS_COMPLETED=8 VAULT_ENTITY_STATUS_COMPLETED value + * @property {number} VAULT_ENTITY_STATUS_SUPERSEDED=9 VAULT_ENTITY_STATUS_SUPERSEDED value + * @property {number} VAULT_ENTITY_STATUS_RETRACTED=10 VAULT_ENTITY_STATUS_RETRACTED value + */ + atomic.VaultEntityStatus = (function() { + var valuesById = $Object.create(null), values = $Object.create(valuesById); + values[valuesById[0] = "VAULT_ENTITY_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "VAULT_ENTITY_STATUS_BACKLOG"] = 1; + values[valuesById[2] = "VAULT_ENTITY_STATUS_IN_PROGRESS"] = 2; + values[valuesById[3] = "VAULT_ENTITY_STATUS_NEEDS_REVIEW"] = 3; + values[valuesById[4] = "VAULT_ENTITY_STATUS_PLANNED"] = 4; + values[valuesById[5] = "VAULT_ENTITY_STATUS_DONE"] = 5; + values[valuesById[6] = "VAULT_ENTITY_STATUS_ACTIVE"] = 6; + values[valuesById[7] = "VAULT_ENTITY_STATUS_SUSPENDED"] = 7; + values[valuesById[8] = "VAULT_ENTITY_STATUS_COMPLETED"] = 8; + values[valuesById[9] = "VAULT_ENTITY_STATUS_SUPERSEDED"] = 9; + values[valuesById[10] = "VAULT_ENTITY_STATUS_RETRACTED"] = 10; + return values; + })(); + + atomic.ListVaultEntriesRequest = (function() { + + /** + * Properties of a ListVaultEntriesRequest. + * @typedef {Object} atomic.ListVaultEntriesRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] ListVaultEntriesRequest repository + * @property {atomic.VaultEntityKind|null} [kind] ListVaultEntriesRequest kind + * @property {atomic.VaultEntityStatus|null} [status] ListVaultEntriesRequest status + * @property {boolean|null} [summariesOnly] ListVaultEntriesRequest summariesOnly + * @property {atomic.PageCursor.$Properties|null} [cursor] ListVaultEntriesRequest cursor + * @property {atomic.PageBudget.$Properties|null} [budget] ListVaultEntriesRequest budget + * @property {string|null} [identity] ListVaultEntriesRequest identity + * @property {string|null} [pathPrefix] ListVaultEntriesRequest pathPrefix + * @property {string|null} [entryType] ListVaultEntriesRequest entryType + * @property {string|null} [statusFilter] ListVaultEntriesRequest statusFilter + * @property {boolean|null} [toolResultPreviews] ListVaultEntriesRequest toolResultPreviews + * @property {atomic.ViewRef.$Properties|null} [view] ListVaultEntriesRequest view + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ListVaultEntriesRequest. + * @memberof atomic + * @interface IListVaultEntriesRequest + * @augments atomic.ListVaultEntriesRequest.$Properties + * @deprecated Use atomic.ListVaultEntriesRequest.$Properties instead. + */ + + /** + * Shape of a ListVaultEntriesRequest. + * @typedef {atomic.ListVaultEntriesRequest.$Properties} atomic.ListVaultEntriesRequest.$Shape + */ + + /** + * Constructs a new ListVaultEntriesRequest. + * @memberof atomic + * @classdesc Represents a ListVaultEntriesRequest. + * @constructor + * @param {atomic.ListVaultEntriesRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ListVaultEntriesRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ListVaultEntriesRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.repository = null; + + /** + * ListVaultEntriesRequest kind. + * @member {atomic.VaultEntityKind|null|undefined} kind + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.kind = null; + + /** + * ListVaultEntriesRequest status. + * @member {atomic.VaultEntityStatus|null|undefined} status + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.status = null; + + /** + * ListVaultEntriesRequest summariesOnly. + * @member {boolean} summariesOnly + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.summariesOnly = false; + + /** + * ListVaultEntriesRequest cursor. + * @member {atomic.PageCursor.$Properties|null|undefined} cursor + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.cursor = null; + + /** + * ListVaultEntriesRequest budget. + * @member {atomic.PageBudget.$Properties|null|undefined} budget + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.budget = null; + + /** + * ListVaultEntriesRequest identity. + * @member {string|null|undefined} identity + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.identity = null; + + /** + * ListVaultEntriesRequest pathPrefix. + * @member {string|null|undefined} pathPrefix + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.pathPrefix = null; + + /** + * ListVaultEntriesRequest entryType. + * @member {string|null|undefined} entryType + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.entryType = null; + + /** + * ListVaultEntriesRequest statusFilter. + * @member {string|null|undefined} statusFilter + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.statusFilter = null; + + /** + * ListVaultEntriesRequest toolResultPreviews. + * @member {boolean} toolResultPreviews + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.toolResultPreviews = false; + + /** + * ListVaultEntriesRequest view. + * @member {atomic.ViewRef.$Properties|null|undefined} view + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.view = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesRequest.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesRequest.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesRequest.prototype, "_cursor", { + get: $util.oneOfGetter($oneOfFields = ["cursor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesRequest.prototype, "_budget", { + get: $util.oneOfGetter($oneOfFields = ["budget"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesRequest.prototype, "_identity", { + get: $util.oneOfGetter($oneOfFields = ["identity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesRequest.prototype, "_path_prefix", { + get: $util.oneOfGetter($oneOfFields = ["pathPrefix"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesRequest.prototype, "_entry_type", { + get: $util.oneOfGetter($oneOfFields = ["entryType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesRequest.prototype, "_status_filter", { + get: $util.oneOfGetter($oneOfFields = ["statusFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListVaultEntriesRequest instance using the specified properties. + * @function create + * @memberof atomic.ListVaultEntriesRequest + * @static + * @param {atomic.ListVaultEntriesRequest.$Properties=} [properties] Properties to set + * @returns {atomic.ListVaultEntriesRequest} ListVaultEntriesRequest instance + * @type {{ + * (properties: atomic.ListVaultEntriesRequest.$Shape): atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape; + * (properties?: atomic.ListVaultEntriesRequest.$Properties): atomic.ListVaultEntriesRequest; + * }} + */ + ListVaultEntriesRequest.create = function(properties) { + return new ListVaultEntriesRequest(properties); + }; + + /** + * Encodes the specified ListVaultEntriesRequest message. Does not implicitly {@link atomic.ListVaultEntriesRequest.verify|verify} messages. + * @function encode + * @memberof atomic.ListVaultEntriesRequest + * @static + * @param {atomic.ListVaultEntriesRequest.$Properties} message ListVaultEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVaultEntriesRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.kind); + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); + if (message.summariesOnly != null && $Object.hasOwnProperty.call(message, "summariesOnly") && message.summariesOnly !== false) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.summariesOnly); + if (message.cursor != null && $Object.hasOwnProperty.call(message, "cursor")) + $root.atomic.PageCursor.encode(message.cursor, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.budget != null && $Object.hasOwnProperty.call(message, "budget")) + $root.atomic.PageBudget.encode(message.budget, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.identity); + if (message.pathPrefix != null && $Object.hasOwnProperty.call(message, "pathPrefix")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.pathPrefix); + if (message.entryType != null && $Object.hasOwnProperty.call(message, "entryType")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.entryType); + if (message.statusFilter != null && $Object.hasOwnProperty.call(message, "statusFilter")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.statusFilter); + if (message.toolResultPreviews != null && $Object.hasOwnProperty.call(message, "toolResultPreviews") && message.toolResultPreviews !== false) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.toolResultPreviews); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + $root.atomic.ViewRef.encode(message.view, writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ListVaultEntriesRequest message, length delimited. Does not implicitly {@link atomic.ListVaultEntriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ListVaultEntriesRequest + * @static + * @param {atomic.ListVaultEntriesRequest.$Properties} message ListVaultEntriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVaultEntriesRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ListVaultEntriesRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.ListVaultEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape} ListVaultEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVaultEntriesRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ListVaultEntriesRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.kind = reader.int32(); + message._kind = "kind"; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.status = reader.int32(); + message._status = "status"; + continue; + } + case 4: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.summariesOnly = value; + else + delete message.summariesOnly; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.cursor = $root.atomic.PageCursor.decode(reader, reader.size(), $undefined, _depth + 1, message.cursor); + message._cursor = "cursor"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.budget = $root.atomic.PageBudget.decode(reader, reader.size(), $undefined, _depth + 1, message.budget); + message._budget = "budget"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.identity = reader.stringVerify(); + message._identity = "identity"; + continue; + } + case 8: { + if (wireType !== 2) + break; + message.pathPrefix = reader.stringVerify(); + message._path_prefix = "pathPrefix"; + continue; + } + case 9: { + if (wireType !== 2) + break; + message.entryType = reader.stringVerify(); + message._entry_type = "entryType"; + continue; + } + case 10: { + if (wireType !== 2) + break; + message.statusFilter = reader.stringVerify(); + message._status_filter = "statusFilter"; + continue; + } + case 11: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.toolResultPreviews = value; + else + delete message.toolResultPreviews; + continue; + } + case 20: { + if (wireType !== 2) + break; + message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ListVaultEntriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ListVaultEntriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape} ListVaultEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVaultEntriesRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ListVaultEntriesRequest message. + * @function verify + * @memberof atomic.ListVaultEntriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVaultEntriesRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) { + properties._kind = 1; + if (typeof message.kind !== "number" || (message.kind | 0) !== message.kind) + return "kind: enum value expected"; + } + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) { + properties._status = 1; + if (typeof message.status !== "number" || (message.status | 0) !== message.status) + return "status: enum value expected"; + } + if (message.summariesOnly != null && $Object.hasOwnProperty.call(message, "summariesOnly")) + if (typeof message.summariesOnly !== "boolean") + return "summariesOnly: boolean expected"; + if (message.cursor != null && $Object.hasOwnProperty.call(message, "cursor")) { + properties._cursor = 1; + { + var error = $root.atomic.PageCursor.verify(message.cursor, _depth + 1); + if (error) + return "cursor." + error; + } + } + if (message.budget != null && $Object.hasOwnProperty.call(message, "budget")) { + properties._budget = 1; + { + var error = $root.atomic.PageBudget.verify(message.budget, _depth + 1); + if (error) + return "budget." + error; + } + } + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) { + properties._identity = 1; + if (!$util.isString(message.identity)) + return "identity: string expected"; + } + if (message.pathPrefix != null && $Object.hasOwnProperty.call(message, "pathPrefix")) { + properties._path_prefix = 1; + if (!$util.isString(message.pathPrefix)) + return "pathPrefix: string expected"; + } + if (message.entryType != null && $Object.hasOwnProperty.call(message, "entryType")) { + properties._entry_type = 1; + if (!$util.isString(message.entryType)) + return "entryType: string expected"; + } + if (message.statusFilter != null && $Object.hasOwnProperty.call(message, "statusFilter")) { + properties._status_filter = 1; + if (!$util.isString(message.statusFilter)) + return "statusFilter: string expected"; + } + if (message.toolResultPreviews != null && $Object.hasOwnProperty.call(message, "toolResultPreviews")) + if (typeof message.toolResultPreviews !== "boolean") + return "toolResultPreviews: boolean expected"; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + var error = $root.atomic.ViewRef.verify(message.view, _depth + 1); + if (error) + return "view." + error; + } + return null; + }; + + /** + * Creates a ListVaultEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ListVaultEntriesRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.ListVaultEntriesRequest} ListVaultEntriesRequest + */ + ListVaultEntriesRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ListVaultEntriesRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ListVaultEntriesRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ListVaultEntriesRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.ListVaultEntriesRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + switch (object.kind) { + case "VAULT_ENTITY_KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "VAULT_ENTITY_KIND_INTENT": + case 1: + message.kind = 1; + break; + case "VAULT_ENTITY_KIND_MEMORY": + case 2: + message.kind = 2; + break; + case "VAULT_ENTITY_KIND_GOAL": + case 3: + message.kind = 3; + break; + default: + if (typeof object.kind === "number" && (object.kind | 0) === object.kind) + message.kind = object.kind; + } + switch (object.status) { + case "VAULT_ENTITY_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "VAULT_ENTITY_STATUS_BACKLOG": + case 1: + message.status = 1; + break; + case "VAULT_ENTITY_STATUS_IN_PROGRESS": + case 2: + message.status = 2; + break; + case "VAULT_ENTITY_STATUS_NEEDS_REVIEW": + case 3: + message.status = 3; + break; + case "VAULT_ENTITY_STATUS_PLANNED": + case 4: + message.status = 4; + break; + case "VAULT_ENTITY_STATUS_DONE": + case 5: + message.status = 5; + break; + case "VAULT_ENTITY_STATUS_ACTIVE": + case 6: + message.status = 6; + break; + case "VAULT_ENTITY_STATUS_SUSPENDED": + case 7: + message.status = 7; + break; + case "VAULT_ENTITY_STATUS_COMPLETED": + case 8: + message.status = 8; + break; + case "VAULT_ENTITY_STATUS_SUPERSEDED": + case 9: + message.status = 9; + break; + case "VAULT_ENTITY_STATUS_RETRACTED": + case 10: + message.status = 10; + break; + default: + if (typeof object.status === "number" && (object.status | 0) === object.status) + message.status = object.status; + } + if (object.summariesOnly != null) + if (object.summariesOnly) + message.summariesOnly = $Boolean(object.summariesOnly); + if (object.cursor != null) { + if (!$util.isObject(object.cursor)) + throw $TypeError(".atomic.ListVaultEntriesRequest.cursor: object expected"); + message.cursor = $root.atomic.PageCursor.fromObject(object.cursor, _depth + 1); + } + if (object.budget != null) { + if (!$util.isObject(object.budget)) + throw $TypeError(".atomic.ListVaultEntriesRequest.budget: object expected"); + message.budget = $root.atomic.PageBudget.fromObject(object.budget, _depth + 1); + } + if (object.identity != null) + message.identity = $String(object.identity); + if (object.pathPrefix != null) + message.pathPrefix = $String(object.pathPrefix); + if (object.entryType != null) + message.entryType = $String(object.entryType); + if (object.statusFilter != null) + message.statusFilter = $String(object.statusFilter); + if (object.toolResultPreviews != null) + if (object.toolResultPreviews) + message.toolResultPreviews = $Boolean(object.toolResultPreviews); + if (object.view != null) { + if (!$util.isObject(object.view)) + throw $TypeError(".atomic.ListVaultEntriesRequest.view: object expected"); + message.view = $root.atomic.ViewRef.fromObject(object.view, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ListVaultEntriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ListVaultEntriesRequest + * @static + * @param {atomic.ListVaultEntriesRequest} message ListVaultEntriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVaultEntriesRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.summariesOnly = false; + object.toolResultPreviews = false; + object.view = null; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + object.kind = options.enums === $String ? $root.atomic.VaultEntityKind[message.kind] === $undefined ? message.kind : $root.atomic.VaultEntityKind[message.kind] : message.kind; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + object.status = options.enums === $String ? $root.atomic.VaultEntityStatus[message.status] === $undefined ? message.status : $root.atomic.VaultEntityStatus[message.status] : message.status; + if (message.summariesOnly != null && $Object.hasOwnProperty.call(message, "summariesOnly")) + object.summariesOnly = message.summariesOnly; + if (message.cursor != null && $Object.hasOwnProperty.call(message, "cursor")) + object.cursor = $root.atomic.PageCursor.toObject(message.cursor, options, _depth + 1); + if (message.budget != null && $Object.hasOwnProperty.call(message, "budget")) + object.budget = $root.atomic.PageBudget.toObject(message.budget, options, _depth + 1); + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) + object.identity = message.identity; + if (message.pathPrefix != null && $Object.hasOwnProperty.call(message, "pathPrefix")) + object.pathPrefix = message.pathPrefix; + if (message.entryType != null && $Object.hasOwnProperty.call(message, "entryType")) + object.entryType = message.entryType; + if (message.statusFilter != null && $Object.hasOwnProperty.call(message, "statusFilter")) + object.statusFilter = message.statusFilter; + if (message.toolResultPreviews != null && $Object.hasOwnProperty.call(message, "toolResultPreviews")) + object.toolResultPreviews = message.toolResultPreviews; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = $root.atomic.ViewRef.toObject(message.view, options, _depth + 1); + return object; + }; + + /** + * Converts this ListVaultEntriesRequest to JSON. + * @function toJSON + * @memberof atomic.ListVaultEntriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListVaultEntriesRequest.prototype.toJSON = function() { + return ListVaultEntriesRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ListVaultEntriesRequest + * @function getTypeUrl + * @memberof atomic.ListVaultEntriesRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ListVaultEntriesRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ListVaultEntriesRequest"; + }; + + return ListVaultEntriesRequest; + })(); + + atomic.ListVaultEntriesResponse = (function() { + + /** + * Properties of a ListVaultEntriesResponse. + * @typedef {Object} atomic.ListVaultEntriesResponse.$Properties + * @property {Array.|null} [entries] ListVaultEntriesResponse entries + * @property {atomic.PageCursor.$Properties|null} [nextCursor] ListVaultEntriesResponse nextCursor + * @property {atomic.ViewSnapshot.$Properties|null} [snapshot] ListVaultEntriesResponse snapshot + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ListVaultEntriesResponse. + * @memberof atomic + * @interface IListVaultEntriesResponse + * @augments atomic.ListVaultEntriesResponse.$Properties + * @deprecated Use atomic.ListVaultEntriesResponse.$Properties instead. + */ + + /** + * Shape of a ListVaultEntriesResponse. + * @typedef {atomic.ListVaultEntriesResponse.$Properties} atomic.ListVaultEntriesResponse.$Shape + */ + + /** + * Constructs a new ListVaultEntriesResponse. + * @memberof atomic + * @classdesc Represents a ListVaultEntriesResponse. + * @constructor + * @param {atomic.ListVaultEntriesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ListVaultEntriesResponse = function (properties) { + this.entries = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ListVaultEntriesResponse entries. + * @member {Array.} entries + * @memberof atomic.ListVaultEntriesResponse + * @instance + */ + ListVaultEntriesResponse.prototype.entries = $util.emptyArray; + + /** + * ListVaultEntriesResponse nextCursor. + * @member {atomic.PageCursor.$Properties|null|undefined} nextCursor + * @memberof atomic.ListVaultEntriesResponse + * @instance + */ + ListVaultEntriesResponse.prototype.nextCursor = null; + + /** + * ListVaultEntriesResponse snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.ListVaultEntriesResponse + * @instance + */ + ListVaultEntriesResponse.prototype.snapshot = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesResponse.prototype, "_next_cursor", { + get: $util.oneOfGetter($oneOfFields = ["nextCursor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListVaultEntriesResponse instance using the specified properties. + * @function create + * @memberof atomic.ListVaultEntriesResponse + * @static + * @param {atomic.ListVaultEntriesResponse.$Properties=} [properties] Properties to set + * @returns {atomic.ListVaultEntriesResponse} ListVaultEntriesResponse instance + * @type {{ + * (properties: atomic.ListVaultEntriesResponse.$Shape): atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape; + * (properties?: atomic.ListVaultEntriesResponse.$Properties): atomic.ListVaultEntriesResponse; + * }} + */ + ListVaultEntriesResponse.create = function(properties) { + return new ListVaultEntriesResponse(properties); + }; + + /** + * Encodes the specified ListVaultEntriesResponse message. Does not implicitly {@link atomic.ListVaultEntriesResponse.verify|verify} messages. + * @function encode + * @memberof atomic.ListVaultEntriesResponse + * @static + * @param {atomic.ListVaultEntriesResponse.$Properties} message ListVaultEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVaultEntriesResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.atomic.VaultEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.nextCursor != null && $Object.hasOwnProperty.call(message, "nextCursor")) + $root.atomic.PageCursor.encode(message.nextCursor, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + $root.atomic.ViewSnapshot.encode(message.snapshot, writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ListVaultEntriesResponse message, length delimited. Does not implicitly {@link atomic.ListVaultEntriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ListVaultEntriesResponse + * @static + * @param {atomic.ListVaultEntriesResponse.$Properties} message ListVaultEntriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVaultEntriesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ListVaultEntriesResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.ListVaultEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape} ListVaultEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVaultEntriesResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ListVaultEntriesResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.atomic.VaultEntry.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.nextCursor = $root.atomic.PageCursor.decode(reader, reader.size(), $undefined, _depth + 1, message.nextCursor); + message._next_cursor = "nextCursor"; + continue; + } + case 20: { + if (wireType !== 2) + break; + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ListVaultEntriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ListVaultEntriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape} ListVaultEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVaultEntriesResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ListVaultEntriesResponse message. + * @function verify + * @memberof atomic.ListVaultEntriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVaultEntriesResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.atomic.VaultEntry.verify(message.entries[i], _depth + 1); + if (error) + return "entries." + error; + } + } + if (message.nextCursor != null && $Object.hasOwnProperty.call(message, "nextCursor")) { + properties._next_cursor = 1; + { + var error = $root.atomic.PageCursor.verify(message.nextCursor, _depth + 1); + if (error) + return "nextCursor." + error; + } + } + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { + var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); + if (error) + return "snapshot." + error; + } + return null; + }; + + /** + * Creates a ListVaultEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ListVaultEntriesResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.ListVaultEntriesResponse} ListVaultEntriesResponse + */ + ListVaultEntriesResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ListVaultEntriesResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ListVaultEntriesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ListVaultEntriesResponse(); + if (object.entries) { + if (!$Array.isArray(object.entries)) + throw $TypeError(".atomic.ListVaultEntriesResponse.entries: array expected"); + message.entries = $Array(object.entries.length); + for (var i = 0; i < object.entries.length; ++i) { + if (!$util.isObject(object.entries[i])) + throw $TypeError(".atomic.ListVaultEntriesResponse.entries: object expected"); + message.entries[i] = $root.atomic.VaultEntry.fromObject(object.entries[i], _depth + 1); + } + } + if (object.nextCursor != null) { + if (!$util.isObject(object.nextCursor)) + throw $TypeError(".atomic.ListVaultEntriesResponse.nextCursor: object expected"); + message.nextCursor = $root.atomic.PageCursor.fromObject(object.nextCursor, _depth + 1); + } + if (object.snapshot != null) { + if (!$util.isObject(object.snapshot)) + throw $TypeError(".atomic.ListVaultEntriesResponse.snapshot: object expected"); + message.snapshot = $root.atomic.ViewSnapshot.fromObject(object.snapshot, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ListVaultEntriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ListVaultEntriesResponse + * @static + * @param {atomic.ListVaultEntriesResponse} message ListVaultEntriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVaultEntriesResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) + object.snapshot = null; + if (message.entries && message.entries.length) { + object.entries = $Array(message.entries.length); + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.atomic.VaultEntry.toObject(message.entries[j], options, _depth + 1); + } + if (message.nextCursor != null && $Object.hasOwnProperty.call(message, "nextCursor")) + object.nextCursor = $root.atomic.PageCursor.toObject(message.nextCursor, options, _depth + 1); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + object.snapshot = $root.atomic.ViewSnapshot.toObject(message.snapshot, options, _depth + 1); + return object; + }; + + /** + * Converts this ListVaultEntriesResponse to JSON. + * @function toJSON + * @memberof atomic.ListVaultEntriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListVaultEntriesResponse.prototype.toJSON = function() { + return ListVaultEntriesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ListVaultEntriesResponse + * @function getTypeUrl + * @memberof atomic.ListVaultEntriesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ListVaultEntriesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ListVaultEntriesResponse"; + }; + + return ListVaultEntriesResponse; + })(); + + atomic.GetVaultContextRequest = (function() { + + /** + * Properties of a GetVaultContextRequest. + * @typedef {Object} atomic.GetVaultContextRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] GetVaultContextRequest repository + * @property {number|null} [maxEntries] GetVaultContextRequest maxEntries + * @property {Array.|null} [kinds] GetVaultContextRequest kinds + * @property {Array.|null} [query] GetVaultContextRequest query + * @property {string|null} [intent] GetVaultContextRequest intent + * @property {Array.|null} [files] GetVaultContextRequest files + * @property {number|null} [budgetChars] GetVaultContextRequest budgetChars + * @property {boolean|null} [includeBody] GetVaultContextRequest includeBody + * @property {atomic.ViewRef.$Properties|null} [view] GetVaultContextRequest view + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetVaultContextRequest. + * @memberof atomic + * @interface IGetVaultContextRequest + * @augments atomic.GetVaultContextRequest.$Properties + * @deprecated Use atomic.GetVaultContextRequest.$Properties instead. + */ + + /** + * Shape of a GetVaultContextRequest. + * @typedef {atomic.GetVaultContextRequest.$Properties} atomic.GetVaultContextRequest.$Shape + */ + + /** + * Constructs a new GetVaultContextRequest. + * @memberof atomic + * @classdesc Represents a GetVaultContextRequest. + * @constructor + * @param {atomic.GetVaultContextRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetVaultContextRequest = function (properties) { + this.kinds = []; + this.query = []; + this.files = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetVaultContextRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.GetVaultContextRequest + * @instance + */ + GetVaultContextRequest.prototype.repository = null; + + /** + * GetVaultContextRequest maxEntries. + * @member {number|null|undefined} maxEntries + * @memberof atomic.GetVaultContextRequest + * @instance + */ + GetVaultContextRequest.prototype.maxEntries = null; + + /** + * GetVaultContextRequest kinds. + * @member {Array.} kinds + * @memberof atomic.GetVaultContextRequest + * @instance + */ + GetVaultContextRequest.prototype.kinds = $util.emptyArray; + + /** + * GetVaultContextRequest query. + * @member {Array.} query + * @memberof atomic.GetVaultContextRequest + * @instance + */ + GetVaultContextRequest.prototype.query = $util.emptyArray; + + /** + * GetVaultContextRequest intent. + * @member {string|null|undefined} intent + * @memberof atomic.GetVaultContextRequest + * @instance + */ + GetVaultContextRequest.prototype.intent = null; + + /** + * GetVaultContextRequest files. + * @member {Array.} files + * @memberof atomic.GetVaultContextRequest + * @instance + */ + GetVaultContextRequest.prototype.files = $util.emptyArray; + + /** + * GetVaultContextRequest budgetChars. + * @member {number|null|undefined} budgetChars + * @memberof atomic.GetVaultContextRequest + * @instance + */ + GetVaultContextRequest.prototype.budgetChars = null; + + /** + * GetVaultContextRequest includeBody. + * @member {boolean|null|undefined} includeBody + * @memberof atomic.GetVaultContextRequest + * @instance + */ + GetVaultContextRequest.prototype.includeBody = null; + + /** + * GetVaultContextRequest view. + * @member {atomic.ViewRef.$Properties|null|undefined} view + * @memberof atomic.GetVaultContextRequest + * @instance + */ + GetVaultContextRequest.prototype.view = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetVaultContextRequest.prototype, "_max_entries", { + get: $util.oneOfGetter($oneOfFields = ["maxEntries"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetVaultContextRequest.prototype, "_intent", { + get: $util.oneOfGetter($oneOfFields = ["intent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetVaultContextRequest.prototype, "_budget_chars", { + get: $util.oneOfGetter($oneOfFields = ["budgetChars"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetVaultContextRequest.prototype, "_include_body", { + get: $util.oneOfGetter($oneOfFields = ["includeBody"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetVaultContextRequest instance using the specified properties. + * @function create + * @memberof atomic.GetVaultContextRequest + * @static + * @param {atomic.GetVaultContextRequest.$Properties=} [properties] Properties to set + * @returns {atomic.GetVaultContextRequest} GetVaultContextRequest instance + * @type {{ + * (properties: atomic.GetVaultContextRequest.$Shape): atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape; + * (properties?: atomic.GetVaultContextRequest.$Properties): atomic.GetVaultContextRequest; + * }} + */ + GetVaultContextRequest.create = function(properties) { + return new GetVaultContextRequest(properties); + }; + + /** + * Encodes the specified GetVaultContextRequest message. Does not implicitly {@link atomic.GetVaultContextRequest.verify|verify} messages. + * @function encode + * @memberof atomic.GetVaultContextRequest + * @static + * @param {atomic.GetVaultContextRequest.$Properties} message GetVaultContextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVaultContextRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.maxEntries != null && $Object.hasOwnProperty.call(message, "maxEntries")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maxEntries); + if (message.kinds != null && message.kinds.length) + writer.uint32(/* id 3, wireType 2 =*/26).int32s(message.kinds); + if (message.query != null && message.query.length) + for (var i = 0; i < message.query.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.query[i]); + if (message.intent != null && $Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.intent); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.files[i]); + if (message.budgetChars != null && $Object.hasOwnProperty.call(message, "budgetChars")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.budgetChars); + if (message.includeBody != null && $Object.hasOwnProperty.call(message, "includeBody")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.includeBody); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + $root.atomic.ViewRef.encode(message.view, writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetVaultContextRequest message, length delimited. Does not implicitly {@link atomic.GetVaultContextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetVaultContextRequest + * @static + * @param {atomic.GetVaultContextRequest.$Properties} message GetVaultContextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVaultContextRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetVaultContextRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetVaultContextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape} GetVaultContextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVaultContextRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetVaultContextRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.maxEntries = reader.uint32(); + message._max_entries = "maxEntries"; + continue; + } + case 3: { + if (wireType === 2) { + if (!(message.kinds && message.kinds.length)) + message.kinds = []; + reader.int32s(message.kinds); + continue; + } + if (wireType !== 0) + break; + if (!(message.kinds && message.kinds.length)) + message.kinds = []; + message.kinds.push(reader.int32()); + continue; + } + case 4: { + if (wireType !== 2) + break; + if (!(message.query && message.query.length)) + message.query = []; + message.query.push(reader.stringVerify()); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.intent = reader.stringVerify(); + message._intent = "intent"; + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.files && message.files.length)) + message.files = []; + message.files.push(reader.stringVerify()); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.budgetChars = reader.uint32(); + message._budget_chars = "budgetChars"; + continue; + } + case 8: { + if (wireType !== 0) + break; + message.includeBody = reader.bool(); + message._include_body = "includeBody"; + continue; + } + case 20: { + if (wireType !== 2) + break; + message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetVaultContextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetVaultContextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape} GetVaultContextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVaultContextRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetVaultContextRequest message. + * @function verify + * @memberof atomic.GetVaultContextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVaultContextRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.maxEntries != null && $Object.hasOwnProperty.call(message, "maxEntries")) { + properties._max_entries = 1; + if (!$util.isInteger(message.maxEntries)) + return "maxEntries: integer expected"; + } + if (message.kinds != null && $Object.hasOwnProperty.call(message, "kinds")) { + if (!$Array.isArray(message.kinds)) + return "kinds: array expected"; + for (var i = 0; i < message.kinds.length; ++i) + if (typeof message.kinds[i] !== "number" || (message.kinds[i] | 0) !== message.kinds[i]) + return "kinds: enum value[] expected"; + } + if (message.query != null && $Object.hasOwnProperty.call(message, "query")) { + if (!$Array.isArray(message.query)) + return "query: array expected"; + for (var i = 0; i < message.query.length; ++i) + if (!$util.isString(message.query[i])) + return "query: string[] expected"; + } + if (message.intent != null && $Object.hasOwnProperty.call(message, "intent")) { + properties._intent = 1; + if (!$util.isString(message.intent)) + return "intent: string expected"; + } + if (message.files != null && $Object.hasOwnProperty.call(message, "files")) { + if (!$Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) + if (!$util.isString(message.files[i])) + return "files: string[] expected"; + } + if (message.budgetChars != null && $Object.hasOwnProperty.call(message, "budgetChars")) { + properties._budget_chars = 1; + if (!$util.isInteger(message.budgetChars)) + return "budgetChars: integer expected"; + } + if (message.includeBody != null && $Object.hasOwnProperty.call(message, "includeBody")) { + properties._include_body = 1; + if (typeof message.includeBody !== "boolean") + return "includeBody: boolean expected"; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + var error = $root.atomic.ViewRef.verify(message.view, _depth + 1); + if (error) + return "view." + error; + } + return null; + }; + + /** + * Creates a GetVaultContextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetVaultContextRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetVaultContextRequest} GetVaultContextRequest + */ + GetVaultContextRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetVaultContextRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetVaultContextRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetVaultContextRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.GetVaultContextRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.maxEntries != null) + message.maxEntries = object.maxEntries >>> 0; + if (object.kinds) { + if (!$Array.isArray(object.kinds)) + throw $TypeError(".atomic.GetVaultContextRequest.kinds: array expected"); + message.kinds = []; + for (var i = 0; i < object.kinds.length; ++i) + switch (object.kinds[i]) { + case "VAULT_ENTITY_KIND_UNSPECIFIED": + case 0: + message.kinds[message.kinds.length] = 0; + break; + case "VAULT_ENTITY_KIND_INTENT": + case 1: + message.kinds[message.kinds.length] = 1; + break; + case "VAULT_ENTITY_KIND_MEMORY": + case 2: + message.kinds[message.kinds.length] = 2; + break; + case "VAULT_ENTITY_KIND_GOAL": + case 3: + message.kinds[message.kinds.length] = 3; + break; + default: + if (typeof object.kinds[i] === "number" && (object.kinds[i] | 0) === object.kinds[i]) + message.kinds[message.kinds.length] = object.kinds[i]; + } + } + if (object.query) { + if (!$Array.isArray(object.query)) + throw $TypeError(".atomic.GetVaultContextRequest.query: array expected"); + message.query = $Array(object.query.length); + for (var i = 0; i < object.query.length; ++i) + message.query[i] = $String(object.query[i]); + } + if (object.intent != null) + message.intent = $String(object.intent); + if (object.files) { + if (!$Array.isArray(object.files)) + throw $TypeError(".atomic.GetVaultContextRequest.files: array expected"); + message.files = $Array(object.files.length); + for (var i = 0; i < object.files.length; ++i) + message.files[i] = $String(object.files[i]); + } + if (object.budgetChars != null) + message.budgetChars = object.budgetChars >>> 0; + if (object.includeBody != null) + message.includeBody = $Boolean(object.includeBody); + if (object.view != null) { + if (!$util.isObject(object.view)) + throw $TypeError(".atomic.GetVaultContextRequest.view: object expected"); + message.view = $root.atomic.ViewRef.fromObject(object.view, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a GetVaultContextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetVaultContextRequest + * @static + * @param {atomic.GetVaultContextRequest} message GetVaultContextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVaultContextRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.kinds = []; + object.query = []; + object.files = []; + } + if (options.defaults) { + object.repository = null; + object.view = null; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.maxEntries != null && $Object.hasOwnProperty.call(message, "maxEntries")) + object.maxEntries = message.maxEntries; + if (message.kinds && message.kinds.length) { + object.kinds = $Array(message.kinds.length); + for (var j = 0; j < message.kinds.length; ++j) + object.kinds[j] = options.enums === $String ? $root.atomic.VaultEntityKind[message.kinds[j]] === $undefined ? message.kinds[j] : $root.atomic.VaultEntityKind[message.kinds[j]] : message.kinds[j]; + } + if (message.query && message.query.length) { + object.query = $Array(message.query.length); + for (var j = 0; j < message.query.length; ++j) + object.query[j] = message.query[j]; + } + if (message.intent != null && $Object.hasOwnProperty.call(message, "intent")) + object.intent = message.intent; + if (message.files && message.files.length) { + object.files = $Array(message.files.length); + for (var j = 0; j < message.files.length; ++j) + object.files[j] = message.files[j]; + } + if (message.budgetChars != null && $Object.hasOwnProperty.call(message, "budgetChars")) + object.budgetChars = message.budgetChars; + if (message.includeBody != null && $Object.hasOwnProperty.call(message, "includeBody")) + object.includeBody = message.includeBody; + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = $root.atomic.ViewRef.toObject(message.view, options, _depth + 1); + return object; + }; + + /** + * Converts this GetVaultContextRequest to JSON. + * @function toJSON + * @memberof atomic.GetVaultContextRequest + * @instance + * @returns {Object.} JSON object + */ + GetVaultContextRequest.prototype.toJSON = function() { + return GetVaultContextRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetVaultContextRequest + * @function getTypeUrl + * @memberof atomic.GetVaultContextRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetVaultContextRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetVaultContextRequest"; + }; + + return GetVaultContextRequest; + })(); + + atomic.GetVaultContextResponse = (function() { + + /** + * Properties of a GetVaultContextResponse. + * @typedef {Object} atomic.GetVaultContextResponse.$Properties + * @property {Array.|null} [entries] GetVaultContextResponse entries + * @property {Array.|null} [context] GetVaultContextResponse context + * @property {atomic.ViewSnapshot.$Properties|null} [snapshot] GetVaultContextResponse snapshot + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetVaultContextResponse. + * @memberof atomic + * @interface IGetVaultContextResponse + * @augments atomic.GetVaultContextResponse.$Properties + * @deprecated Use atomic.GetVaultContextResponse.$Properties instead. + */ + + /** + * Shape of a GetVaultContextResponse. + * @typedef {atomic.GetVaultContextResponse.$Properties} atomic.GetVaultContextResponse.$Shape + */ + + /** + * Constructs a new GetVaultContextResponse. + * @memberof atomic + * @classdesc Represents a GetVaultContextResponse. + * @constructor + * @param {atomic.GetVaultContextResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetVaultContextResponse = function (properties) { + this.entries = []; + this.context = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetVaultContextResponse entries. + * @member {Array.} entries + * @memberof atomic.GetVaultContextResponse + * @instance + */ + GetVaultContextResponse.prototype.entries = $util.emptyArray; + + /** + * GetVaultContextResponse context. + * @member {Array.} context + * @memberof atomic.GetVaultContextResponse + * @instance + */ + GetVaultContextResponse.prototype.context = $util.emptyArray; + + /** + * GetVaultContextResponse snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.GetVaultContextResponse + * @instance + */ + GetVaultContextResponse.prototype.snapshot = null; + + /** + * Creates a new GetVaultContextResponse instance using the specified properties. + * @function create + * @memberof atomic.GetVaultContextResponse + * @static + * @param {atomic.GetVaultContextResponse.$Properties=} [properties] Properties to set + * @returns {atomic.GetVaultContextResponse} GetVaultContextResponse instance + * @type {{ + * (properties: atomic.GetVaultContextResponse.$Shape): atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape; + * (properties?: atomic.GetVaultContextResponse.$Properties): atomic.GetVaultContextResponse; + * }} + */ + GetVaultContextResponse.create = function(properties) { + return new GetVaultContextResponse(properties); + }; + + /** + * Encodes the specified GetVaultContextResponse message. Does not implicitly {@link atomic.GetVaultContextResponse.verify|verify} messages. + * @function encode + * @memberof atomic.GetVaultContextResponse + * @static + * @param {atomic.GetVaultContextResponse.$Properties} message GetVaultContextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVaultContextResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.atomic.VaultEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.context != null && message.context.length) + for (var i = 0; i < message.context.length; ++i) + $root.atomic.ContextItem.encode(message.context[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + $root.atomic.ViewSnapshot.encode(message.snapshot, writer.uint32(/* id 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetVaultContextResponse message, length delimited. Does not implicitly {@link atomic.GetVaultContextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetVaultContextResponse + * @static + * @param {atomic.GetVaultContextResponse.$Properties} message GetVaultContextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVaultContextResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetVaultContextResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetVaultContextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape} GetVaultContextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVaultContextResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetVaultContextResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.atomic.VaultEntry.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.context && message.context.length)) + message.context = []; + message.context.push($root.atomic.ContextItem.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 20: { + if (wireType !== 2) + break; + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetVaultContextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetVaultContextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape} GetVaultContextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVaultContextResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetVaultContextResponse message. + * @function verify + * @memberof atomic.GetVaultContextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVaultContextResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.entries != null && $Object.hasOwnProperty.call(message, "entries")) { + if (!$Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.atomic.VaultEntry.verify(message.entries[i], _depth + 1); + if (error) + return "entries." + error; + } + } + if (message.context != null && $Object.hasOwnProperty.call(message, "context")) { + if (!$Array.isArray(message.context)) + return "context: array expected"; + for (var i = 0; i < message.context.length; ++i) { + var error = $root.atomic.ContextItem.verify(message.context[i], _depth + 1); + if (error) + return "context." + error; + } + } + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { + var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); + if (error) + return "snapshot." + error; + } + return null; + }; + + /** + * Creates a GetVaultContextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetVaultContextResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetVaultContextResponse} GetVaultContextResponse + */ + GetVaultContextResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetVaultContextResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetVaultContextResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetVaultContextResponse(); + if (object.entries) { + if (!$Array.isArray(object.entries)) + throw $TypeError(".atomic.GetVaultContextResponse.entries: array expected"); + message.entries = $Array(object.entries.length); + for (var i = 0; i < object.entries.length; ++i) { + if (!$util.isObject(object.entries[i])) + throw $TypeError(".atomic.GetVaultContextResponse.entries: object expected"); + message.entries[i] = $root.atomic.VaultEntry.fromObject(object.entries[i], _depth + 1); + } + } + if (object.context) { + if (!$Array.isArray(object.context)) + throw $TypeError(".atomic.GetVaultContextResponse.context: array expected"); + message.context = $Array(object.context.length); + for (var i = 0; i < object.context.length; ++i) { + if (!$util.isObject(object.context[i])) + throw $TypeError(".atomic.GetVaultContextResponse.context: object expected"); + message.context[i] = $root.atomic.ContextItem.fromObject(object.context[i], _depth + 1); + } + } + if (object.snapshot != null) { + if (!$util.isObject(object.snapshot)) + throw $TypeError(".atomic.GetVaultContextResponse.snapshot: object expected"); + message.snapshot = $root.atomic.ViewSnapshot.fromObject(object.snapshot, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a GetVaultContextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetVaultContextResponse + * @static + * @param {atomic.GetVaultContextResponse} message GetVaultContextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVaultContextResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.entries = []; + object.context = []; + } + if (options.defaults) + object.snapshot = null; + if (message.entries && message.entries.length) { + object.entries = $Array(message.entries.length); + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.atomic.VaultEntry.toObject(message.entries[j], options, _depth + 1); + } + if (message.context && message.context.length) { + object.context = $Array(message.context.length); + for (var j = 0; j < message.context.length; ++j) + object.context[j] = $root.atomic.ContextItem.toObject(message.context[j], options, _depth + 1); + } + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + object.snapshot = $root.atomic.ViewSnapshot.toObject(message.snapshot, options, _depth + 1); + return object; + }; + + /** + * Converts this GetVaultContextResponse to JSON. + * @function toJSON + * @memberof atomic.GetVaultContextResponse + * @instance + * @returns {Object.} JSON object + */ + GetVaultContextResponse.prototype.toJSON = function() { + return GetVaultContextResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetVaultContextResponse + * @function getTypeUrl + * @memberof atomic.GetVaultContextResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetVaultContextResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetVaultContextResponse"; + }; + + return GetVaultContextResponse; + })(); + + atomic.ContextItem = (function() { + + /** + * Properties of a ContextItem. + * @typedef {Object} atomic.ContextItem.$Properties + * @property {string|null} [memoryId] ContextItem memoryId + * @property {string|null} [kgNodeId] ContextItem kgNodeId + * @property {string|null} [revisionHash] ContextItem revisionHash + * @property {string|null} [contentHash] ContextItem contentHash + * @property {string|null} [path] ContextItem path + * @property {string|null} [name] ContextItem name + * @property {string|null} [kind] ContextItem kind + * @property {string|null} [status] ContextItem status + * @property {number|null} [score] ContextItem score + * @property {string|null} [whyMatched] ContextItem whyMatched + * @property {string|null} [body] ContextItem body + * @property {string|null} [preview] ContextItem preview + * @property {string|null} [updatedAt] ContextItem updatedAt + * @property {number|Long|null} [introducedBy] ContextItem introducedBy + * @property {boolean|null} [recorded] ContextItem recorded + * @property {boolean|null} [truncated] ContextItem truncated + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ContextItem. + * @memberof atomic + * @interface IContextItem + * @augments atomic.ContextItem.$Properties + * @deprecated Use atomic.ContextItem.$Properties instead. + */ + + /** + * Shape of a ContextItem. + * @typedef {atomic.ContextItem.$Properties} atomic.ContextItem.$Shape + */ + + /** + * Constructs a new ContextItem. + * @memberof atomic + * @classdesc Represents a ContextItem. + * @constructor + * @param {atomic.ContextItem.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ContextItem = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ContextItem memoryId. + * @member {string} memoryId + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.memoryId = ""; + + /** + * ContextItem kgNodeId. + * @member {string} kgNodeId + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.kgNodeId = ""; + + /** + * ContextItem revisionHash. + * @member {string} revisionHash + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.revisionHash = ""; + + /** + * ContextItem contentHash. + * @member {string} contentHash + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.contentHash = ""; + + /** + * ContextItem path. + * @member {string} path + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.path = ""; + + /** + * ContextItem name. + * @member {string} name + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.name = ""; + + /** + * ContextItem kind. + * @member {string} kind + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.kind = ""; + + /** + * ContextItem status. + * @member {string} status + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.status = ""; + + /** + * ContextItem score. + * @member {number} score + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.score = 0; + + /** + * ContextItem whyMatched. + * @member {string} whyMatched + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.whyMatched = ""; + + /** + * ContextItem body. + * @member {string|null|undefined} body + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.body = null; + + /** + * ContextItem preview. + * @member {string|null|undefined} preview + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.preview = null; + + /** + * ContextItem updatedAt. + * @member {string} updatedAt + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.updatedAt = ""; + + /** + * ContextItem introducedBy. + * @member {number|Long} introducedBy + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.introducedBy = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ContextItem recorded. + * @member {boolean} recorded + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.recorded = false; + + /** + * ContextItem truncated. + * @member {boolean} truncated + * @memberof atomic.ContextItem + * @instance + */ + ContextItem.prototype.truncated = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ContextItem.prototype, "_body", { + get: $util.oneOfGetter($oneOfFields = ["body"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ContextItem.prototype, "_preview", { + get: $util.oneOfGetter($oneOfFields = ["preview"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ContextItem instance using the specified properties. + * @function create + * @memberof atomic.ContextItem + * @static + * @param {atomic.ContextItem.$Properties=} [properties] Properties to set + * @returns {atomic.ContextItem} ContextItem instance + * @type {{ + * (properties: atomic.ContextItem.$Shape): atomic.ContextItem & atomic.ContextItem.$Shape; + * (properties?: atomic.ContextItem.$Properties): atomic.ContextItem; + * }} + */ + ContextItem.create = function(properties) { + return new ContextItem(properties); + }; + + /** + * Encodes the specified ContextItem message. Does not implicitly {@link atomic.ContextItem.verify|verify} messages. + * @function encode + * @memberof atomic.ContextItem + * @static + * @param {atomic.ContextItem.$Properties} message ContextItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextItem.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.memoryId != null && $Object.hasOwnProperty.call(message, "memoryId") && message.memoryId !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.memoryId); + if (message.kgNodeId != null && $Object.hasOwnProperty.call(message, "kgNodeId") && message.kgNodeId !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kgNodeId); + if (message.revisionHash != null && $Object.hasOwnProperty.call(message, "revisionHash") && message.revisionHash !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.revisionHash); + if (message.contentHash != null && $Object.hasOwnProperty.call(message, "contentHash") && message.contentHash !== "") + writer.uint32(/* id 4, wireType 2 =*/34).string(message.contentHash); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 5, wireType 2 =*/42).string(message.path); + if (message.name != null && $Object.hasOwnProperty.call(message, "name") && message.name !== "") + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind") && message.kind !== "") + writer.uint32(/* id 7, wireType 2 =*/58).string(message.kind); + if (message.status != null && $Object.hasOwnProperty.call(message, "status") && message.status !== "") + writer.uint32(/* id 8, wireType 2 =*/66).string(message.status); + if (message.score != null && $Object.hasOwnProperty.call(message, "score") && !$Object.is(message.score, 0)) + writer.uint32(/* id 9, wireType 1 =*/73).double(message.score); + if (message.whyMatched != null && $Object.hasOwnProperty.call(message, "whyMatched") && message.whyMatched !== "") + writer.uint32(/* id 10, wireType 2 =*/82).string(message.whyMatched); + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.body); + if (message.preview != null && $Object.hasOwnProperty.call(message, "preview")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.preview); + if (message.updatedAt != null && $Object.hasOwnProperty.call(message, "updatedAt") && message.updatedAt !== "") + writer.uint32(/* id 13, wireType 2 =*/106).string(message.updatedAt); + if (message.introducedBy != null && $Object.hasOwnProperty.call(message, "introducedBy") && (typeof message.introducedBy === "object" ? message.introducedBy.low || message.introducedBy.high : message.introducedBy !== 0)) + writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.introducedBy); + if (message.recorded != null && $Object.hasOwnProperty.call(message, "recorded") && message.recorded !== false) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.recorded); + if (message.truncated != null && $Object.hasOwnProperty.call(message, "truncated") && message.truncated !== false) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.truncated); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ContextItem message, length delimited. Does not implicitly {@link atomic.ContextItem.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ContextItem + * @static + * @param {atomic.ContextItem.$Properties} message ContextItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextItem.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ContextItem message from the specified reader or buffer. + * @function decode + * @memberof atomic.ContextItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ContextItem & atomic.ContextItem.$Shape} ContextItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextItem.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ContextItem(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.memoryId = value; + else + delete message.memoryId; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.kgNodeId = value; + else + delete message.kgNodeId; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.revisionHash = value; + else + delete message.revisionHash; + continue; + } + case 4: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.contentHash = value; + else + delete message.contentHash; + continue; + } + case 5: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + case 6: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.name = value; + else + delete message.name; + continue; + } + case 7: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.kind = value; + else + delete message.kind; + continue; + } + case 8: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.status = value; + else + delete message.status; + continue; + } + case 9: { + if (wireType !== 1) + break; + if (!$Object.is(value = reader.double(), 0)) + message.score = value; + else + delete message.score; + continue; + } + case 10: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.whyMatched = value; + else + delete message.whyMatched; + continue; + } + case 11: { + if (wireType !== 2) + break; + message.body = reader.stringVerify(); + message._body = "body"; + continue; + } + case 12: { + if (wireType !== 2) + break; + message.preview = reader.stringVerify(); + message._preview = "preview"; + continue; + } + case 13: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.updatedAt = value; + else + delete message.updatedAt; + continue; + } + case 14: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.introducedBy = value; + else + delete message.introducedBy; + continue; + } + case 15: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.recorded = value; + else + delete message.recorded; + continue; + } + case 16: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.truncated = value; + else + delete message.truncated; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ContextItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ContextItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ContextItem & atomic.ContextItem.$Shape} ContextItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextItem.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ContextItem message. + * @function verify + * @memberof atomic.ContextItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContextItem.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.memoryId != null && $Object.hasOwnProperty.call(message, "memoryId")) + if (!$util.isString(message.memoryId)) + return "memoryId: string expected"; + if (message.kgNodeId != null && $Object.hasOwnProperty.call(message, "kgNodeId")) + if (!$util.isString(message.kgNodeId)) + return "kgNodeId: string expected"; + if (message.revisionHash != null && $Object.hasOwnProperty.call(message, "revisionHash")) + if (!$util.isString(message.revisionHash)) + return "revisionHash: string expected"; + if (message.contentHash != null && $Object.hasOwnProperty.call(message, "contentHash")) + if (!$util.isString(message.contentHash)) + return "contentHash: string expected"; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + if (!$util.isString(message.status)) + return "status: string expected"; + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) + if (typeof message.score !== "number") + return "score: number expected"; + if (message.whyMatched != null && $Object.hasOwnProperty.call(message, "whyMatched")) + if (!$util.isString(message.whyMatched)) + return "whyMatched: string expected"; + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) { + properties._body = 1; + if (!$util.isString(message.body)) + return "body: string expected"; + } + if (message.preview != null && $Object.hasOwnProperty.call(message, "preview")) { + properties._preview = 1; + if (!$util.isString(message.preview)) + return "preview: string expected"; + } + if (message.updatedAt != null && $Object.hasOwnProperty.call(message, "updatedAt")) + if (!$util.isString(message.updatedAt)) + return "updatedAt: string expected"; + if (message.introducedBy != null && $Object.hasOwnProperty.call(message, "introducedBy")) + if (!$util.isInteger(message.introducedBy) && !(message.introducedBy && $util.isInteger(message.introducedBy.low) && $util.isInteger(message.introducedBy.high))) + return "introducedBy: integer|Long expected"; + if (message.recorded != null && $Object.hasOwnProperty.call(message, "recorded")) + if (typeof message.recorded !== "boolean") + return "recorded: boolean expected"; + if (message.truncated != null && $Object.hasOwnProperty.call(message, "truncated")) + if (typeof message.truncated !== "boolean") + return "truncated: boolean expected"; + return null; + }; + + /** + * Creates a ContextItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ContextItem + * @static + * @param {Object.} object Plain object + * @returns {atomic.ContextItem} ContextItem + */ + ContextItem.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ContextItem) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ContextItem: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ContextItem(); + if (object.memoryId != null) + if (typeof object.memoryId !== "string" || object.memoryId.length) + message.memoryId = $String(object.memoryId); + if (object.kgNodeId != null) + if (typeof object.kgNodeId !== "string" || object.kgNodeId.length) + message.kgNodeId = $String(object.kgNodeId); + if (object.revisionHash != null) + if (typeof object.revisionHash !== "string" || object.revisionHash.length) + message.revisionHash = $String(object.revisionHash); + if (object.contentHash != null) + if (typeof object.contentHash !== "string" || object.contentHash.length) + message.contentHash = $String(object.contentHash); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + if (object.name != null) + if (typeof object.name !== "string" || object.name.length) + message.name = $String(object.name); + if (object.kind != null) + if (typeof object.kind !== "string" || object.kind.length) + message.kind = $String(object.kind); + if (object.status != null) + if (typeof object.status !== "string" || object.status.length) + message.status = $String(object.status); + if (object.score != null) + if (!$Object.is($Number(object.score), 0)) + message.score = $Number(object.score); + if (object.whyMatched != null) + if (typeof object.whyMatched !== "string" || object.whyMatched.length) + message.whyMatched = $String(object.whyMatched); + if (object.body != null) + message.body = $String(object.body); + if (object.preview != null) + message.preview = $String(object.preview); + if (object.updatedAt != null) + if (typeof object.updatedAt !== "string" || object.updatedAt.length) + message.updatedAt = $String(object.updatedAt); + if (object.introducedBy != null) + if (typeof object.introducedBy === "object" ? object.introducedBy.low || object.introducedBy.high : $Number(object.introducedBy) !== 0) + if ($util.Long) + message.introducedBy = $util.Long.fromValue(object.introducedBy, true); + else if (typeof object.introducedBy === "string") + message.introducedBy = $parseInt(object.introducedBy, 10); + else if (typeof object.introducedBy === "number") + message.introducedBy = object.introducedBy; + else if (typeof object.introducedBy === "object") + message.introducedBy = new $util.LongBits(object.introducedBy.low >>> 0, object.introducedBy.high >>> 0).toNumber(true); + if (object.recorded != null) + if (object.recorded) + message.recorded = $Boolean(object.recorded); + if (object.truncated != null) + if (object.truncated) + message.truncated = $Boolean(object.truncated); + return message; + }; + + /** + * Creates a plain object from a ContextItem message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ContextItem + * @static + * @param {atomic.ContextItem} message ContextItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContextItem.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.memoryId = ""; + object.kgNodeId = ""; + object.revisionHash = ""; + object.contentHash = ""; + object.path = ""; + object.name = ""; + object.kind = ""; + object.status = ""; + object.score = 0; + object.whyMatched = ""; + object.updatedAt = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.introducedBy = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.introducedBy = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.recorded = false; + object.truncated = false; + } + if (message.memoryId != null && $Object.hasOwnProperty.call(message, "memoryId")) + object.memoryId = message.memoryId; + if (message.kgNodeId != null && $Object.hasOwnProperty.call(message, "kgNodeId")) + object.kgNodeId = message.kgNodeId; + if (message.revisionHash != null && $Object.hasOwnProperty.call(message, "revisionHash")) + object.revisionHash = message.revisionHash; + if (message.contentHash != null && $Object.hasOwnProperty.call(message, "contentHash")) + object.contentHash = message.contentHash; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + object.kind = message.kind; + if (message.status != null && $Object.hasOwnProperty.call(message, "status")) + object.status = message.status; + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) + object.score = options.json && !$isFinite(message.score) ? $String(message.score) : message.score; + if (message.whyMatched != null && $Object.hasOwnProperty.call(message, "whyMatched")) + object.whyMatched = message.whyMatched; + if (message.body != null && $Object.hasOwnProperty.call(message, "body")) + object.body = message.body; + if (message.preview != null && $Object.hasOwnProperty.call(message, "preview")) + object.preview = message.preview; + if (message.updatedAt != null && $Object.hasOwnProperty.call(message, "updatedAt")) + object.updatedAt = message.updatedAt; + if (message.introducedBy != null && $Object.hasOwnProperty.call(message, "introducedBy")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.introducedBy = typeof message.introducedBy === "number" ? $BigInt(message.introducedBy) : $util.Long.fromBits(message.introducedBy.low >>> 0, message.introducedBy.high >>> 0, true).toBigInt(); + else if (typeof message.introducedBy === "number") + object.introducedBy = options.longs === $String ? $String(message.introducedBy) : message.introducedBy; + else + object.introducedBy = options.longs === $String ? $util.Long.prototype.toString.call(message.introducedBy) : options.longs === $Number ? new $util.LongBits(message.introducedBy.low >>> 0, message.introducedBy.high >>> 0).toNumber(true) : message.introducedBy; + if (message.recorded != null && $Object.hasOwnProperty.call(message, "recorded")) + object.recorded = message.recorded; + if (message.truncated != null && $Object.hasOwnProperty.call(message, "truncated")) + object.truncated = message.truncated; + return object; + }; + + /** + * Converts this ContextItem to JSON. + * @function toJSON + * @memberof atomic.ContextItem + * @instance + * @returns {Object.} JSON object + */ + ContextItem.prototype.toJSON = function() { + return ContextItem.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ContextItem + * @function getTypeUrl + * @memberof atomic.ContextItem + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ContextItem.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ContextItem"; + }; + + return ContextItem; + })(); + + atomic.VerifyAttestationRequest = (function() { + + /** + * Properties of a VerifyAttestationRequest. + * @typedef {Object} atomic.VerifyAttestationRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] VerifyAttestationRequest repository + * @property {string|null} [attestationId] VerifyAttestationRequest attestationId + * @property {atomic.AttestationTarget.$Properties|null} [subject] VerifyAttestationRequest subject + * @property {atomic.ViewRef.$Properties|null} [view] VerifyAttestationRequest view + * @property {string|null} [identityName] VerifyAttestationRequest identityName + * @property {Uint8Array|null} [publicKey] VerifyAttestationRequest publicKey + * @property {"attestationId"|"subject"} [target] VerifyAttestationRequest target + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a VerifyAttestationRequest. + * @memberof atomic + * @interface IVerifyAttestationRequest + * @augments atomic.VerifyAttestationRequest.$Properties + * @deprecated Use atomic.VerifyAttestationRequest.$Properties instead. + */ + + /** + * Narrowed shape of a VerifyAttestationRequest. + * @typedef {{ + * repository?: atomic.RepositoryRef.$Shape|null; + * attestationId?: string|null; + * subject?: atomic.AttestationTarget.$Shape|null; + * view?: atomic.ViewRef.$Shape|null; + * identityName?: string|null; + * publicKey?: Uint8Array|null; + * $unknowns?: Array.; + * } & ( + * ({ target?: undefined; attestationId?: null; subject?: null }|{ target?: "attestationId"; attestationId: string; subject?: null }|{ target?: "subject"; attestationId?: null; subject: atomic.AttestationTarget.$Shape }) + * )} atomic.VerifyAttestationRequest.$Shape + */ + + /** + * Constructs a new VerifyAttestationRequest. + * @memberof atomic + * @classdesc Represents a VerifyAttestationRequest. + * @constructor + * @param {atomic.VerifyAttestationRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var VerifyAttestationRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * VerifyAttestationRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.repository = null; + + /** + * VerifyAttestationRequest attestationId. + * @member {string|null|undefined} attestationId + * @memberof atomic.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.attestationId = null; + + /** + * VerifyAttestationRequest subject. + * @member {atomic.AttestationTarget.$Properties|null|undefined} subject + * @memberof atomic.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.subject = null; + + /** + * VerifyAttestationRequest view. + * @member {atomic.ViewRef.$Properties|null|undefined} view + * @memberof atomic.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.view = null; + + /** + * VerifyAttestationRequest identityName. + * @member {string|null|undefined} identityName + * @memberof atomic.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.identityName = null; + + /** + * VerifyAttestationRequest publicKey. + * @member {Uint8Array|null|undefined} publicKey + * @memberof atomic.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.publicKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VerifyAttestationRequest target. + * @member {"attestationId"|"subject"|undefined} target + * @memberof atomic.VerifyAttestationRequest + * @instance + */ + $Object.defineProperty(VerifyAttestationRequest.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["attestationId", "subject"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationRequest.prototype, "_identity_name", { + get: $util.oneOfGetter($oneOfFields = ["identityName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationRequest.prototype, "_public_key", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VerifyAttestationRequest instance using the specified properties. + * @function create + * @memberof atomic.VerifyAttestationRequest + * @static + * @param {atomic.VerifyAttestationRequest.$Properties=} [properties] Properties to set + * @returns {atomic.VerifyAttestationRequest} VerifyAttestationRequest instance + * @type {{ + * (properties: atomic.VerifyAttestationRequest.$Shape): atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape; + * (properties?: atomic.VerifyAttestationRequest.$Properties): atomic.VerifyAttestationRequest; + * }} + */ + VerifyAttestationRequest.create = function(properties) { + return new VerifyAttestationRequest(properties); + }; + + /** + * Encodes the specified VerifyAttestationRequest message. Does not implicitly {@link atomic.VerifyAttestationRequest.verify|verify} messages. + * @function encode + * @memberof atomic.VerifyAttestationRequest + * @static + * @param {atomic.VerifyAttestationRequest.$Properties} message VerifyAttestationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.attestationId != null && $Object.hasOwnProperty.call(message, "attestationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.attestationId); + if (message.subject != null && $Object.hasOwnProperty.call(message, "subject")) + $root.atomic.AttestationTarget.encode(message.subject, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + $root.atomic.ViewRef.encode(message.view, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.identityName != null && $Object.hasOwnProperty.call(message, "identityName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.identityName); + if (message.publicKey != null && $Object.hasOwnProperty.call(message, "publicKey")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.publicKey); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified VerifyAttestationRequest message, length delimited. Does not implicitly {@link atomic.VerifyAttestationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.VerifyAttestationRequest + * @static + * @param {atomic.VerifyAttestationRequest.$Properties} message VerifyAttestationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.VerifyAttestationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape} VerifyAttestationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.VerifyAttestationRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.attestationId = reader.stringVerify(); + message.target = "attestationId"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.subject = $root.atomic.AttestationTarget.decode(reader, reader.size(), $undefined, _depth + 1, message.subject); + message.target = "subject"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + continue; + } + case 5: { + if (wireType !== 2) + break; + message.identityName = reader.stringVerify(); + message._identity_name = "identityName"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.publicKey = reader.bytes(); + message._public_key = "publicKey"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.VerifyAttestationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape} VerifyAttestationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a VerifyAttestationRequest message. + * @function verify + * @memberof atomic.VerifyAttestationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyAttestationRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.attestationId != null && $Object.hasOwnProperty.call(message, "attestationId")) { + properties.target = 1; + if (!$util.isString(message.attestationId)) + return "attestationId: string expected"; + } + if (message.subject != null && $Object.hasOwnProperty.call(message, "subject")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.atomic.AttestationTarget.verify(message.subject, _depth + 1); + if (error) + return "subject." + error; + } + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + var error = $root.atomic.ViewRef.verify(message.view, _depth + 1); + if (error) + return "view." + error; + } + if (message.identityName != null && $Object.hasOwnProperty.call(message, "identityName")) { + properties._identity_name = 1; + if (!$util.isString(message.identityName)) + return "identityName: string expected"; + } + if (message.publicKey != null && $Object.hasOwnProperty.call(message, "publicKey")) { + properties._public_key = 1; + if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) + return "publicKey: buffer expected"; + } + return null; + }; + + /** + * Creates a VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.VerifyAttestationRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.VerifyAttestationRequest} VerifyAttestationRequest + */ + VerifyAttestationRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.VerifyAttestationRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.VerifyAttestationRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.VerifyAttestationRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.VerifyAttestationRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.attestationId != null) + message.attestationId = $String(object.attestationId); + if (object.subject != null) { + if (!$util.isObject(object.subject)) + throw $TypeError(".atomic.VerifyAttestationRequest.subject: object expected"); + message.subject = $root.atomic.AttestationTarget.fromObject(object.subject, _depth + 1); + } + if (object.view != null) { + if (!$util.isObject(object.view)) + throw $TypeError(".atomic.VerifyAttestationRequest.view: object expected"); + message.view = $root.atomic.ViewRef.fromObject(object.view, _depth + 1); + } + if (object.identityName != null) + message.identityName = $String(object.identityName); + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); + else if (object.publicKey.length >= 0) + message.publicKey = object.publicKey; + return message; + }; + + /** + * Creates a plain object from a VerifyAttestationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.VerifyAttestationRequest + * @static + * @param {atomic.VerifyAttestationRequest} message VerifyAttestationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyAttestationRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.view = null; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.attestationId != null && $Object.hasOwnProperty.call(message, "attestationId")) { + object.attestationId = message.attestationId; + if (options.oneofs) + object.target = "attestationId"; + } + if (message.subject != null && $Object.hasOwnProperty.call(message, "subject")) { + object.subject = $root.atomic.AttestationTarget.toObject(message.subject, options, _depth + 1); + if (options.oneofs) + object.target = "subject"; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = $root.atomic.ViewRef.toObject(message.view, options, _depth + 1); + if (message.identityName != null && $Object.hasOwnProperty.call(message, "identityName")) + object.identityName = message.identityName; + if (message.publicKey != null && $Object.hasOwnProperty.call(message, "publicKey")) + object.publicKey = options.bytes === $String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.publicKey) : message.publicKey; + return object; + }; + + /** + * Converts this VerifyAttestationRequest to JSON. + * @function toJSON + * @memberof atomic.VerifyAttestationRequest + * @instance + * @returns {Object.} JSON object + */ + VerifyAttestationRequest.prototype.toJSON = function() { + return VerifyAttestationRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for VerifyAttestationRequest + * @function getTypeUrl + * @memberof atomic.VerifyAttestationRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + VerifyAttestationRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.VerifyAttestationRequest"; + }; + + return VerifyAttestationRequest; + })(); + + atomic.AttestationTarget = (function() { + + /** + * Properties of an AttestationTarget. + * @typedef {Object} atomic.AttestationTarget.$Properties + * @property {string|null} [intentId] AttestationTarget intentId + * @property {string|null} [memoryId] AttestationTarget memoryId + * @property {atomic.Hash.$Properties|null} [changeHash] AttestationTarget changeHash + * @property {atomic.GraphStatsRef.$Properties|null} [graphStats] AttestationTarget graphStats + * @property {"intentId"|"memoryId"|"changeHash"|"graphStats"} [kind] AttestationTarget kind + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an AttestationTarget. + * @memberof atomic + * @interface IAttestationTarget + * @augments atomic.AttestationTarget.$Properties + * @deprecated Use atomic.AttestationTarget.$Properties instead. + */ + + /** + * Narrowed shape of an AttestationTarget. + * @typedef {{ + * intentId?: string|null; + * memoryId?: string|null; + * changeHash?: atomic.Hash.$Shape|null; + * graphStats?: atomic.GraphStatsRef.$Shape|null; + * $unknowns?: Array.; + * } & ( + * ({ kind?: undefined; intentId?: null; memoryId?: null; changeHash?: null; graphStats?: null }|{ kind?: "intentId"; intentId: string; memoryId?: null; changeHash?: null; graphStats?: null }|{ kind?: "memoryId"; intentId?: null; memoryId: string; changeHash?: null; graphStats?: null }|{ kind?: "changeHash"; intentId?: null; memoryId?: null; changeHash: atomic.Hash.$Shape; graphStats?: null }|{ kind?: "graphStats"; intentId?: null; memoryId?: null; changeHash?: null; graphStats: atomic.GraphStatsRef.$Shape }) + * )} atomic.AttestationTarget.$Shape + */ + + /** + * Constructs a new AttestationTarget. + * @memberof atomic + * @classdesc Represents an AttestationTarget. + * @constructor + * @param {atomic.AttestationTarget.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var AttestationTarget = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * AttestationTarget intentId. + * @member {string|null|undefined} intentId + * @memberof atomic.AttestationTarget + * @instance + */ + AttestationTarget.prototype.intentId = null; + + /** + * AttestationTarget memoryId. + * @member {string|null|undefined} memoryId + * @memberof atomic.AttestationTarget + * @instance + */ + AttestationTarget.prototype.memoryId = null; + + /** + * AttestationTarget changeHash. + * @member {atomic.Hash.$Properties|null|undefined} changeHash + * @memberof atomic.AttestationTarget + * @instance + */ + AttestationTarget.prototype.changeHash = null; + + /** + * AttestationTarget graphStats. + * @member {atomic.GraphStatsRef.$Properties|null|undefined} graphStats + * @memberof atomic.AttestationTarget + * @instance + */ + AttestationTarget.prototype.graphStats = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AttestationTarget kind. + * @member {"intentId"|"memoryId"|"changeHash"|"graphStats"|undefined} kind + * @memberof atomic.AttestationTarget + * @instance + */ + $Object.defineProperty(AttestationTarget.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["intentId", "memoryId", "changeHash", "graphStats"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AttestationTarget instance using the specified properties. + * @function create + * @memberof atomic.AttestationTarget + * @static + * @param {atomic.AttestationTarget.$Properties=} [properties] Properties to set + * @returns {atomic.AttestationTarget} AttestationTarget instance + * @type {{ + * (properties: atomic.AttestationTarget.$Shape): atomic.AttestationTarget & atomic.AttestationTarget.$Shape; + * (properties?: atomic.AttestationTarget.$Properties): atomic.AttestationTarget; + * }} + */ + AttestationTarget.create = function(properties) { + return new AttestationTarget(properties); + }; + + /** + * Encodes the specified AttestationTarget message. Does not implicitly {@link atomic.AttestationTarget.verify|verify} messages. + * @function encode + * @memberof atomic.AttestationTarget + * @static + * @param {atomic.AttestationTarget.$Properties} message AttestationTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttestationTarget.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.intentId != null && $Object.hasOwnProperty.call(message, "intentId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intentId); + if (message.memoryId != null && $Object.hasOwnProperty.call(message, "memoryId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.memoryId); + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) + $root.atomic.Hash.encode(message.changeHash, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.graphStats != null && $Object.hasOwnProperty.call(message, "graphStats")) + $root.atomic.GraphStatsRef.encode(message.graphStats, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified AttestationTarget message, length delimited. Does not implicitly {@link atomic.AttestationTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.AttestationTarget + * @static + * @param {atomic.AttestationTarget.$Properties} message AttestationTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttestationTarget.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes an AttestationTarget message from the specified reader or buffer. + * @function decode + * @memberof atomic.AttestationTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.AttestationTarget & atomic.AttestationTarget.$Shape} AttestationTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttestationTarget.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.AttestationTarget(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.intentId = reader.stringVerify(); + message.kind = "intentId"; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.memoryId = reader.stringVerify(); + message.kind = "memoryId"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.changeHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.changeHash); + message.kind = "changeHash"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.graphStats = $root.atomic.GraphStatsRef.decode(reader, reader.size(), $undefined, _depth + 1, message.graphStats); + message.kind = "graphStats"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes an AttestationTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.AttestationTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.AttestationTarget & atomic.AttestationTarget.$Shape} AttestationTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttestationTarget.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies an AttestationTarget message. + * @function verify + * @memberof atomic.AttestationTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttestationTarget.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.intentId != null && $Object.hasOwnProperty.call(message, "intentId")) { + properties.kind = 1; + if (!$util.isString(message.intentId)) + return "intentId: string expected"; + } + if (message.memoryId != null && $Object.hasOwnProperty.call(message, "memoryId")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.memoryId)) + return "memoryId: string expected"; + } + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.atomic.Hash.verify(message.changeHash, _depth + 1); + if (error) + return "changeHash." + error; + } + } + if (message.graphStats != null && $Object.hasOwnProperty.call(message, "graphStats")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.atomic.GraphStatsRef.verify(message.graphStats, _depth + 1); + if (error) + return "graphStats." + error; + } + } + return null; + }; + + /** + * Creates an AttestationTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.AttestationTarget + * @static + * @param {Object.} object Plain object + * @returns {atomic.AttestationTarget} AttestationTarget + */ + AttestationTarget.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.AttestationTarget) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.AttestationTarget: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.AttestationTarget(); + if (object.intentId != null) + message.intentId = $String(object.intentId); + if (object.memoryId != null) + message.memoryId = $String(object.memoryId); + if (object.changeHash != null) { + if (!$util.isObject(object.changeHash)) + throw $TypeError(".atomic.AttestationTarget.changeHash: object expected"); + message.changeHash = $root.atomic.Hash.fromObject(object.changeHash, _depth + 1); + } + if (object.graphStats != null) { + if (!$util.isObject(object.graphStats)) + throw $TypeError(".atomic.AttestationTarget.graphStats: object expected"); + message.graphStats = $root.atomic.GraphStatsRef.fromObject(object.graphStats, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from an AttestationTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.AttestationTarget + * @static + * @param {atomic.AttestationTarget} message AttestationTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttestationTarget.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (message.intentId != null && $Object.hasOwnProperty.call(message, "intentId")) { + object.intentId = message.intentId; + if (options.oneofs) + object.kind = "intentId"; + } + if (message.memoryId != null && $Object.hasOwnProperty.call(message, "memoryId")) { + object.memoryId = message.memoryId; + if (options.oneofs) + object.kind = "memoryId"; + } + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) { + object.changeHash = $root.atomic.Hash.toObject(message.changeHash, options, _depth + 1); + if (options.oneofs) + object.kind = "changeHash"; + } + if (message.graphStats != null && $Object.hasOwnProperty.call(message, "graphStats")) { + object.graphStats = $root.atomic.GraphStatsRef.toObject(message.graphStats, options, _depth + 1); + if (options.oneofs) + object.kind = "graphStats"; + } + return object; + }; + + /** + * Converts this AttestationTarget to JSON. + * @function toJSON + * @memberof atomic.AttestationTarget + * @instance + * @returns {Object.} JSON object + */ + AttestationTarget.prototype.toJSON = function() { + return AttestationTarget.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for AttestationTarget + * @function getTypeUrl + * @memberof atomic.AttestationTarget + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + AttestationTarget.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.AttestationTarget"; + }; + + return AttestationTarget; + })(); + + atomic.GraphStatsRef = (function() { + + /** + * Properties of a GraphStatsRef. + * @typedef {Object} atomic.GraphStatsRef.$Properties + * @property {string|null} [sessionId] GraphStatsRef sessionId + * @property {number|null} [turnNumber] GraphStatsRef turnNumber + * @property {atomic.Hash.$Properties|null} [changeHash] GraphStatsRef changeHash + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GraphStatsRef. + * @memberof atomic + * @interface IGraphStatsRef + * @augments atomic.GraphStatsRef.$Properties + * @deprecated Use atomic.GraphStatsRef.$Properties instead. + */ + + /** + * Shape of a GraphStatsRef. + * @typedef {atomic.GraphStatsRef.$Properties} atomic.GraphStatsRef.$Shape + */ + + /** + * Constructs a new GraphStatsRef. + * @memberof atomic + * @classdesc Represents a GraphStatsRef. + * @constructor + * @param {atomic.GraphStatsRef.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GraphStatsRef = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GraphStatsRef sessionId. + * @member {string|null|undefined} sessionId + * @memberof atomic.GraphStatsRef + * @instance + */ + GraphStatsRef.prototype.sessionId = null; + + /** + * GraphStatsRef turnNumber. + * @member {number|null|undefined} turnNumber + * @memberof atomic.GraphStatsRef + * @instance + */ + GraphStatsRef.prototype.turnNumber = null; + + /** + * GraphStatsRef changeHash. + * @member {atomic.Hash.$Properties|null|undefined} changeHash + * @memberof atomic.GraphStatsRef + * @instance + */ + GraphStatsRef.prototype.changeHash = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphStatsRef.prototype, "_session_id", { + get: $util.oneOfGetter($oneOfFields = ["sessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphStatsRef.prototype, "_turn_number", { + get: $util.oneOfGetter($oneOfFields = ["turnNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphStatsRef.prototype, "_change_hash", { + get: $util.oneOfGetter($oneOfFields = ["changeHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GraphStatsRef instance using the specified properties. + * @function create + * @memberof atomic.GraphStatsRef + * @static + * @param {atomic.GraphStatsRef.$Properties=} [properties] Properties to set + * @returns {atomic.GraphStatsRef} GraphStatsRef instance + * @type {{ + * (properties: atomic.GraphStatsRef.$Shape): atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape; + * (properties?: atomic.GraphStatsRef.$Properties): atomic.GraphStatsRef; + * }} + */ + GraphStatsRef.create = function(properties) { + return new GraphStatsRef(properties); + }; + + /** + * Encodes the specified GraphStatsRef message. Does not implicitly {@link atomic.GraphStatsRef.verify|verify} messages. + * @function encode + * @memberof atomic.GraphStatsRef + * @static + * @param {atomic.GraphStatsRef.$Properties} message GraphStatsRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GraphStatsRef.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sessionId); + if (message.turnNumber != null && $Object.hasOwnProperty.call(message, "turnNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.turnNumber); + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) + $root.atomic.Hash.encode(message.changeHash, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GraphStatsRef message, length delimited. Does not implicitly {@link atomic.GraphStatsRef.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GraphStatsRef + * @static + * @param {atomic.GraphStatsRef.$Properties} message GraphStatsRef message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GraphStatsRef.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GraphStatsRef message from the specified reader or buffer. + * @function decode + * @memberof atomic.GraphStatsRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape} GraphStatsRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GraphStatsRef.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GraphStatsRef(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.sessionId = reader.stringVerify(); + message._session_id = "sessionId"; + continue; + } + case 2: { + if (wireType !== 0) + break; + message.turnNumber = reader.uint32(); + message._turn_number = "turnNumber"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.changeHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.changeHash); + message._change_hash = "changeHash"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GraphStatsRef message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GraphStatsRef + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape} GraphStatsRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GraphStatsRef.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GraphStatsRef message. + * @function verify + * @memberof atomic.GraphStatsRef + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GraphStatsRef.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) { + properties._session_id = 1; + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + } + if (message.turnNumber != null && $Object.hasOwnProperty.call(message, "turnNumber")) { + properties._turn_number = 1; + if (!$util.isInteger(message.turnNumber)) + return "turnNumber: integer expected"; + } + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) { + properties._change_hash = 1; + { + var error = $root.atomic.Hash.verify(message.changeHash, _depth + 1); + if (error) + return "changeHash." + error; + } + } + return null; + }; + + /** + * Creates a GraphStatsRef message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GraphStatsRef + * @static + * @param {Object.} object Plain object + * @returns {atomic.GraphStatsRef} GraphStatsRef + */ + GraphStatsRef.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GraphStatsRef) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GraphStatsRef: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GraphStatsRef(); + if (object.sessionId != null) + message.sessionId = $String(object.sessionId); + if (object.turnNumber != null) + message.turnNumber = object.turnNumber >>> 0; + if (object.changeHash != null) { + if (!$util.isObject(object.changeHash)) + throw $TypeError(".atomic.GraphStatsRef.changeHash: object expected"); + message.changeHash = $root.atomic.Hash.fromObject(object.changeHash, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a GraphStatsRef message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GraphStatsRef + * @static + * @param {atomic.GraphStatsRef} message GraphStatsRef + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GraphStatsRef.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (message.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) + object.sessionId = message.sessionId; + if (message.turnNumber != null && $Object.hasOwnProperty.call(message, "turnNumber")) + object.turnNumber = message.turnNumber; + if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) + object.changeHash = $root.atomic.Hash.toObject(message.changeHash, options, _depth + 1); + return object; + }; + + /** + * Converts this GraphStatsRef to JSON. + * @function toJSON + * @memberof atomic.GraphStatsRef + * @instance + * @returns {Object.} JSON object + */ + GraphStatsRef.prototype.toJSON = function() { + return GraphStatsRef.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GraphStatsRef + * @function getTypeUrl + * @memberof atomic.GraphStatsRef + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GraphStatsRef.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GraphStatsRef"; + }; + + return GraphStatsRef; + })(); + + atomic.VerifyAttestationResponse = (function() { + + /** + * Properties of a VerifyAttestationResponse. + * @typedef {Object} atomic.VerifyAttestationResponse.$Properties + * @property {boolean|null} [valid] VerifyAttestationResponse valid + * @property {string|null} [reason] VerifyAttestationResponse reason + * @property {boolean|null} [signatureValid] VerifyAttestationResponse signatureValid + * @property {boolean|null} [sourceFresh] VerifyAttestationResponse sourceFresh + * @property {string|null} [signedDocument] VerifyAttestationResponse signedDocument + * @property {string|null} [signerDid] VerifyAttestationResponse signerDid + * @property {string|null} [currentSourceHash] VerifyAttestationResponse currentSourceHash + * @property {string|null} [signedSourceHash] VerifyAttestationResponse signedSourceHash + * @property {atomic.Hash.$Properties|null} [signedRevision] VerifyAttestationResponse signedRevision + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a VerifyAttestationResponse. + * @memberof atomic + * @interface IVerifyAttestationResponse + * @augments atomic.VerifyAttestationResponse.$Properties + * @deprecated Use atomic.VerifyAttestationResponse.$Properties instead. + */ + + /** + * Shape of a VerifyAttestationResponse. + * @typedef {atomic.VerifyAttestationResponse.$Properties} atomic.VerifyAttestationResponse.$Shape + */ + + /** + * Constructs a new VerifyAttestationResponse. + * @memberof atomic + * @classdesc Represents a VerifyAttestationResponse. + * @constructor + * @param {atomic.VerifyAttestationResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var VerifyAttestationResponse = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * VerifyAttestationResponse valid. + * @member {boolean} valid + * @memberof atomic.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.valid = false; + + /** + * VerifyAttestationResponse reason. + * @member {string|null|undefined} reason + * @memberof atomic.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.reason = null; + + /** + * VerifyAttestationResponse signatureValid. + * @member {boolean|null|undefined} signatureValid + * @memberof atomic.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.signatureValid = null; + + /** + * VerifyAttestationResponse sourceFresh. + * @member {boolean|null|undefined} sourceFresh + * @memberof atomic.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.sourceFresh = null; + + /** + * VerifyAttestationResponse signedDocument. + * @member {string|null|undefined} signedDocument + * @memberof atomic.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.signedDocument = null; + + /** + * VerifyAttestationResponse signerDid. + * @member {string|null|undefined} signerDid + * @memberof atomic.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.signerDid = null; + + /** + * VerifyAttestationResponse currentSourceHash. + * @member {string|null|undefined} currentSourceHash + * @memberof atomic.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.currentSourceHash = null; + + /** + * VerifyAttestationResponse signedSourceHash. + * @member {string|null|undefined} signedSourceHash + * @memberof atomic.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.signedSourceHash = null; + + /** + * VerifyAttestationResponse signedRevision. + * @member {atomic.Hash.$Properties|null|undefined} signedRevision + * @memberof atomic.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.signedRevision = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationResponse.prototype, "_reason", { + get: $util.oneOfGetter($oneOfFields = ["reason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationResponse.prototype, "_signature_valid", { + get: $util.oneOfGetter($oneOfFields = ["signatureValid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationResponse.prototype, "_source_fresh", { + get: $util.oneOfGetter($oneOfFields = ["sourceFresh"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationResponse.prototype, "_signed_document", { + get: $util.oneOfGetter($oneOfFields = ["signedDocument"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationResponse.prototype, "_signer_did", { + get: $util.oneOfGetter($oneOfFields = ["signerDid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationResponse.prototype, "_current_source_hash", { + get: $util.oneOfGetter($oneOfFields = ["currentSourceHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationResponse.prototype, "_signed_source_hash", { + get: $util.oneOfGetter($oneOfFields = ["signedSourceHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(VerifyAttestationResponse.prototype, "_signed_revision", { + get: $util.oneOfGetter($oneOfFields = ["signedRevision"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VerifyAttestationResponse instance using the specified properties. + * @function create + * @memberof atomic.VerifyAttestationResponse + * @static + * @param {atomic.VerifyAttestationResponse.$Properties=} [properties] Properties to set + * @returns {atomic.VerifyAttestationResponse} VerifyAttestationResponse instance + * @type {{ + * (properties: atomic.VerifyAttestationResponse.$Shape): atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape; + * (properties?: atomic.VerifyAttestationResponse.$Properties): atomic.VerifyAttestationResponse; + * }} + */ + VerifyAttestationResponse.create = function(properties) { + return new VerifyAttestationResponse(properties); + }; + + /** + * Encodes the specified VerifyAttestationResponse message. Does not implicitly {@link atomic.VerifyAttestationResponse.verify|verify} messages. + * @function encode + * @memberof atomic.VerifyAttestationResponse + * @static + * @param {atomic.VerifyAttestationResponse.$Properties} message VerifyAttestationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.valid != null && $Object.hasOwnProperty.call(message, "valid") && message.valid !== false) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.valid); + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); + if (message.signatureValid != null && $Object.hasOwnProperty.call(message, "signatureValid")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.signatureValid); + if (message.sourceFresh != null && $Object.hasOwnProperty.call(message, "sourceFresh")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.sourceFresh); + if (message.signedDocument != null && $Object.hasOwnProperty.call(message, "signedDocument")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signedDocument); + if (message.signerDid != null && $Object.hasOwnProperty.call(message, "signerDid")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.signerDid); + if (message.currentSourceHash != null && $Object.hasOwnProperty.call(message, "currentSourceHash")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.currentSourceHash); + if (message.signedSourceHash != null && $Object.hasOwnProperty.call(message, "signedSourceHash")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.signedSourceHash); + if (message.signedRevision != null && $Object.hasOwnProperty.call(message, "signedRevision")) + $root.atomic.Hash.encode(message.signedRevision, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified VerifyAttestationResponse message, length delimited. Does not implicitly {@link atomic.VerifyAttestationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.VerifyAttestationResponse + * @static + * @param {atomic.VerifyAttestationResponse.$Properties} message VerifyAttestationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.VerifyAttestationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape} VerifyAttestationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.VerifyAttestationResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.valid = value; + else + delete message.valid; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.reason = reader.stringVerify(); + message._reason = "reason"; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.signatureValid = reader.bool(); + message._signature_valid = "signatureValid"; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.sourceFresh = reader.bool(); + message._source_fresh = "sourceFresh"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.signedDocument = reader.stringVerify(); + message._signed_document = "signedDocument"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.signerDid = reader.stringVerify(); + message._signer_did = "signerDid"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.currentSourceHash = reader.stringVerify(); + message._current_source_hash = "currentSourceHash"; + continue; + } + case 8: { + if (wireType !== 2) + break; + message.signedSourceHash = reader.stringVerify(); + message._signed_source_hash = "signedSourceHash"; + continue; + } + case 9: { + if (wireType !== 2) + break; + message.signedRevision = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.signedRevision); + message._signed_revision = "signedRevision"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.VerifyAttestationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape} VerifyAttestationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a VerifyAttestationResponse message. + * @function verify + * @memberof atomic.VerifyAttestationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyAttestationResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.valid != null && $Object.hasOwnProperty.call(message, "valid")) + if (typeof message.valid !== "boolean") + return "valid: boolean expected"; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) { + properties._reason = 1; + if (!$util.isString(message.reason)) + return "reason: string expected"; + } + if (message.signatureValid != null && $Object.hasOwnProperty.call(message, "signatureValid")) { + properties._signature_valid = 1; + if (typeof message.signatureValid !== "boolean") + return "signatureValid: boolean expected"; + } + if (message.sourceFresh != null && $Object.hasOwnProperty.call(message, "sourceFresh")) { + properties._source_fresh = 1; + if (typeof message.sourceFresh !== "boolean") + return "sourceFresh: boolean expected"; + } + if (message.signedDocument != null && $Object.hasOwnProperty.call(message, "signedDocument")) { + properties._signed_document = 1; + if (!$util.isString(message.signedDocument)) + return "signedDocument: string expected"; + } + if (message.signerDid != null && $Object.hasOwnProperty.call(message, "signerDid")) { + properties._signer_did = 1; + if (!$util.isString(message.signerDid)) + return "signerDid: string expected"; + } + if (message.currentSourceHash != null && $Object.hasOwnProperty.call(message, "currentSourceHash")) { + properties._current_source_hash = 1; + if (!$util.isString(message.currentSourceHash)) + return "currentSourceHash: string expected"; + } + if (message.signedSourceHash != null && $Object.hasOwnProperty.call(message, "signedSourceHash")) { + properties._signed_source_hash = 1; + if (!$util.isString(message.signedSourceHash)) + return "signedSourceHash: string expected"; + } + if (message.signedRevision != null && $Object.hasOwnProperty.call(message, "signedRevision")) { + properties._signed_revision = 1; + { + var error = $root.atomic.Hash.verify(message.signedRevision, _depth + 1); + if (error) + return "signedRevision." + error; + } + } + return null; + }; + + /** + * Creates a VerifyAttestationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.VerifyAttestationResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.VerifyAttestationResponse} VerifyAttestationResponse + */ + VerifyAttestationResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.VerifyAttestationResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.VerifyAttestationResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.VerifyAttestationResponse(); + if (object.valid != null) + if (object.valid) + message.valid = $Boolean(object.valid); + if (object.reason != null) + message.reason = $String(object.reason); + if (object.signatureValid != null) + message.signatureValid = $Boolean(object.signatureValid); + if (object.sourceFresh != null) + message.sourceFresh = $Boolean(object.sourceFresh); + if (object.signedDocument != null) + message.signedDocument = $String(object.signedDocument); + if (object.signerDid != null) + message.signerDid = $String(object.signerDid); + if (object.currentSourceHash != null) + message.currentSourceHash = $String(object.currentSourceHash); + if (object.signedSourceHash != null) + message.signedSourceHash = $String(object.signedSourceHash); + if (object.signedRevision != null) { + if (!$util.isObject(object.signedRevision)) + throw $TypeError(".atomic.VerifyAttestationResponse.signedRevision: object expected"); + message.signedRevision = $root.atomic.Hash.fromObject(object.signedRevision, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a VerifyAttestationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.VerifyAttestationResponse + * @static + * @param {atomic.VerifyAttestationResponse} message VerifyAttestationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyAttestationResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.valid = false; + if (message.valid != null && $Object.hasOwnProperty.call(message, "valid")) + object.valid = message.valid; + if (message.reason != null && $Object.hasOwnProperty.call(message, "reason")) + object.reason = message.reason; + if (message.signatureValid != null && $Object.hasOwnProperty.call(message, "signatureValid")) + object.signatureValid = message.signatureValid; + if (message.sourceFresh != null && $Object.hasOwnProperty.call(message, "sourceFresh")) + object.sourceFresh = message.sourceFresh; + if (message.signedDocument != null && $Object.hasOwnProperty.call(message, "signedDocument")) + object.signedDocument = message.signedDocument; + if (message.signerDid != null && $Object.hasOwnProperty.call(message, "signerDid")) + object.signerDid = message.signerDid; + if (message.currentSourceHash != null && $Object.hasOwnProperty.call(message, "currentSourceHash")) + object.currentSourceHash = message.currentSourceHash; + if (message.signedSourceHash != null && $Object.hasOwnProperty.call(message, "signedSourceHash")) + object.signedSourceHash = message.signedSourceHash; + if (message.signedRevision != null && $Object.hasOwnProperty.call(message, "signedRevision")) + object.signedRevision = $root.atomic.Hash.toObject(message.signedRevision, options, _depth + 1); + return object; + }; + + /** + * Converts this VerifyAttestationResponse to JSON. + * @function toJSON + * @memberof atomic.VerifyAttestationResponse + * @instance + * @returns {Object.} JSON object + */ + VerifyAttestationResponse.prototype.toJSON = function() { + return VerifyAttestationResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for VerifyAttestationResponse + * @function getTypeUrl + * @memberof atomic.VerifyAttestationResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + VerifyAttestationResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.VerifyAttestationResponse"; + }; + + return VerifyAttestationResponse; + })(); + + atomic.QueryGraphRequest = (function() { + + /** + * Properties of a QueryGraphRequest. + * @typedef {Object} atomic.QueryGraphRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] QueryGraphRequest repository + * @property {number|null} [limit] QueryGraphRequest limit + * @property {atomic.ContentSearchQuery.$Properties|null} [contentSearch] QueryGraphRequest contentSearch + * @property {atomic.KgSearchQuery.$Properties|null} [kgSearch] QueryGraphRequest kgSearch + * @property {atomic.EntityQuery.$Properties|null} [entity] QueryGraphRequest entity + * @property {atomic.NeighborsQuery.$Properties|null} [neighbors] QueryGraphRequest neighbors + * @property {atomic.CallersQuery.$Properties|null} [callers] QueryGraphRequest callers + * @property {atomic.GraphSliceQuery.$Properties|null} [graphSlice] QueryGraphRequest graphSlice + * @property {atomic.PlanExecutionQuery.$Properties|null} [plan] QueryGraphRequest plan + * @property {atomic.RagAskQuery.$Properties|null} [ragAsk] QueryGraphRequest ragAsk + * @property {atomic.ViewRef.$Properties|null} [view] QueryGraphRequest view + * @property {"contentSearch"|"kgSearch"|"entity"|"neighbors"|"callers"|"graphSlice"|"plan"|"ragAsk"} [query] QueryGraphRequest query + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a QueryGraphRequest. + * @memberof atomic + * @interface IQueryGraphRequest + * @augments atomic.QueryGraphRequest.$Properties + * @deprecated Use atomic.QueryGraphRequest.$Properties instead. + */ + + /** + * Narrowed shape of a QueryGraphRequest. + * @typedef {{ + * repository?: atomic.RepositoryRef.$Shape|null; + * limit?: number|null; + * contentSearch?: atomic.ContentSearchQuery.$Shape|null; + * kgSearch?: atomic.KgSearchQuery.$Shape|null; + * entity?: atomic.EntityQuery.$Shape|null; + * neighbors?: atomic.NeighborsQuery.$Shape|null; + * callers?: atomic.CallersQuery.$Shape|null; + * graphSlice?: atomic.GraphSliceQuery.$Shape|null; + * plan?: atomic.PlanExecutionQuery.$Shape|null; + * ragAsk?: atomic.RagAskQuery.$Shape|null; + * view?: atomic.ViewRef.$Shape|null; + * $unknowns?: Array.; + * } & ( + * ({ query?: undefined; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "contentSearch"; contentSearch: atomic.ContentSearchQuery.$Shape; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "kgSearch"; contentSearch?: null; kgSearch: atomic.KgSearchQuery.$Shape; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "entity"; contentSearch?: null; kgSearch?: null; entity: atomic.EntityQuery.$Shape; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "neighbors"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors: atomic.NeighborsQuery.$Shape; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "callers"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers: atomic.CallersQuery.$Shape; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "graphSlice"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice: atomic.GraphSliceQuery.$Shape; plan?: null; ragAsk?: null }|{ query?: "plan"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan: atomic.PlanExecutionQuery.$Shape; ragAsk?: null }|{ query?: "ragAsk"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk: atomic.RagAskQuery.$Shape }) + * )} atomic.QueryGraphRequest.$Shape + */ + + /** + * Constructs a new QueryGraphRequest. + * @memberof atomic + * @classdesc Represents a QueryGraphRequest. + * @constructor + * @param {atomic.QueryGraphRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var QueryGraphRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * QueryGraphRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.repository = null; + + /** + * QueryGraphRequest limit. + * @member {number} limit + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.limit = 0; + + /** + * QueryGraphRequest contentSearch. + * @member {atomic.ContentSearchQuery.$Properties|null|undefined} contentSearch + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.contentSearch = null; + + /** + * QueryGraphRequest kgSearch. + * @member {atomic.KgSearchQuery.$Properties|null|undefined} kgSearch + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.kgSearch = null; + + /** + * QueryGraphRequest entity. + * @member {atomic.EntityQuery.$Properties|null|undefined} entity + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.entity = null; + + /** + * QueryGraphRequest neighbors. + * @member {atomic.NeighborsQuery.$Properties|null|undefined} neighbors + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.neighbors = null; + + /** + * QueryGraphRequest callers. + * @member {atomic.CallersQuery.$Properties|null|undefined} callers + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.callers = null; + + /** + * QueryGraphRequest graphSlice. + * @member {atomic.GraphSliceQuery.$Properties|null|undefined} graphSlice + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.graphSlice = null; + + /** + * QueryGraphRequest plan. + * @member {atomic.PlanExecutionQuery.$Properties|null|undefined} plan + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.plan = null; + + /** + * QueryGraphRequest ragAsk. + * @member {atomic.RagAskQuery.$Properties|null|undefined} ragAsk + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.ragAsk = null; + + /** + * QueryGraphRequest view. + * @member {atomic.ViewRef.$Properties|null|undefined} view + * @memberof atomic.QueryGraphRequest + * @instance + */ + QueryGraphRequest.prototype.view = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QueryGraphRequest query. + * @member {"contentSearch"|"kgSearch"|"entity"|"neighbors"|"callers"|"graphSlice"|"plan"|"ragAsk"|undefined} query + * @memberof atomic.QueryGraphRequest + * @instance + */ + $Object.defineProperty(QueryGraphRequest.prototype, "query", { + get: $util.oneOfGetter($oneOfFields = ["contentSearch", "kgSearch", "entity", "neighbors", "callers", "graphSlice", "plan", "ragAsk"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryGraphRequest instance using the specified properties. + * @function create + * @memberof atomic.QueryGraphRequest + * @static + * @param {atomic.QueryGraphRequest.$Properties=} [properties] Properties to set + * @returns {atomic.QueryGraphRequest} QueryGraphRequest instance + * @type {{ + * (properties: atomic.QueryGraphRequest.$Shape): atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape; + * (properties?: atomic.QueryGraphRequest.$Properties): atomic.QueryGraphRequest; + * }} + */ + QueryGraphRequest.create = function(properties) { + return new QueryGraphRequest(properties); + }; + + /** + * Encodes the specified QueryGraphRequest message. Does not implicitly {@link atomic.QueryGraphRequest.verify|verify} messages. + * @function encode + * @memberof atomic.QueryGraphRequest + * @static + * @param {atomic.QueryGraphRequest.$Properties} message QueryGraphRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryGraphRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.limit != null && $Object.hasOwnProperty.call(message, "limit") && message.limit !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.limit); + if (message.contentSearch != null && $Object.hasOwnProperty.call(message, "contentSearch")) + $root.atomic.ContentSearchQuery.encode(message.contentSearch, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.kgSearch != null && $Object.hasOwnProperty.call(message, "kgSearch")) + $root.atomic.KgSearchQuery.encode(message.kgSearch, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.entity != null && $Object.hasOwnProperty.call(message, "entity")) + $root.atomic.EntityQuery.encode(message.entity, writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.neighbors != null && $Object.hasOwnProperty.call(message, "neighbors")) + $root.atomic.NeighborsQuery.encode(message.neighbors, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.callers != null && $Object.hasOwnProperty.call(message, "callers")) + $root.atomic.CallersQuery.encode(message.callers, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.graphSlice != null && $Object.hasOwnProperty.call(message, "graphSlice")) + $root.atomic.GraphSliceQuery.encode(message.graphSlice, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.plan != null && $Object.hasOwnProperty.call(message, "plan")) + $root.atomic.PlanExecutionQuery.encode(message.plan, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.ragAsk != null && $Object.hasOwnProperty.call(message, "ragAsk")) + $root.atomic.RagAskQuery.encode(message.ragAsk, writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + $root.atomic.ViewRef.encode(message.view, writer.uint32(/* id 11, wireType 2 =*/90).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified QueryGraphRequest message, length delimited. Does not implicitly {@link atomic.QueryGraphRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.QueryGraphRequest + * @static + * @param {atomic.QueryGraphRequest.$Properties} message QueryGraphRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryGraphRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a QueryGraphRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.QueryGraphRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape} QueryGraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryGraphRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.QueryGraphRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.limit = value; + else + delete message.limit; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.contentSearch = $root.atomic.ContentSearchQuery.decode(reader, reader.size(), $undefined, _depth + 1, message.contentSearch); + message.query = "contentSearch"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.kgSearch = $root.atomic.KgSearchQuery.decode(reader, reader.size(), $undefined, _depth + 1, message.kgSearch); + message.query = "kgSearch"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.entity = $root.atomic.EntityQuery.decode(reader, reader.size(), $undefined, _depth + 1, message.entity); + message.query = "entity"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.neighbors = $root.atomic.NeighborsQuery.decode(reader, reader.size(), $undefined, _depth + 1, message.neighbors); + message.query = "neighbors"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.callers = $root.atomic.CallersQuery.decode(reader, reader.size(), $undefined, _depth + 1, message.callers); + message.query = "callers"; + continue; + } + case 8: { + if (wireType !== 2) + break; + message.graphSlice = $root.atomic.GraphSliceQuery.decode(reader, reader.size(), $undefined, _depth + 1, message.graphSlice); + message.query = "graphSlice"; + continue; + } + case 9: { + if (wireType !== 2) + break; + message.plan = $root.atomic.PlanExecutionQuery.decode(reader, reader.size(), $undefined, _depth + 1, message.plan); + message.query = "plan"; + continue; + } + case 10: { + if (wireType !== 2) + break; + message.ragAsk = $root.atomic.RagAskQuery.decode(reader, reader.size(), $undefined, _depth + 1, message.ragAsk); + message.query = "ragAsk"; + continue; + } + case 11: { + if (wireType !== 2) + break; + message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a QueryGraphRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.QueryGraphRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape} QueryGraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryGraphRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a QueryGraphRequest message. + * @function verify + * @memberof atomic.QueryGraphRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryGraphRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.limit != null && $Object.hasOwnProperty.call(message, "limit")) + if (!$util.isInteger(message.limit)) + return "limit: integer expected"; + if (message.contentSearch != null && $Object.hasOwnProperty.call(message, "contentSearch")) { + properties.query = 1; + { + var error = $root.atomic.ContentSearchQuery.verify(message.contentSearch, _depth + 1); + if (error) + return "contentSearch." + error; + } + } + if (message.kgSearch != null && $Object.hasOwnProperty.call(message, "kgSearch")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + { + var error = $root.atomic.KgSearchQuery.verify(message.kgSearch, _depth + 1); + if (error) + return "kgSearch." + error; + } + } + if (message.entity != null && $Object.hasOwnProperty.call(message, "entity")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + { + var error = $root.atomic.EntityQuery.verify(message.entity, _depth + 1); + if (error) + return "entity." + error; + } + } + if (message.neighbors != null && $Object.hasOwnProperty.call(message, "neighbors")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + { + var error = $root.atomic.NeighborsQuery.verify(message.neighbors, _depth + 1); + if (error) + return "neighbors." + error; + } + } + if (message.callers != null && $Object.hasOwnProperty.call(message, "callers")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + { + var error = $root.atomic.CallersQuery.verify(message.callers, _depth + 1); + if (error) + return "callers." + error; + } + } + if (message.graphSlice != null && $Object.hasOwnProperty.call(message, "graphSlice")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + { + var error = $root.atomic.GraphSliceQuery.verify(message.graphSlice, _depth + 1); + if (error) + return "graphSlice." + error; + } + } + if (message.plan != null && $Object.hasOwnProperty.call(message, "plan")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + { + var error = $root.atomic.PlanExecutionQuery.verify(message.plan, _depth + 1); + if (error) + return "plan." + error; + } + } + if (message.ragAsk != null && $Object.hasOwnProperty.call(message, "ragAsk")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + { + var error = $root.atomic.RagAskQuery.verify(message.ragAsk, _depth + 1); + if (error) + return "ragAsk." + error; + } + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) { + var error = $root.atomic.ViewRef.verify(message.view, _depth + 1); + if (error) + return "view." + error; + } + return null; + }; + + /** + * Creates a QueryGraphRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.QueryGraphRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.QueryGraphRequest} QueryGraphRequest + */ + QueryGraphRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.QueryGraphRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.QueryGraphRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.QueryGraphRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.QueryGraphRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.limit != null) + if ($Number(object.limit) !== 0) + message.limit = object.limit >>> 0; + if (object.contentSearch != null) { + if (!$util.isObject(object.contentSearch)) + throw $TypeError(".atomic.QueryGraphRequest.contentSearch: object expected"); + message.contentSearch = $root.atomic.ContentSearchQuery.fromObject(object.contentSearch, _depth + 1); + } + if (object.kgSearch != null) { + if (!$util.isObject(object.kgSearch)) + throw $TypeError(".atomic.QueryGraphRequest.kgSearch: object expected"); + message.kgSearch = $root.atomic.KgSearchQuery.fromObject(object.kgSearch, _depth + 1); + } + if (object.entity != null) { + if (!$util.isObject(object.entity)) + throw $TypeError(".atomic.QueryGraphRequest.entity: object expected"); + message.entity = $root.atomic.EntityQuery.fromObject(object.entity, _depth + 1); + } + if (object.neighbors != null) { + if (!$util.isObject(object.neighbors)) + throw $TypeError(".atomic.QueryGraphRequest.neighbors: object expected"); + message.neighbors = $root.atomic.NeighborsQuery.fromObject(object.neighbors, _depth + 1); + } + if (object.callers != null) { + if (!$util.isObject(object.callers)) + throw $TypeError(".atomic.QueryGraphRequest.callers: object expected"); + message.callers = $root.atomic.CallersQuery.fromObject(object.callers, _depth + 1); + } + if (object.graphSlice != null) { + if (!$util.isObject(object.graphSlice)) + throw $TypeError(".atomic.QueryGraphRequest.graphSlice: object expected"); + message.graphSlice = $root.atomic.GraphSliceQuery.fromObject(object.graphSlice, _depth + 1); + } + if (object.plan != null) { + if (!$util.isObject(object.plan)) + throw $TypeError(".atomic.QueryGraphRequest.plan: object expected"); + message.plan = $root.atomic.PlanExecutionQuery.fromObject(object.plan, _depth + 1); + } + if (object.ragAsk != null) { + if (!$util.isObject(object.ragAsk)) + throw $TypeError(".atomic.QueryGraphRequest.ragAsk: object expected"); + message.ragAsk = $root.atomic.RagAskQuery.fromObject(object.ragAsk, _depth + 1); + } + if (object.view != null) { + if (!$util.isObject(object.view)) + throw $TypeError(".atomic.QueryGraphRequest.view: object expected"); + message.view = $root.atomic.ViewRef.fromObject(object.view, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a QueryGraphRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.QueryGraphRequest + * @static + * @param {atomic.QueryGraphRequest} message QueryGraphRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryGraphRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.repository = null; + object.limit = 0; + object.view = null; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.limit != null && $Object.hasOwnProperty.call(message, "limit")) + object.limit = message.limit; + if (message.contentSearch != null && $Object.hasOwnProperty.call(message, "contentSearch")) { + object.contentSearch = $root.atomic.ContentSearchQuery.toObject(message.contentSearch, options, _depth + 1); + if (options.oneofs) + object.query = "contentSearch"; + } + if (message.kgSearch != null && $Object.hasOwnProperty.call(message, "kgSearch")) { + object.kgSearch = $root.atomic.KgSearchQuery.toObject(message.kgSearch, options, _depth + 1); + if (options.oneofs) + object.query = "kgSearch"; + } + if (message.entity != null && $Object.hasOwnProperty.call(message, "entity")) { + object.entity = $root.atomic.EntityQuery.toObject(message.entity, options, _depth + 1); + if (options.oneofs) + object.query = "entity"; + } + if (message.neighbors != null && $Object.hasOwnProperty.call(message, "neighbors")) { + object.neighbors = $root.atomic.NeighborsQuery.toObject(message.neighbors, options, _depth + 1); + if (options.oneofs) + object.query = "neighbors"; + } + if (message.callers != null && $Object.hasOwnProperty.call(message, "callers")) { + object.callers = $root.atomic.CallersQuery.toObject(message.callers, options, _depth + 1); + if (options.oneofs) + object.query = "callers"; + } + if (message.graphSlice != null && $Object.hasOwnProperty.call(message, "graphSlice")) { + object.graphSlice = $root.atomic.GraphSliceQuery.toObject(message.graphSlice, options, _depth + 1); + if (options.oneofs) + object.query = "graphSlice"; + } + if (message.plan != null && $Object.hasOwnProperty.call(message, "plan")) { + object.plan = $root.atomic.PlanExecutionQuery.toObject(message.plan, options, _depth + 1); + if (options.oneofs) + object.query = "plan"; + } + if (message.ragAsk != null && $Object.hasOwnProperty.call(message, "ragAsk")) { + object.ragAsk = $root.atomic.RagAskQuery.toObject(message.ragAsk, options, _depth + 1); + if (options.oneofs) + object.query = "ragAsk"; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = $root.atomic.ViewRef.toObject(message.view, options, _depth + 1); + return object; + }; + + /** + * Converts this QueryGraphRequest to JSON. + * @function toJSON + * @memberof atomic.QueryGraphRequest + * @instance + * @returns {Object.} JSON object + */ + QueryGraphRequest.prototype.toJSON = function() { + return QueryGraphRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for QueryGraphRequest + * @function getTypeUrl + * @memberof atomic.QueryGraphRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + QueryGraphRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.QueryGraphRequest"; + }; + + return QueryGraphRequest; + })(); + + atomic.ContentSearchQuery = (function() { + + /** + * Properties of a ContentSearchQuery. + * @typedef {Object} atomic.ContentSearchQuery.$Properties + * @property {string|null} [query] ContentSearchQuery query + * @property {Array.|null} [paths] ContentSearchQuery paths + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ContentSearchQuery. + * @memberof atomic + * @interface IContentSearchQuery + * @augments atomic.ContentSearchQuery.$Properties + * @deprecated Use atomic.ContentSearchQuery.$Properties instead. + */ + + /** + * Shape of a ContentSearchQuery. + * @typedef {atomic.ContentSearchQuery.$Properties} atomic.ContentSearchQuery.$Shape + */ + + /** + * Constructs a new ContentSearchQuery. + * @memberof atomic + * @classdesc Represents a ContentSearchQuery. + * @constructor + * @param {atomic.ContentSearchQuery.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ContentSearchQuery = function (properties) { + this.paths = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ContentSearchQuery query. + * @member {string} query + * @memberof atomic.ContentSearchQuery + * @instance + */ + ContentSearchQuery.prototype.query = ""; + + /** + * ContentSearchQuery paths. + * @member {Array.} paths + * @memberof atomic.ContentSearchQuery + * @instance + */ + ContentSearchQuery.prototype.paths = $util.emptyArray; + + /** + * Creates a new ContentSearchQuery instance using the specified properties. + * @function create + * @memberof atomic.ContentSearchQuery + * @static + * @param {atomic.ContentSearchQuery.$Properties=} [properties] Properties to set + * @returns {atomic.ContentSearchQuery} ContentSearchQuery instance + * @type {{ + * (properties: atomic.ContentSearchQuery.$Shape): atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape; + * (properties?: atomic.ContentSearchQuery.$Properties): atomic.ContentSearchQuery; + * }} + */ + ContentSearchQuery.create = function(properties) { + return new ContentSearchQuery(properties); + }; + + /** + * Encodes the specified ContentSearchQuery message. Does not implicitly {@link atomic.ContentSearchQuery.verify|verify} messages. + * @function encode + * @memberof atomic.ContentSearchQuery + * @static + * @param {atomic.ContentSearchQuery.$Properties} message ContentSearchQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentSearchQuery.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.query != null && $Object.hasOwnProperty.call(message, "query") && message.query !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paths[i]); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ContentSearchQuery message, length delimited. Does not implicitly {@link atomic.ContentSearchQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ContentSearchQuery + * @static + * @param {atomic.ContentSearchQuery.$Properties} message ContentSearchQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentSearchQuery.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ContentSearchQuery message from the specified reader or buffer. + * @function decode + * @memberof atomic.ContentSearchQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape} ContentSearchQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentSearchQuery.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ContentSearchQuery(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.query = value; + else + delete message.query; + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.stringVerify()); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ContentSearchQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ContentSearchQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape} ContentSearchQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentSearchQuery.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ContentSearchQuery message. + * @function verify + * @memberof atomic.ContentSearchQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentSearchQuery.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.query != null && $Object.hasOwnProperty.call(message, "query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.paths != null && $Object.hasOwnProperty.call(message, "paths")) { + if (!$Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a ContentSearchQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ContentSearchQuery + * @static + * @param {Object.} object Plain object + * @returns {atomic.ContentSearchQuery} ContentSearchQuery + */ + ContentSearchQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ContentSearchQuery) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ContentSearchQuery: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ContentSearchQuery(); + if (object.query != null) + if (typeof object.query !== "string" || object.query.length) + message.query = $String(object.query); + if (object.paths) { + if (!$Array.isArray(object.paths)) + throw $TypeError(".atomic.ContentSearchQuery.paths: array expected"); + message.paths = $Array(object.paths.length); + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = $String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a ContentSearchQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ContentSearchQuery + * @static + * @param {atomic.ContentSearchQuery} message ContentSearchQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentSearchQuery.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) + object.query = ""; + if (message.query != null && $Object.hasOwnProperty.call(message, "query")) + object.query = message.query; + if (message.paths && message.paths.length) { + object.paths = $Array(message.paths.length); + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this ContentSearchQuery to JSON. + * @function toJSON + * @memberof atomic.ContentSearchQuery + * @instance + * @returns {Object.} JSON object + */ + ContentSearchQuery.prototype.toJSON = function() { + return ContentSearchQuery.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ContentSearchQuery + * @function getTypeUrl + * @memberof atomic.ContentSearchQuery + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ContentSearchQuery.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ContentSearchQuery"; + }; + + return ContentSearchQuery; + })(); + + atomic.KgSearchQuery = (function() { + + /** + * Properties of a KgSearchQuery. + * @typedef {Object} atomic.KgSearchQuery.$Properties + * @property {string|null} [query] KgSearchQuery query + * @property {string|null} [kind] KgSearchQuery kind + * @property {number|null} [pool] KgSearchQuery pool + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a KgSearchQuery. + * @memberof atomic + * @interface IKgSearchQuery + * @augments atomic.KgSearchQuery.$Properties + * @deprecated Use atomic.KgSearchQuery.$Properties instead. + */ + + /** + * Shape of a KgSearchQuery. + * @typedef {atomic.KgSearchQuery.$Properties} atomic.KgSearchQuery.$Shape + */ + + /** + * Constructs a new KgSearchQuery. + * @memberof atomic + * @classdesc Represents a KgSearchQuery. + * @constructor + * @param {atomic.KgSearchQuery.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var KgSearchQuery = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * KgSearchQuery query. + * @member {string} query + * @memberof atomic.KgSearchQuery + * @instance + */ + KgSearchQuery.prototype.query = ""; + + /** + * KgSearchQuery kind. + * @member {string|null|undefined} kind + * @memberof atomic.KgSearchQuery + * @instance + */ + KgSearchQuery.prototype.kind = null; + + /** + * KgSearchQuery pool. + * @member {number|null|undefined} pool + * @memberof atomic.KgSearchQuery + * @instance + */ + KgSearchQuery.prototype.pool = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(KgSearchQuery.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(KgSearchQuery.prototype, "_pool", { + get: $util.oneOfGetter($oneOfFields = ["pool"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new KgSearchQuery instance using the specified properties. + * @function create + * @memberof atomic.KgSearchQuery + * @static + * @param {atomic.KgSearchQuery.$Properties=} [properties] Properties to set + * @returns {atomic.KgSearchQuery} KgSearchQuery instance + * @type {{ + * (properties: atomic.KgSearchQuery.$Shape): atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape; + * (properties?: atomic.KgSearchQuery.$Properties): atomic.KgSearchQuery; + * }} + */ + KgSearchQuery.create = function(properties) { + return new KgSearchQuery(properties); + }; + + /** + * Encodes the specified KgSearchQuery message. Does not implicitly {@link atomic.KgSearchQuery.verify|verify} messages. + * @function encode + * @memberof atomic.KgSearchQuery + * @static + * @param {atomic.KgSearchQuery.$Properties} message KgSearchQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KgSearchQuery.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.query != null && $Object.hasOwnProperty.call(message, "query") && message.query !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); + if (message.pool != null && $Object.hasOwnProperty.call(message, "pool")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.pool); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified KgSearchQuery message, length delimited. Does not implicitly {@link atomic.KgSearchQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.KgSearchQuery + * @static + * @param {atomic.KgSearchQuery.$Properties} message KgSearchQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KgSearchQuery.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a KgSearchQuery message from the specified reader or buffer. + * @function decode + * @memberof atomic.KgSearchQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape} KgSearchQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KgSearchQuery.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.KgSearchQuery(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.query = value; + else + delete message.query; + continue; + } + case 2: { + if (wireType !== 2) + break; + message.kind = reader.stringVerify(); + message._kind = "kind"; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.pool = reader.uint32(); + message._pool = "pool"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a KgSearchQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.KgSearchQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape} KgSearchQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KgSearchQuery.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a KgSearchQuery message. + * @function verify + * @memberof atomic.KgSearchQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KgSearchQuery.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.query != null && $Object.hasOwnProperty.call(message, "query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) { + properties._kind = 1; + if (!$util.isString(message.kind)) + return "kind: string expected"; + } + if (message.pool != null && $Object.hasOwnProperty.call(message, "pool")) { + properties._pool = 1; + if (!$util.isInteger(message.pool)) + return "pool: integer expected"; + } + return null; + }; + + /** + * Creates a KgSearchQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.KgSearchQuery + * @static + * @param {Object.} object Plain object + * @returns {atomic.KgSearchQuery} KgSearchQuery + */ + KgSearchQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.KgSearchQuery) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.KgSearchQuery: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.KgSearchQuery(); + if (object.query != null) + if (typeof object.query !== "string" || object.query.length) + message.query = $String(object.query); + if (object.kind != null) + message.kind = $String(object.kind); + if (object.pool != null) + message.pool = object.pool >>> 0; + return message; + }; + + /** + * Creates a plain object from a KgSearchQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.KgSearchQuery + * @static + * @param {atomic.KgSearchQuery} message KgSearchQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KgSearchQuery.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.query = ""; + if (message.query != null && $Object.hasOwnProperty.call(message, "query")) + object.query = message.query; + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + object.kind = message.kind; + if (message.pool != null && $Object.hasOwnProperty.call(message, "pool")) + object.pool = message.pool; + return object; + }; + + /** + * Converts this KgSearchQuery to JSON. + * @function toJSON + * @memberof atomic.KgSearchQuery + * @instance + * @returns {Object.} JSON object + */ + KgSearchQuery.prototype.toJSON = function() { + return KgSearchQuery.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for KgSearchQuery + * @function getTypeUrl + * @memberof atomic.KgSearchQuery + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + KgSearchQuery.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.KgSearchQuery"; + }; + + return KgSearchQuery; + })(); + + atomic.EntityQuery = (function() { + + /** + * Properties of an EntityQuery. + * @typedef {Object} atomic.EntityQuery.$Properties + * @property {string|null} [nodeId] EntityQuery nodeId + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an EntityQuery. + * @memberof atomic + * @interface IEntityQuery + * @augments atomic.EntityQuery.$Properties + * @deprecated Use atomic.EntityQuery.$Properties instead. + */ + + /** + * Shape of an EntityQuery. + * @typedef {atomic.EntityQuery.$Properties} atomic.EntityQuery.$Shape + */ + + /** + * Constructs a new EntityQuery. + * @memberof atomic + * @classdesc Represents an EntityQuery. + * @constructor + * @param {atomic.EntityQuery.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var EntityQuery = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * EntityQuery nodeId. + * @member {string} nodeId + * @memberof atomic.EntityQuery + * @instance + */ + EntityQuery.prototype.nodeId = ""; + + /** + * Creates a new EntityQuery instance using the specified properties. + * @function create + * @memberof atomic.EntityQuery + * @static + * @param {atomic.EntityQuery.$Properties=} [properties] Properties to set + * @returns {atomic.EntityQuery} EntityQuery instance + * @type {{ + * (properties: atomic.EntityQuery.$Shape): atomic.EntityQuery & atomic.EntityQuery.$Shape; + * (properties?: atomic.EntityQuery.$Properties): atomic.EntityQuery; + * }} + */ + EntityQuery.create = function(properties) { + return new EntityQuery(properties); + }; + + /** + * Encodes the specified EntityQuery message. Does not implicitly {@link atomic.EntityQuery.verify|verify} messages. + * @function encode + * @memberof atomic.EntityQuery + * @static + * @param {atomic.EntityQuery.$Properties} message EntityQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityQuery.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId") && message.nodeId !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.nodeId); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified EntityQuery message, length delimited. Does not implicitly {@link atomic.EntityQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.EntityQuery + * @static + * @param {atomic.EntityQuery.$Properties} message EntityQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityQuery.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes an EntityQuery message from the specified reader or buffer. + * @function decode + * @memberof atomic.EntityQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.EntityQuery & atomic.EntityQuery.$Shape} EntityQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityQuery.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.EntityQuery(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.nodeId = value; + else + delete message.nodeId; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes an EntityQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.EntityQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.EntityQuery & atomic.EntityQuery.$Shape} EntityQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityQuery.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies an EntityQuery message. + * @function verify + * @memberof atomic.EntityQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityQuery.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + if (!$util.isString(message.nodeId)) + return "nodeId: string expected"; + return null; + }; + + /** + * Creates an EntityQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.EntityQuery + * @static + * @param {Object.} object Plain object + * @returns {atomic.EntityQuery} EntityQuery + */ + EntityQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.EntityQuery) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.EntityQuery: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.EntityQuery(); + if (object.nodeId != null) + if (typeof object.nodeId !== "string" || object.nodeId.length) + message.nodeId = $String(object.nodeId); + return message; + }; + + /** + * Creates a plain object from an EntityQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.EntityQuery + * @static + * @param {atomic.EntityQuery} message EntityQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityQuery.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.nodeId = ""; + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + object.nodeId = message.nodeId; + return object; + }; + + /** + * Converts this EntityQuery to JSON. + * @function toJSON + * @memberof atomic.EntityQuery + * @instance + * @returns {Object.} JSON object + */ + EntityQuery.prototype.toJSON = function() { + return EntityQuery.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for EntityQuery + * @function getTypeUrl + * @memberof atomic.EntityQuery + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + EntityQuery.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.EntityQuery"; + }; + + return EntityQuery; + })(); + + atomic.NeighborsQuery = (function() { + + /** + * Properties of a NeighborsQuery. + * @typedef {Object} atomic.NeighborsQuery.$Properties + * @property {string|null} [nodeId] NeighborsQuery nodeId + * @property {boolean|null} [incoming] NeighborsQuery incoming + * @property {number|null} [depth] NeighborsQuery depth + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a NeighborsQuery. + * @memberof atomic + * @interface INeighborsQuery + * @augments atomic.NeighborsQuery.$Properties + * @deprecated Use atomic.NeighborsQuery.$Properties instead. + */ + + /** + * Shape of a NeighborsQuery. + * @typedef {atomic.NeighborsQuery.$Properties} atomic.NeighborsQuery.$Shape + */ + + /** + * Constructs a new NeighborsQuery. + * @memberof atomic + * @classdesc Represents a NeighborsQuery. + * @constructor + * @param {atomic.NeighborsQuery.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var NeighborsQuery = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * NeighborsQuery nodeId. + * @member {string} nodeId + * @memberof atomic.NeighborsQuery + * @instance + */ + NeighborsQuery.prototype.nodeId = ""; + + /** + * NeighborsQuery incoming. + * @member {boolean|null|undefined} incoming + * @memberof atomic.NeighborsQuery + * @instance + */ + NeighborsQuery.prototype.incoming = null; + + /** + * NeighborsQuery depth. + * @member {number|null|undefined} depth + * @memberof atomic.NeighborsQuery + * @instance + */ + NeighborsQuery.prototype.depth = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(NeighborsQuery.prototype, "_incoming", { + get: $util.oneOfGetter($oneOfFields = ["incoming"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(NeighborsQuery.prototype, "_depth", { + get: $util.oneOfGetter($oneOfFields = ["depth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NeighborsQuery instance using the specified properties. + * @function create + * @memberof atomic.NeighborsQuery + * @static + * @param {atomic.NeighborsQuery.$Properties=} [properties] Properties to set + * @returns {atomic.NeighborsQuery} NeighborsQuery instance + * @type {{ + * (properties: atomic.NeighborsQuery.$Shape): atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape; + * (properties?: atomic.NeighborsQuery.$Properties): atomic.NeighborsQuery; + * }} + */ + NeighborsQuery.create = function(properties) { + return new NeighborsQuery(properties); + }; + + /** + * Encodes the specified NeighborsQuery message. Does not implicitly {@link atomic.NeighborsQuery.verify|verify} messages. + * @function encode + * @memberof atomic.NeighborsQuery + * @static + * @param {atomic.NeighborsQuery.$Properties} message NeighborsQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NeighborsQuery.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId") && message.nodeId !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.nodeId); + if (message.incoming != null && $Object.hasOwnProperty.call(message, "incoming")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.incoming); + if (message.depth != null && $Object.hasOwnProperty.call(message, "depth")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.depth); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified NeighborsQuery message, length delimited. Does not implicitly {@link atomic.NeighborsQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.NeighborsQuery + * @static + * @param {atomic.NeighborsQuery.$Properties} message NeighborsQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NeighborsQuery.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a NeighborsQuery message from the specified reader or buffer. + * @function decode + * @memberof atomic.NeighborsQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape} NeighborsQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NeighborsQuery.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.NeighborsQuery(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.nodeId = value; + else + delete message.nodeId; + continue; + } + case 2: { + if (wireType !== 0) + break; + message.incoming = reader.bool(); + message._incoming = "incoming"; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.depth = reader.uint32(); + message._depth = "depth"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a NeighborsQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.NeighborsQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape} NeighborsQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NeighborsQuery.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a NeighborsQuery message. + * @function verify + * @memberof atomic.NeighborsQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NeighborsQuery.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + if (!$util.isString(message.nodeId)) + return "nodeId: string expected"; + if (message.incoming != null && $Object.hasOwnProperty.call(message, "incoming")) { + properties._incoming = 1; + if (typeof message.incoming !== "boolean") + return "incoming: boolean expected"; + } + if (message.depth != null && $Object.hasOwnProperty.call(message, "depth")) { + properties._depth = 1; + if (!$util.isInteger(message.depth)) + return "depth: integer expected"; + } + return null; + }; + + /** + * Creates a NeighborsQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.NeighborsQuery + * @static + * @param {Object.} object Plain object + * @returns {atomic.NeighborsQuery} NeighborsQuery + */ + NeighborsQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.NeighborsQuery) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.NeighborsQuery: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.NeighborsQuery(); + if (object.nodeId != null) + if (typeof object.nodeId !== "string" || object.nodeId.length) + message.nodeId = $String(object.nodeId); + if (object.incoming != null) + message.incoming = $Boolean(object.incoming); + if (object.depth != null) + message.depth = object.depth >>> 0; + return message; + }; + + /** + * Creates a plain object from a NeighborsQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.NeighborsQuery + * @static + * @param {atomic.NeighborsQuery} message NeighborsQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NeighborsQuery.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.nodeId = ""; + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + object.nodeId = message.nodeId; + if (message.incoming != null && $Object.hasOwnProperty.call(message, "incoming")) + object.incoming = message.incoming; + if (message.depth != null && $Object.hasOwnProperty.call(message, "depth")) + object.depth = message.depth; + return object; + }; + + /** + * Converts this NeighborsQuery to JSON. + * @function toJSON + * @memberof atomic.NeighborsQuery + * @instance + * @returns {Object.} JSON object + */ + NeighborsQuery.prototype.toJSON = function() { + return NeighborsQuery.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for NeighborsQuery + * @function getTypeUrl + * @memberof atomic.NeighborsQuery + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + NeighborsQuery.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.NeighborsQuery"; + }; + + return NeighborsQuery; + })(); + + atomic.CallersQuery = (function() { + + /** + * Properties of a CallersQuery. + * @typedef {Object} atomic.CallersQuery.$Properties + * @property {string|null} [nodeId] CallersQuery nodeId + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CallersQuery. + * @memberof atomic + * @interface ICallersQuery + * @augments atomic.CallersQuery.$Properties + * @deprecated Use atomic.CallersQuery.$Properties instead. + */ + + /** + * Shape of a CallersQuery. + * @typedef {atomic.CallersQuery.$Properties} atomic.CallersQuery.$Shape + */ + + /** + * Constructs a new CallersQuery. + * @memberof atomic + * @classdesc Represents a CallersQuery. + * @constructor + * @param {atomic.CallersQuery.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var CallersQuery = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * CallersQuery nodeId. + * @member {string} nodeId + * @memberof atomic.CallersQuery + * @instance + */ + CallersQuery.prototype.nodeId = ""; + + /** + * Creates a new CallersQuery instance using the specified properties. + * @function create + * @memberof atomic.CallersQuery + * @static + * @param {atomic.CallersQuery.$Properties=} [properties] Properties to set + * @returns {atomic.CallersQuery} CallersQuery instance + * @type {{ + * (properties: atomic.CallersQuery.$Shape): atomic.CallersQuery & atomic.CallersQuery.$Shape; + * (properties?: atomic.CallersQuery.$Properties): atomic.CallersQuery; + * }} + */ + CallersQuery.create = function(properties) { + return new CallersQuery(properties); + }; + + /** + * Encodes the specified CallersQuery message. Does not implicitly {@link atomic.CallersQuery.verify|verify} messages. + * @function encode + * @memberof atomic.CallersQuery + * @static + * @param {atomic.CallersQuery.$Properties} message CallersQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallersQuery.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId") && message.nodeId !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.nodeId); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified CallersQuery message, length delimited. Does not implicitly {@link atomic.CallersQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.CallersQuery + * @static + * @param {atomic.CallersQuery.$Properties} message CallersQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallersQuery.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a CallersQuery message from the specified reader or buffer. + * @function decode + * @memberof atomic.CallersQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.CallersQuery & atomic.CallersQuery.$Shape} CallersQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallersQuery.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.CallersQuery(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.nodeId = value; + else + delete message.nodeId; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a CallersQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.CallersQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.CallersQuery & atomic.CallersQuery.$Shape} CallersQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallersQuery.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a CallersQuery message. + * @function verify + * @memberof atomic.CallersQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CallersQuery.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + if (!$util.isString(message.nodeId)) + return "nodeId: string expected"; + return null; + }; + + /** + * Creates a CallersQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.CallersQuery + * @static + * @param {Object.} object Plain object + * @returns {atomic.CallersQuery} CallersQuery + */ + CallersQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.CallersQuery) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.CallersQuery: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.CallersQuery(); + if (object.nodeId != null) + if (typeof object.nodeId !== "string" || object.nodeId.length) + message.nodeId = $String(object.nodeId); + return message; + }; + + /** + * Creates a plain object from a CallersQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.CallersQuery + * @static + * @param {atomic.CallersQuery} message CallersQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CallersQuery.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.nodeId = ""; + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + object.nodeId = message.nodeId; + return object; + }; + + /** + * Converts this CallersQuery to JSON. + * @function toJSON + * @memberof atomic.CallersQuery + * @instance + * @returns {Object.} JSON object + */ + CallersQuery.prototype.toJSON = function() { + return CallersQuery.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CallersQuery + * @function getTypeUrl + * @memberof atomic.CallersQuery + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CallersQuery.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.CallersQuery"; + }; + + return CallersQuery; + })(); + + atomic.GraphSliceQuery = (function() { + + /** + * Properties of a GraphSliceQuery. + * @typedef {Object} atomic.GraphSliceQuery.$Properties + * @property {Array.|null} [nodeIds] GraphSliceQuery nodeIds + * @property {number|null} [maxDepth] GraphSliceQuery maxDepth + * @property {string|null} [query] GraphSliceQuery query + * @property {number|null} [seedLimit] GraphSliceQuery seedLimit + * @property {number|null} [depth] GraphSliceQuery depth + * @property {string|null} [kinds] GraphSliceQuery kinds + * @property {number|null} [changesPerSeed] GraphSliceQuery changesPerSeed + * @property {number|null} [maxNodes] GraphSliceQuery maxNodes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GraphSliceQuery. + * @memberof atomic + * @interface IGraphSliceQuery + * @augments atomic.GraphSliceQuery.$Properties + * @deprecated Use atomic.GraphSliceQuery.$Properties instead. + */ + + /** + * Shape of a GraphSliceQuery. + * @typedef {atomic.GraphSliceQuery.$Properties} atomic.GraphSliceQuery.$Shape + */ + + /** + * Constructs a new GraphSliceQuery. + * @memberof atomic + * @classdesc Represents a GraphSliceQuery. + * @constructor + * @param {atomic.GraphSliceQuery.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GraphSliceQuery = function (properties) { + this.nodeIds = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GraphSliceQuery nodeIds. + * @member {Array.} nodeIds + * @memberof atomic.GraphSliceQuery + * @instance + */ + GraphSliceQuery.prototype.nodeIds = $util.emptyArray; + + /** + * GraphSliceQuery maxDepth. + * @member {number|null|undefined} maxDepth + * @memberof atomic.GraphSliceQuery + * @instance + */ + GraphSliceQuery.prototype.maxDepth = null; + + /** + * GraphSliceQuery query. + * @member {string|null|undefined} query + * @memberof atomic.GraphSliceQuery + * @instance + */ + GraphSliceQuery.prototype.query = null; + + /** + * GraphSliceQuery seedLimit. + * @member {number|null|undefined} seedLimit + * @memberof atomic.GraphSliceQuery + * @instance + */ + GraphSliceQuery.prototype.seedLimit = null; + + /** + * GraphSliceQuery depth. + * @member {number|null|undefined} depth + * @memberof atomic.GraphSliceQuery + * @instance + */ + GraphSliceQuery.prototype.depth = null; + + /** + * GraphSliceQuery kinds. + * @member {string|null|undefined} kinds + * @memberof atomic.GraphSliceQuery + * @instance + */ + GraphSliceQuery.prototype.kinds = null; + + /** + * GraphSliceQuery changesPerSeed. + * @member {number|null|undefined} changesPerSeed + * @memberof atomic.GraphSliceQuery + * @instance + */ + GraphSliceQuery.prototype.changesPerSeed = null; + + /** + * GraphSliceQuery maxNodes. + * @member {number|null|undefined} maxNodes + * @memberof atomic.GraphSliceQuery + * @instance + */ + GraphSliceQuery.prototype.maxNodes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphSliceQuery.prototype, "_max_depth", { + get: $util.oneOfGetter($oneOfFields = ["maxDepth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphSliceQuery.prototype, "_query", { + get: $util.oneOfGetter($oneOfFields = ["query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphSliceQuery.prototype, "_seed_limit", { + get: $util.oneOfGetter($oneOfFields = ["seedLimit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphSliceQuery.prototype, "_depth", { + get: $util.oneOfGetter($oneOfFields = ["depth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphSliceQuery.prototype, "_kinds", { + get: $util.oneOfGetter($oneOfFields = ["kinds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphSliceQuery.prototype, "_changes_per_seed", { + get: $util.oneOfGetter($oneOfFields = ["changesPerSeed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GraphSliceQuery.prototype, "_max_nodes", { + get: $util.oneOfGetter($oneOfFields = ["maxNodes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GraphSliceQuery instance using the specified properties. + * @function create + * @memberof atomic.GraphSliceQuery + * @static + * @param {atomic.GraphSliceQuery.$Properties=} [properties] Properties to set + * @returns {atomic.GraphSliceQuery} GraphSliceQuery instance + * @type {{ + * (properties: atomic.GraphSliceQuery.$Shape): atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape; + * (properties?: atomic.GraphSliceQuery.$Properties): atomic.GraphSliceQuery; + * }} + */ + GraphSliceQuery.create = function(properties) { + return new GraphSliceQuery(properties); + }; + + /** + * Encodes the specified GraphSliceQuery message. Does not implicitly {@link atomic.GraphSliceQuery.verify|verify} messages. + * @function encode + * @memberof atomic.GraphSliceQuery + * @static + * @param {atomic.GraphSliceQuery.$Properties} message GraphSliceQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GraphSliceQuery.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.nodeIds != null && message.nodeIds.length) + for (var i = 0; i < message.nodeIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.nodeIds[i]); + if (message.maxDepth != null && $Object.hasOwnProperty.call(message, "maxDepth")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxDepth); + if (message.query != null && $Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.query); + if (message.seedLimit != null && $Object.hasOwnProperty.call(message, "seedLimit")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.seedLimit); + if (message.depth != null && $Object.hasOwnProperty.call(message, "depth")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.depth); + if (message.kinds != null && $Object.hasOwnProperty.call(message, "kinds")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.kinds); + if (message.changesPerSeed != null && $Object.hasOwnProperty.call(message, "changesPerSeed")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.changesPerSeed); + if (message.maxNodes != null && $Object.hasOwnProperty.call(message, "maxNodes")) + writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.maxNodes); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GraphSliceQuery message, length delimited. Does not implicitly {@link atomic.GraphSliceQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GraphSliceQuery + * @static + * @param {atomic.GraphSliceQuery.$Properties} message GraphSliceQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GraphSliceQuery.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GraphSliceQuery message from the specified reader or buffer. + * @function decode + * @memberof atomic.GraphSliceQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape} GraphSliceQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GraphSliceQuery.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GraphSliceQuery(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.nodeIds && message.nodeIds.length)) + message.nodeIds = []; + message.nodeIds.push(reader.stringVerify()); + continue; + } + case 2: { + if (wireType !== 0) + break; + message.maxDepth = reader.int32(); + message._max_depth = "maxDepth"; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.query = reader.stringVerify(); + message._query = "query"; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.seedLimit = reader.uint32(); + message._seed_limit = "seedLimit"; + continue; + } + case 5: { + if (wireType !== 0) + break; + message.depth = reader.uint32(); + message._depth = "depth"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.kinds = reader.stringVerify(); + message._kinds = "kinds"; + continue; + } + case 7: { + if (wireType !== 0) + break; + message.changesPerSeed = reader.uint32(); + message._changes_per_seed = "changesPerSeed"; + continue; + } + case 8: { + if (wireType !== 0) + break; + message.maxNodes = reader.uint32(); + message._max_nodes = "maxNodes"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GraphSliceQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GraphSliceQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape} GraphSliceQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GraphSliceQuery.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GraphSliceQuery message. + * @function verify + * @memberof atomic.GraphSliceQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GraphSliceQuery.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.nodeIds != null && $Object.hasOwnProperty.call(message, "nodeIds")) { + if (!$Array.isArray(message.nodeIds)) + return "nodeIds: array expected"; + for (var i = 0; i < message.nodeIds.length; ++i) + if (!$util.isString(message.nodeIds[i])) + return "nodeIds: string[] expected"; + } + if (message.maxDepth != null && $Object.hasOwnProperty.call(message, "maxDepth")) { + properties._max_depth = 1; + if (!$util.isInteger(message.maxDepth)) + return "maxDepth: integer expected"; + } + if (message.query != null && $Object.hasOwnProperty.call(message, "query")) { + properties._query = 1; + if (!$util.isString(message.query)) + return "query: string expected"; + } + if (message.seedLimit != null && $Object.hasOwnProperty.call(message, "seedLimit")) { + properties._seed_limit = 1; + if (!$util.isInteger(message.seedLimit)) + return "seedLimit: integer expected"; + } + if (message.depth != null && $Object.hasOwnProperty.call(message, "depth")) { + properties._depth = 1; + if (!$util.isInteger(message.depth)) + return "depth: integer expected"; + } + if (message.kinds != null && $Object.hasOwnProperty.call(message, "kinds")) { + properties._kinds = 1; + if (!$util.isString(message.kinds)) + return "kinds: string expected"; + } + if (message.changesPerSeed != null && $Object.hasOwnProperty.call(message, "changesPerSeed")) { + properties._changes_per_seed = 1; + if (!$util.isInteger(message.changesPerSeed)) + return "changesPerSeed: integer expected"; + } + if (message.maxNodes != null && $Object.hasOwnProperty.call(message, "maxNodes")) { + properties._max_nodes = 1; + if (!$util.isInteger(message.maxNodes)) + return "maxNodes: integer expected"; + } + return null; + }; + + /** + * Creates a GraphSliceQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GraphSliceQuery + * @static + * @param {Object.} object Plain object + * @returns {atomic.GraphSliceQuery} GraphSliceQuery + */ + GraphSliceQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GraphSliceQuery) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GraphSliceQuery: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GraphSliceQuery(); + if (object.nodeIds) { + if (!$Array.isArray(object.nodeIds)) + throw $TypeError(".atomic.GraphSliceQuery.nodeIds: array expected"); + message.nodeIds = $Array(object.nodeIds.length); + for (var i = 0; i < object.nodeIds.length; ++i) + message.nodeIds[i] = $String(object.nodeIds[i]); + } + if (object.maxDepth != null) + message.maxDepth = object.maxDepth | 0; + if (object.query != null) + message.query = $String(object.query); + if (object.seedLimit != null) + message.seedLimit = object.seedLimit >>> 0; + if (object.depth != null) + message.depth = object.depth >>> 0; + if (object.kinds != null) + message.kinds = $String(object.kinds); + if (object.changesPerSeed != null) + message.changesPerSeed = object.changesPerSeed >>> 0; + if (object.maxNodes != null) + message.maxNodes = object.maxNodes >>> 0; + return message; + }; + + /** + * Creates a plain object from a GraphSliceQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GraphSliceQuery + * @static + * @param {atomic.GraphSliceQuery} message GraphSliceQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GraphSliceQuery.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.nodeIds = []; + if (message.nodeIds && message.nodeIds.length) { + object.nodeIds = $Array(message.nodeIds.length); + for (var j = 0; j < message.nodeIds.length; ++j) + object.nodeIds[j] = message.nodeIds[j]; + } + if (message.maxDepth != null && $Object.hasOwnProperty.call(message, "maxDepth")) + object.maxDepth = message.maxDepth; + if (message.query != null && $Object.hasOwnProperty.call(message, "query")) + object.query = message.query; + if (message.seedLimit != null && $Object.hasOwnProperty.call(message, "seedLimit")) + object.seedLimit = message.seedLimit; + if (message.depth != null && $Object.hasOwnProperty.call(message, "depth")) + object.depth = message.depth; + if (message.kinds != null && $Object.hasOwnProperty.call(message, "kinds")) + object.kinds = message.kinds; + if (message.changesPerSeed != null && $Object.hasOwnProperty.call(message, "changesPerSeed")) + object.changesPerSeed = message.changesPerSeed; + if (message.maxNodes != null && $Object.hasOwnProperty.call(message, "maxNodes")) + object.maxNodes = message.maxNodes; + return object; + }; + + /** + * Converts this GraphSliceQuery to JSON. + * @function toJSON + * @memberof atomic.GraphSliceQuery + * @instance + * @returns {Object.} JSON object + */ + GraphSliceQuery.prototype.toJSON = function() { + return GraphSliceQuery.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GraphSliceQuery + * @function getTypeUrl + * @memberof atomic.GraphSliceQuery + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GraphSliceQuery.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GraphSliceQuery"; + }; + + return GraphSliceQuery; + })(); + + atomic.PlanExecutionQuery = (function() { + + /** + * Properties of a PlanExecutionQuery. + * @typedef {Object} atomic.PlanExecutionQuery.$Properties + * @property {Uint8Array|null} [planJson] PlanExecutionQuery planJson + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PlanExecutionQuery. + * @memberof atomic + * @interface IPlanExecutionQuery + * @augments atomic.PlanExecutionQuery.$Properties + * @deprecated Use atomic.PlanExecutionQuery.$Properties instead. + */ + + /** + * Shape of a PlanExecutionQuery. + * @typedef {atomic.PlanExecutionQuery.$Properties} atomic.PlanExecutionQuery.$Shape + */ + + /** + * Constructs a new PlanExecutionQuery. + * @memberof atomic + * @classdesc Represents a PlanExecutionQuery. + * @constructor + * @param {atomic.PlanExecutionQuery.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PlanExecutionQuery = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * PlanExecutionQuery planJson. + * @member {Uint8Array} planJson + * @memberof atomic.PlanExecutionQuery + * @instance + */ + PlanExecutionQuery.prototype.planJson = $util.newBuffer([]); + + /** + * Creates a new PlanExecutionQuery instance using the specified properties. + * @function create + * @memberof atomic.PlanExecutionQuery + * @static + * @param {atomic.PlanExecutionQuery.$Properties=} [properties] Properties to set + * @returns {atomic.PlanExecutionQuery} PlanExecutionQuery instance + * @type {{ + * (properties: atomic.PlanExecutionQuery.$Shape): atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape; + * (properties?: atomic.PlanExecutionQuery.$Properties): atomic.PlanExecutionQuery; + * }} + */ + PlanExecutionQuery.create = function(properties) { + return new PlanExecutionQuery(properties); + }; + + /** + * Encodes the specified PlanExecutionQuery message. Does not implicitly {@link atomic.PlanExecutionQuery.verify|verify} messages. + * @function encode + * @memberof atomic.PlanExecutionQuery + * @static + * @param {atomic.PlanExecutionQuery.$Properties} message PlanExecutionQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlanExecutionQuery.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.planJson != null && $Object.hasOwnProperty.call(message, "planJson") && message.planJson.length) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.planJson); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified PlanExecutionQuery message, length delimited. Does not implicitly {@link atomic.PlanExecutionQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PlanExecutionQuery + * @static + * @param {atomic.PlanExecutionQuery.$Properties} message PlanExecutionQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlanExecutionQuery.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PlanExecutionQuery message from the specified reader or buffer. + * @function decode + * @memberof atomic.PlanExecutionQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape} PlanExecutionQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlanExecutionQuery.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.PlanExecutionQuery(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.bytes()).length) + message.planJson = value; + else + delete message.planJson; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a PlanExecutionQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PlanExecutionQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape} PlanExecutionQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlanExecutionQuery.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PlanExecutionQuery message. + * @function verify + * @memberof atomic.PlanExecutionQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlanExecutionQuery.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.planJson != null && $Object.hasOwnProperty.call(message, "planJson")) + if (!(message.planJson && typeof message.planJson.length === "number" || $util.isString(message.planJson))) + return "planJson: buffer expected"; + return null; + }; + + /** + * Creates a PlanExecutionQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PlanExecutionQuery + * @static + * @param {Object.} object Plain object + * @returns {atomic.PlanExecutionQuery} PlanExecutionQuery + */ + PlanExecutionQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PlanExecutionQuery) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PlanExecutionQuery: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PlanExecutionQuery(); + if (object.planJson != null) + if (object.planJson.length) + if (typeof object.planJson === "string") + $util.base64.decode(object.planJson, message.planJson = $util.newBuffer($util.base64.length(object.planJson)), 0); + else if (object.planJson.length >= 0) + message.planJson = object.planJson; + return message; + }; + + /** + * Creates a plain object from a PlanExecutionQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PlanExecutionQuery + * @static + * @param {atomic.PlanExecutionQuery} message PlanExecutionQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlanExecutionQuery.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + if (options.bytes === $String) + object.planJson = ""; + else { + object.planJson = []; + if (options.bytes !== $Array) + object.planJson = $util.newBuffer(object.planJson); + } + if (message.planJson != null && $Object.hasOwnProperty.call(message, "planJson")) + object.planJson = options.bytes === $String ? $util.base64.encode(message.planJson, 0, message.planJson.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.planJson) : message.planJson; + return object; + }; + + /** + * Converts this PlanExecutionQuery to JSON. + * @function toJSON + * @memberof atomic.PlanExecutionQuery + * @instance + * @returns {Object.} JSON object + */ + PlanExecutionQuery.prototype.toJSON = function() { + return PlanExecutionQuery.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PlanExecutionQuery + * @function getTypeUrl + * @memberof atomic.PlanExecutionQuery + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PlanExecutionQuery.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PlanExecutionQuery"; + }; + + return PlanExecutionQuery; + })(); + + atomic.RagAskQuery = (function() { + + /** + * Properties of a RagAskQuery. + * @typedef {Object} atomic.RagAskQuery.$Properties + * @property {string|null} [question] RagAskQuery question + * @property {number|null} [topK] RagAskQuery topK + * @property {number|null} [maxTurns] RagAskQuery maxTurns + * @property {boolean|null} [verbose] RagAskQuery verbose + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RagAskQuery. + * @memberof atomic + * @interface IRagAskQuery + * @augments atomic.RagAskQuery.$Properties + * @deprecated Use atomic.RagAskQuery.$Properties instead. + */ + + /** + * Shape of a RagAskQuery. + * @typedef {atomic.RagAskQuery.$Properties} atomic.RagAskQuery.$Shape + */ + + /** + * Constructs a new RagAskQuery. + * @memberof atomic + * @classdesc Represents a RagAskQuery. + * @constructor + * @param {atomic.RagAskQuery.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var RagAskQuery = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * RagAskQuery question. + * @member {string} question + * @memberof atomic.RagAskQuery + * @instance + */ + RagAskQuery.prototype.question = ""; + + /** + * RagAskQuery topK. + * @member {number} topK + * @memberof atomic.RagAskQuery + * @instance + */ + RagAskQuery.prototype.topK = 0; + + /** + * RagAskQuery maxTurns. + * @member {number|null|undefined} maxTurns + * @memberof atomic.RagAskQuery + * @instance + */ + RagAskQuery.prototype.maxTurns = null; + + /** + * RagAskQuery verbose. + * @member {boolean|null|undefined} verbose + * @memberof atomic.RagAskQuery + * @instance + */ + RagAskQuery.prototype.verbose = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RagAskQuery.prototype, "_max_turns", { + get: $util.oneOfGetter($oneOfFields = ["maxTurns"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(RagAskQuery.prototype, "_verbose", { + get: $util.oneOfGetter($oneOfFields = ["verbose"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RagAskQuery instance using the specified properties. + * @function create + * @memberof atomic.RagAskQuery + * @static + * @param {atomic.RagAskQuery.$Properties=} [properties] Properties to set + * @returns {atomic.RagAskQuery} RagAskQuery instance + * @type {{ + * (properties: atomic.RagAskQuery.$Shape): atomic.RagAskQuery & atomic.RagAskQuery.$Shape; + * (properties?: atomic.RagAskQuery.$Properties): atomic.RagAskQuery; + * }} + */ + RagAskQuery.create = function(properties) { + return new RagAskQuery(properties); + }; + + /** + * Encodes the specified RagAskQuery message. Does not implicitly {@link atomic.RagAskQuery.verify|verify} messages. + * @function encode + * @memberof atomic.RagAskQuery + * @static + * @param {atomic.RagAskQuery.$Properties} message RagAskQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagAskQuery.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.question != null && $Object.hasOwnProperty.call(message, "question") && message.question !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.topK != null && $Object.hasOwnProperty.call(message, "topK") && message.topK !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.topK); + if (message.maxTurns != null && $Object.hasOwnProperty.call(message, "maxTurns")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.maxTurns); + if (message.verbose != null && $Object.hasOwnProperty.call(message, "verbose")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.verbose); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified RagAskQuery message, length delimited. Does not implicitly {@link atomic.RagAskQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.RagAskQuery + * @static + * @param {atomic.RagAskQuery.$Properties} message RagAskQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagAskQuery.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a RagAskQuery message from the specified reader or buffer. + * @function decode + * @memberof atomic.RagAskQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.RagAskQuery & atomic.RagAskQuery.$Shape} RagAskQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagAskQuery.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.RagAskQuery(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.question = value; + else + delete message.question; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.topK = value; + else + delete message.topK; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.maxTurns = reader.uint32(); + message._max_turns = "maxTurns"; + continue; + } + case 4: { + if (wireType !== 0) + break; + message.verbose = reader.bool(); + message._verbose = "verbose"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a RagAskQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.RagAskQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.RagAskQuery & atomic.RagAskQuery.$Shape} RagAskQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagAskQuery.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a RagAskQuery message. + * @function verify + * @memberof atomic.RagAskQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RagAskQuery.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.question != null && $Object.hasOwnProperty.call(message, "question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.topK != null && $Object.hasOwnProperty.call(message, "topK")) + if (!$util.isInteger(message.topK)) + return "topK: integer expected"; + if (message.maxTurns != null && $Object.hasOwnProperty.call(message, "maxTurns")) { + properties._max_turns = 1; + if (!$util.isInteger(message.maxTurns)) + return "maxTurns: integer expected"; + } + if (message.verbose != null && $Object.hasOwnProperty.call(message, "verbose")) { + properties._verbose = 1; + if (typeof message.verbose !== "boolean") + return "verbose: boolean expected"; + } + return null; + }; + + /** + * Creates a RagAskQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.RagAskQuery + * @static + * @param {Object.} object Plain object + * @returns {atomic.RagAskQuery} RagAskQuery + */ + RagAskQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.RagAskQuery) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.RagAskQuery: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.RagAskQuery(); + if (object.question != null) + if (typeof object.question !== "string" || object.question.length) + message.question = $String(object.question); + if (object.topK != null) + if ($Number(object.topK) !== 0) + message.topK = object.topK >>> 0; + if (object.maxTurns != null) + message.maxTurns = object.maxTurns >>> 0; + if (object.verbose != null) + message.verbose = $Boolean(object.verbose); + return message; + }; + + /** + * Creates a plain object from a RagAskQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.RagAskQuery + * @static + * @param {atomic.RagAskQuery} message RagAskQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RagAskQuery.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.question = ""; + object.topK = 0; + } + if (message.question != null && $Object.hasOwnProperty.call(message, "question")) + object.question = message.question; + if (message.topK != null && $Object.hasOwnProperty.call(message, "topK")) + object.topK = message.topK; + if (message.maxTurns != null && $Object.hasOwnProperty.call(message, "maxTurns")) + object.maxTurns = message.maxTurns; + if (message.verbose != null && $Object.hasOwnProperty.call(message, "verbose")) + object.verbose = message.verbose; + return object; + }; + + /** + * Converts this RagAskQuery to JSON. + * @function toJSON + * @memberof atomic.RagAskQuery + * @instance + * @returns {Object.} JSON object + */ + RagAskQuery.prototype.toJSON = function() { + return RagAskQuery.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RagAskQuery + * @function getTypeUrl + * @memberof atomic.RagAskQuery + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RagAskQuery.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.RagAskQuery"; + }; + + return RagAskQuery; + })(); + + atomic.QueryGraphResponse = (function() { + + /** + * Properties of a QueryGraphResponse. + * @typedef {Object} atomic.QueryGraphResponse.$Properties + * @property {Array.|null} [nodes] QueryGraphResponse nodes + * @property {Array.|null} [edges] QueryGraphResponse edges + * @property {Array.|null} [hits] QueryGraphResponse hits + * @property {string|null} [answer] QueryGraphResponse answer + * @property {Uint8Array|null} [planResult] QueryGraphResponse planResult + * @property {atomic.ViewSnapshot.$Properties|null} [snapshot] QueryGraphResponse snapshot + * @property {number|null} [graphCollected] QueryGraphResponse graphCollected + * @property {boolean|null} [callsPresent] QueryGraphResponse callsPresent + * @property {atomic.VersionedBytes.$Properties|null} [askResult] QueryGraphResponse askResult + * @property {number|Long|null} [askElapsedMs] QueryGraphResponse askElapsedMs + * @property {number|null} [apiVersion] QueryGraphResponse apiVersion + * @property {Array.|null} [callers] QueryGraphResponse callers + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a QueryGraphResponse. + * @memberof atomic + * @interface IQueryGraphResponse + * @augments atomic.QueryGraphResponse.$Properties + * @deprecated Use atomic.QueryGraphResponse.$Properties instead. + */ + + /** + * Shape of a QueryGraphResponse. + * @typedef {atomic.QueryGraphResponse.$Properties} atomic.QueryGraphResponse.$Shape + */ + + /** + * Constructs a new QueryGraphResponse. + * @memberof atomic + * @classdesc Represents a QueryGraphResponse. + * @constructor + * @param {atomic.QueryGraphResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var QueryGraphResponse = function (properties) { + this.nodes = []; + this.edges = []; + this.hits = []; + this.callers = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * QueryGraphResponse nodes. + * @member {Array.} nodes + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.nodes = $util.emptyArray; + + /** + * QueryGraphResponse edges. + * @member {Array.} edges + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.edges = $util.emptyArray; + + /** + * QueryGraphResponse hits. + * @member {Array.} hits + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.hits = $util.emptyArray; + + /** + * QueryGraphResponse answer. + * @member {string|null|undefined} answer + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.answer = null; + + /** + * QueryGraphResponse planResult. + * @member {Uint8Array|null|undefined} planResult + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.planResult = null; + + /** + * QueryGraphResponse snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.snapshot = null; + + /** + * QueryGraphResponse graphCollected. + * @member {number|null|undefined} graphCollected + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.graphCollected = null; + + /** + * QueryGraphResponse callsPresent. + * @member {boolean} callsPresent + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.callsPresent = false; + + /** + * QueryGraphResponse askResult. + * @member {atomic.VersionedBytes.$Properties|null|undefined} askResult + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.askResult = null; + + /** + * QueryGraphResponse askElapsedMs. + * @member {number|Long|null|undefined} askElapsedMs + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.askElapsedMs = null; + + /** + * QueryGraphResponse apiVersion. + * @member {number} apiVersion + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.apiVersion = 0; + + /** + * QueryGraphResponse callers. + * @member {Array.} callers + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.callers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(QueryGraphResponse.prototype, "_answer", { + get: $util.oneOfGetter($oneOfFields = ["answer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(QueryGraphResponse.prototype, "_plan_result", { + get: $util.oneOfGetter($oneOfFields = ["planResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(QueryGraphResponse.prototype, "_graph_collected", { + get: $util.oneOfGetter($oneOfFields = ["graphCollected"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(QueryGraphResponse.prototype, "_ask_result", { + get: $util.oneOfGetter($oneOfFields = ["askResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(QueryGraphResponse.prototype, "_ask_elapsed_ms", { + get: $util.oneOfGetter($oneOfFields = ["askElapsedMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryGraphResponse instance using the specified properties. + * @function create + * @memberof atomic.QueryGraphResponse + * @static + * @param {atomic.QueryGraphResponse.$Properties=} [properties] Properties to set + * @returns {atomic.QueryGraphResponse} QueryGraphResponse instance + * @type {{ + * (properties: atomic.QueryGraphResponse.$Shape): atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape; + * (properties?: atomic.QueryGraphResponse.$Properties): atomic.QueryGraphResponse; + * }} + */ + QueryGraphResponse.create = function(properties) { + return new QueryGraphResponse(properties); + }; + + /** + * Encodes the specified QueryGraphResponse message. Does not implicitly {@link atomic.QueryGraphResponse.verify|verify} messages. + * @function encode + * @memberof atomic.QueryGraphResponse + * @static + * @param {atomic.QueryGraphResponse.$Properties} message QueryGraphResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryGraphResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.nodes != null && message.nodes.length) + for (var i = 0; i < message.nodes.length; ++i) + $root.atomic.KGNode.encode(message.nodes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.edges != null && message.edges.length) + for (var i = 0; i < message.edges.length; ++i) + $root.atomic.KGEdge.encode(message.edges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.hits != null && message.hits.length) + for (var i = 0; i < message.hits.length; ++i) + $root.atomic.ContentHit.encode(message.hits[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.answer != null && $Object.hasOwnProperty.call(message, "answer")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.answer); + if (message.planResult != null && $Object.hasOwnProperty.call(message, "planResult")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.planResult); + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + $root.atomic.ViewSnapshot.encode(message.snapshot, writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.graphCollected != null && $Object.hasOwnProperty.call(message, "graphCollected")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.graphCollected); + if (message.callsPresent != null && $Object.hasOwnProperty.call(message, "callsPresent") && message.callsPresent !== false) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.callsPresent); + if (message.askResult != null && $Object.hasOwnProperty.call(message, "askResult")) + $root.atomic.VersionedBytes.encode(message.askResult, writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.askElapsedMs != null && $Object.hasOwnProperty.call(message, "askElapsedMs")) + writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.askElapsedMs); + if (message.apiVersion != null && $Object.hasOwnProperty.call(message, "apiVersion") && message.apiVersion !== 0) + writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.apiVersion); + if (message.callers != null && message.callers.length) + for (var i = 0; i < message.callers.length; ++i) + $root.atomic.CodeCaller.encode(message.callers[i], writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified QueryGraphResponse message, length delimited. Does not implicitly {@link atomic.QueryGraphResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.QueryGraphResponse + * @static + * @param {atomic.QueryGraphResponse.$Properties} message QueryGraphResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryGraphResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a QueryGraphResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.QueryGraphResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape} QueryGraphResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryGraphResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.QueryGraphResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.atomic.KGNode.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.edges && message.edges.length)) + message.edges = []; + message.edges.push($root.atomic.KGEdge.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.hits && message.hits.length)) + message.hits = []; + message.hits.push($root.atomic.ContentHit.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 2) + break; + message.answer = reader.stringVerify(); + message._answer = "answer"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.planResult = reader.bytes(); + message._plan_result = "planResult"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + continue; + } + case 7: { + if (wireType !== 0) + break; + message.graphCollected = reader.uint32(); + message._graph_collected = "graphCollected"; + continue; + } + case 8: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.callsPresent = value; + else + delete message.callsPresent; + continue; + } + case 9: { + if (wireType !== 2) + break; + message.askResult = $root.atomic.VersionedBytes.decode(reader, reader.size(), $undefined, _depth + 1, message.askResult); + message._ask_result = "askResult"; + continue; + } + case 10: { + if (wireType !== 0) + break; + message.askElapsedMs = reader.uint64(); + message._ask_elapsed_ms = "askElapsedMs"; + continue; + } + case 11: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.apiVersion = value; + else + delete message.apiVersion; + continue; + } + case 12: { + if (wireType !== 2) + break; + if (!(message.callers && message.callers.length)) + message.callers = []; + message.callers.push($root.atomic.CodeCaller.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a QueryGraphResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.QueryGraphResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape} QueryGraphResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryGraphResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a QueryGraphResponse message. + * @function verify + * @memberof atomic.QueryGraphResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryGraphResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.nodes != null && $Object.hasOwnProperty.call(message, "nodes")) { + if (!$Array.isArray(message.nodes)) + return "nodes: array expected"; + for (var i = 0; i < message.nodes.length; ++i) { + var error = $root.atomic.KGNode.verify(message.nodes[i], _depth + 1); + if (error) + return "nodes." + error; + } + } + if (message.edges != null && $Object.hasOwnProperty.call(message, "edges")) { + if (!$Array.isArray(message.edges)) + return "edges: array expected"; + for (var i = 0; i < message.edges.length; ++i) { + var error = $root.atomic.KGEdge.verify(message.edges[i], _depth + 1); + if (error) + return "edges." + error; + } + } + if (message.hits != null && $Object.hasOwnProperty.call(message, "hits")) { + if (!$Array.isArray(message.hits)) + return "hits: array expected"; + for (var i = 0; i < message.hits.length; ++i) { + var error = $root.atomic.ContentHit.verify(message.hits[i], _depth + 1); + if (error) + return "hits." + error; + } + } + if (message.answer != null && $Object.hasOwnProperty.call(message, "answer")) { + properties._answer = 1; + if (!$util.isString(message.answer)) + return "answer: string expected"; + } + if (message.planResult != null && $Object.hasOwnProperty.call(message, "planResult")) { + properties._plan_result = 1; + if (!(message.planResult && typeof message.planResult.length === "number" || $util.isString(message.planResult))) + return "planResult: buffer expected"; + } + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { + var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); + if (error) + return "snapshot." + error; + } + if (message.graphCollected != null && $Object.hasOwnProperty.call(message, "graphCollected")) { + properties._graph_collected = 1; + if (!$util.isInteger(message.graphCollected)) + return "graphCollected: integer expected"; + } + if (message.callsPresent != null && $Object.hasOwnProperty.call(message, "callsPresent")) + if (typeof message.callsPresent !== "boolean") + return "callsPresent: boolean expected"; + if (message.askResult != null && $Object.hasOwnProperty.call(message, "askResult")) { + properties._ask_result = 1; + { + var error = $root.atomic.VersionedBytes.verify(message.askResult, _depth + 1); + if (error) + return "askResult." + error; + } + } + if (message.askElapsedMs != null && $Object.hasOwnProperty.call(message, "askElapsedMs")) { + properties._ask_elapsed_ms = 1; + if (!$util.isInteger(message.askElapsedMs) && !(message.askElapsedMs && $util.isInteger(message.askElapsedMs.low) && $util.isInteger(message.askElapsedMs.high))) + return "askElapsedMs: integer|Long expected"; + } + if (message.apiVersion != null && $Object.hasOwnProperty.call(message, "apiVersion")) + if (!$util.isInteger(message.apiVersion)) + return "apiVersion: integer expected"; + if (message.callers != null && $Object.hasOwnProperty.call(message, "callers")) { + if (!$Array.isArray(message.callers)) + return "callers: array expected"; + for (var i = 0; i < message.callers.length; ++i) { + var error = $root.atomic.CodeCaller.verify(message.callers[i], _depth + 1); + if (error) + return "callers." + error; + } + } + return null; + }; + + /** + * Creates a QueryGraphResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.QueryGraphResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.QueryGraphResponse} QueryGraphResponse + */ + QueryGraphResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.QueryGraphResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.QueryGraphResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.QueryGraphResponse(); + if (object.nodes) { + if (!$Array.isArray(object.nodes)) + throw $TypeError(".atomic.QueryGraphResponse.nodes: array expected"); + message.nodes = $Array(object.nodes.length); + for (var i = 0; i < object.nodes.length; ++i) { + if (!$util.isObject(object.nodes[i])) + throw $TypeError(".atomic.QueryGraphResponse.nodes: object expected"); + message.nodes[i] = $root.atomic.KGNode.fromObject(object.nodes[i], _depth + 1); + } + } + if (object.edges) { + if (!$Array.isArray(object.edges)) + throw $TypeError(".atomic.QueryGraphResponse.edges: array expected"); + message.edges = $Array(object.edges.length); + for (var i = 0; i < object.edges.length; ++i) { + if (!$util.isObject(object.edges[i])) + throw $TypeError(".atomic.QueryGraphResponse.edges: object expected"); + message.edges[i] = $root.atomic.KGEdge.fromObject(object.edges[i], _depth + 1); + } + } + if (object.hits) { + if (!$Array.isArray(object.hits)) + throw $TypeError(".atomic.QueryGraphResponse.hits: array expected"); + message.hits = $Array(object.hits.length); + for (var i = 0; i < object.hits.length; ++i) { + if (!$util.isObject(object.hits[i])) + throw $TypeError(".atomic.QueryGraphResponse.hits: object expected"); + message.hits[i] = $root.atomic.ContentHit.fromObject(object.hits[i], _depth + 1); + } + } + if (object.answer != null) + message.answer = $String(object.answer); + if (object.planResult != null) + if (typeof object.planResult === "string") + $util.base64.decode(object.planResult, message.planResult = $util.newBuffer($util.base64.length(object.planResult)), 0); + else if (object.planResult.length >= 0) + message.planResult = object.planResult; + if (object.snapshot != null) { + if (!$util.isObject(object.snapshot)) + throw $TypeError(".atomic.QueryGraphResponse.snapshot: object expected"); + message.snapshot = $root.atomic.ViewSnapshot.fromObject(object.snapshot, _depth + 1); + } + if (object.graphCollected != null) + message.graphCollected = object.graphCollected >>> 0; + if (object.callsPresent != null) + if (object.callsPresent) + message.callsPresent = $Boolean(object.callsPresent); + if (object.askResult != null) { + if (!$util.isObject(object.askResult)) + throw $TypeError(".atomic.QueryGraphResponse.askResult: object expected"); + message.askResult = $root.atomic.VersionedBytes.fromObject(object.askResult, _depth + 1); + } + if (object.askElapsedMs != null) + if ($util.Long) + message.askElapsedMs = $util.Long.fromValue(object.askElapsedMs, true); + else if (typeof object.askElapsedMs === "string") + message.askElapsedMs = $parseInt(object.askElapsedMs, 10); + else if (typeof object.askElapsedMs === "number") + message.askElapsedMs = object.askElapsedMs; + else if (typeof object.askElapsedMs === "object") + message.askElapsedMs = new $util.LongBits(object.askElapsedMs.low >>> 0, object.askElapsedMs.high >>> 0).toNumber(true); + if (object.apiVersion != null) + if ($Number(object.apiVersion) !== 0) + message.apiVersion = object.apiVersion >>> 0; + if (object.callers) { + if (!$Array.isArray(object.callers)) + throw $TypeError(".atomic.QueryGraphResponse.callers: array expected"); + message.callers = $Array(object.callers.length); + for (var i = 0; i < object.callers.length; ++i) { + if (!$util.isObject(object.callers[i])) + throw $TypeError(".atomic.QueryGraphResponse.callers: object expected"); + message.callers[i] = $root.atomic.CodeCaller.fromObject(object.callers[i], _depth + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a QueryGraphResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.QueryGraphResponse + * @static + * @param {atomic.QueryGraphResponse} message QueryGraphResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryGraphResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.nodes = []; + object.edges = []; + object.hits = []; + object.callers = []; + } + if (options.defaults) { + object.snapshot = null; + object.callsPresent = false; + object.apiVersion = 0; + } + if (message.nodes && message.nodes.length) { + object.nodes = $Array(message.nodes.length); + for (var j = 0; j < message.nodes.length; ++j) + object.nodes[j] = $root.atomic.KGNode.toObject(message.nodes[j], options, _depth + 1); + } + if (message.edges && message.edges.length) { + object.edges = $Array(message.edges.length); + for (var j = 0; j < message.edges.length; ++j) + object.edges[j] = $root.atomic.KGEdge.toObject(message.edges[j], options, _depth + 1); + } + if (message.hits && message.hits.length) { + object.hits = $Array(message.hits.length); + for (var j = 0; j < message.hits.length; ++j) + object.hits[j] = $root.atomic.ContentHit.toObject(message.hits[j], options, _depth + 1); + } + if (message.answer != null && $Object.hasOwnProperty.call(message, "answer")) + object.answer = message.answer; + if (message.planResult != null && $Object.hasOwnProperty.call(message, "planResult")) + object.planResult = options.bytes === $String ? $util.base64.encode(message.planResult, 0, message.planResult.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.planResult) : message.planResult; + if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) + object.snapshot = $root.atomic.ViewSnapshot.toObject(message.snapshot, options, _depth + 1); + if (message.graphCollected != null && $Object.hasOwnProperty.call(message, "graphCollected")) + object.graphCollected = message.graphCollected; + if (message.callsPresent != null && $Object.hasOwnProperty.call(message, "callsPresent")) + object.callsPresent = message.callsPresent; + if (message.askResult != null && $Object.hasOwnProperty.call(message, "askResult")) + object.askResult = $root.atomic.VersionedBytes.toObject(message.askResult, options, _depth + 1); + if (message.askElapsedMs != null && $Object.hasOwnProperty.call(message, "askElapsedMs")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.askElapsedMs = typeof message.askElapsedMs === "number" ? $BigInt(message.askElapsedMs) : $util.Long.fromBits(message.askElapsedMs.low >>> 0, message.askElapsedMs.high >>> 0, true).toBigInt(); + else if (typeof message.askElapsedMs === "number") + object.askElapsedMs = options.longs === $String ? $String(message.askElapsedMs) : message.askElapsedMs; + else + object.askElapsedMs = options.longs === $String ? $util.Long.prototype.toString.call(message.askElapsedMs) : options.longs === $Number ? new $util.LongBits(message.askElapsedMs.low >>> 0, message.askElapsedMs.high >>> 0).toNumber(true) : message.askElapsedMs; + if (message.apiVersion != null && $Object.hasOwnProperty.call(message, "apiVersion")) + object.apiVersion = message.apiVersion; + if (message.callers && message.callers.length) { + object.callers = $Array(message.callers.length); + for (var j = 0; j < message.callers.length; ++j) + object.callers[j] = $root.atomic.CodeCaller.toObject(message.callers[j], options, _depth + 1); + } + return object; + }; + + /** + * Converts this QueryGraphResponse to JSON. + * @function toJSON + * @memberof atomic.QueryGraphResponse + * @instance + * @returns {Object.} JSON object + */ + QueryGraphResponse.prototype.toJSON = function() { + return QueryGraphResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for QueryGraphResponse + * @function getTypeUrl + * @memberof atomic.QueryGraphResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + QueryGraphResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.QueryGraphResponse"; + }; + + return QueryGraphResponse; + })(); + + atomic.KGNode = (function() { + + /** + * Properties of a KGNode. + * @typedef {Object} atomic.KGNode.$Properties + * @property {string|null} [id] KGNode id + * @property {Array.|null} [types] KGNode types + * @property {string|null} [name] KGNode name + * @property {Uint8Array|null} [data] KGNode data + * @property {number|null} [score] KGNode score + * @property {string|null} [source] KGNode source + * @property {Uint8Array|null} [metadata] KGNode metadata + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a KGNode. + * @memberof atomic + * @interface IKGNode + * @augments atomic.KGNode.$Properties + * @deprecated Use atomic.KGNode.$Properties instead. + */ + + /** + * Shape of a KGNode. + * @typedef {atomic.KGNode.$Properties} atomic.KGNode.$Shape + */ + + /** + * Constructs a new KGNode. + * @memberof atomic + * @classdesc Represents a KGNode. + * @constructor + * @param {atomic.KGNode.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var KGNode = function (properties) { + this.types = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * KGNode id. + * @member {string} id + * @memberof atomic.KGNode + * @instance + */ + KGNode.prototype.id = ""; + + /** + * KGNode types. + * @member {Array.} types + * @memberof atomic.KGNode + * @instance + */ + KGNode.prototype.types = $util.emptyArray; + + /** + * KGNode name. + * @member {string|null|undefined} name + * @memberof atomic.KGNode + * @instance + */ + KGNode.prototype.name = null; + + /** + * KGNode data. + * @member {Uint8Array|null|undefined} data + * @memberof atomic.KGNode + * @instance + */ + KGNode.prototype.data = null; + + /** + * KGNode score. + * @member {number|null|undefined} score + * @memberof atomic.KGNode + * @instance + */ + KGNode.prototype.score = null; + + /** + * KGNode source. + * @member {string|null|undefined} source + * @memberof atomic.KGNode + * @instance + */ + KGNode.prototype.source = null; + + /** + * KGNode metadata. + * @member {Uint8Array|null|undefined} metadata + * @memberof atomic.KGNode + * @instance + */ + KGNode.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(KGNode.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(KGNode.prototype, "_data", { + get: $util.oneOfGetter($oneOfFields = ["data"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(KGNode.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(KGNode.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(KGNode.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new KGNode instance using the specified properties. + * @function create + * @memberof atomic.KGNode + * @static + * @param {atomic.KGNode.$Properties=} [properties] Properties to set + * @returns {atomic.KGNode} KGNode instance + * @type {{ + * (properties: atomic.KGNode.$Shape): atomic.KGNode & atomic.KGNode.$Shape; + * (properties?: atomic.KGNode.$Properties): atomic.KGNode; + * }} + */ + KGNode.create = function(properties) { + return new KGNode(properties); + }; + + /** + * Encodes the specified KGNode message. Does not implicitly {@link atomic.KGNode.verify|verify} messages. + * @function encode + * @memberof atomic.KGNode + * @static + * @param {atomic.KGNode.$Properties} message KGNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KGNode.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.id != null && $Object.hasOwnProperty.call(message, "id") && message.id !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.types[i]); + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.data != null && $Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.data); + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.score); + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.source); + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.metadata); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified KGNode message, length delimited. Does not implicitly {@link atomic.KGNode.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.KGNode + * @static + * @param {atomic.KGNode.$Properties} message KGNode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KGNode.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a KGNode message from the specified reader or buffer. + * @function decode + * @memberof atomic.KGNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.KGNode & atomic.KGNode.$Shape} KGNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KGNode.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.KGNode(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.id = value; + else + delete message.id; + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(reader.stringVerify()); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.name = reader.stringVerify(); + message._name = "name"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.data = reader.bytes(); + message._data = "data"; + continue; + } + case 5: { + if (wireType !== 1) + break; + message.score = reader.double(); + message._score = "score"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.source = reader.stringVerify(); + message._source = "source"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.metadata = reader.bytes(); + message._metadata = "metadata"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a KGNode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.KGNode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.KGNode & atomic.KGNode.$Shape} KGNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KGNode.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a KGNode message. + * @function verify + * @memberof atomic.KGNode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KGNode.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.types != null && $Object.hasOwnProperty.call(message, "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.name != null && $Object.hasOwnProperty.call(message, "name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.data != null && $Object.hasOwnProperty.call(message, "data")) { + properties._data = 1; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + } + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) { + properties._source = 1; + if (!$util.isString(message.source)) + return "source: string expected"; + } + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) { + properties._metadata = 1; + if (!(message.metadata && typeof message.metadata.length === "number" || $util.isString(message.metadata))) + return "metadata: buffer expected"; + } + return null; + }; + + /** + * Creates a KGNode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.KGNode + * @static + * @param {Object.} object Plain object + * @returns {atomic.KGNode} KGNode + */ + KGNode.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.KGNode) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.KGNode: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.KGNode(); + if (object.id != null) + if (typeof object.id !== "string" || object.id.length) + message.id = $String(object.id); + if (object.types) { + if (!$Array.isArray(object.types)) + throw $TypeError(".atomic.KGNode.types: array expected"); + message.types = $Array(object.types.length); + for (var i = 0; i < object.types.length; ++i) + message.types[i] = $String(object.types[i]); + } + if (object.name != null) + message.name = $String(object.name); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.score != null) + message.score = $Number(object.score); + if (object.source != null) + message.source = $String(object.source); + if (object.metadata != null) + if (typeof object.metadata === "string") + $util.base64.decode(object.metadata, message.metadata = $util.newBuffer($util.base64.length(object.metadata)), 0); + else if (object.metadata.length >= 0) + message.metadata = object.metadata; + return message; + }; + + /** + * Creates a plain object from a KGNode message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.KGNode + * @static + * @param {atomic.KGNode} message KGNode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KGNode.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) + object.id = ""; + if (message.id != null && $Object.hasOwnProperty.call(message, "id")) + object.id = message.id; + if (message.types && message.types.length) { + object.types = $Array(message.types.length); + for (var j = 0; j < message.types.length; ++j) + object.types[j] = message.types[j]; + } + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.data != null && $Object.hasOwnProperty.call(message, "data")) + object.data = options.bytes === $String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.data) : message.data; + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) + object.score = options.json && !$isFinite(message.score) ? $String(message.score) : message.score; + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) + object.source = message.source; + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) + object.metadata = options.bytes === $String ? $util.base64.encode(message.metadata, 0, message.metadata.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.metadata) : message.metadata; + return object; + }; + + /** + * Converts this KGNode to JSON. + * @function toJSON + * @memberof atomic.KGNode + * @instance + * @returns {Object.} JSON object + */ + KGNode.prototype.toJSON = function() { + return KGNode.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for KGNode + * @function getTypeUrl + * @memberof atomic.KGNode + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + KGNode.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.KGNode"; + }; + + return KGNode; + })(); + + atomic.KGEdge = (function() { + + /** + * Properties of a KGEdge. + * @typedef {Object} atomic.KGEdge.$Properties + * @property {string|null} [source] KGEdge source + * @property {string|null} [target] KGEdge target + * @property {string|null} [relation] KGEdge relation + * @property {Uint8Array|null} [metadata] KGEdge metadata + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a KGEdge. + * @memberof atomic + * @interface IKGEdge + * @augments atomic.KGEdge.$Properties + * @deprecated Use atomic.KGEdge.$Properties instead. + */ + + /** + * Shape of a KGEdge. + * @typedef {atomic.KGEdge.$Properties} atomic.KGEdge.$Shape + */ + + /** + * Constructs a new KGEdge. + * @memberof atomic + * @classdesc Represents a KGEdge. + * @constructor + * @param {atomic.KGEdge.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var KGEdge = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * KGEdge source. + * @member {string} source + * @memberof atomic.KGEdge + * @instance + */ + KGEdge.prototype.source = ""; + + /** + * KGEdge target. + * @member {string} target + * @memberof atomic.KGEdge + * @instance + */ + KGEdge.prototype.target = ""; + + /** + * KGEdge relation. + * @member {string} relation + * @memberof atomic.KGEdge + * @instance + */ + KGEdge.prototype.relation = ""; + + /** + * KGEdge metadata. + * @member {Uint8Array|null|undefined} metadata + * @memberof atomic.KGEdge + * @instance + */ + KGEdge.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(KGEdge.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new KGEdge instance using the specified properties. + * @function create + * @memberof atomic.KGEdge + * @static + * @param {atomic.KGEdge.$Properties=} [properties] Properties to set + * @returns {atomic.KGEdge} KGEdge instance + * @type {{ + * (properties: atomic.KGEdge.$Shape): atomic.KGEdge & atomic.KGEdge.$Shape; + * (properties?: atomic.KGEdge.$Properties): atomic.KGEdge; + * }} + */ + KGEdge.create = function(properties) { + return new KGEdge(properties); + }; + + /** + * Encodes the specified KGEdge message. Does not implicitly {@link atomic.KGEdge.verify|verify} messages. + * @function encode + * @memberof atomic.KGEdge + * @static + * @param {atomic.KGEdge.$Properties} message KGEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KGEdge.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.source != null && $Object.hasOwnProperty.call(message, "source") && message.source !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.source); + if (message.target != null && $Object.hasOwnProperty.call(message, "target") && message.target !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.target); + if (message.relation != null && $Object.hasOwnProperty.call(message, "relation") && message.relation !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.relation); + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.metadata); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified KGEdge message, length delimited. Does not implicitly {@link atomic.KGEdge.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.KGEdge + * @static + * @param {atomic.KGEdge.$Properties} message KGEdge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KGEdge.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a KGEdge message from the specified reader or buffer. + * @function decode + * @memberof atomic.KGEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.KGEdge & atomic.KGEdge.$Shape} KGEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KGEdge.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.KGEdge(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.source = value; + else + delete message.source; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.target = value; + else + delete message.target; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.relation = value; + else + delete message.relation; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.metadata = reader.bytes(); + message._metadata = "metadata"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a KGEdge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.KGEdge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.KGEdge & atomic.KGEdge.$Shape} KGEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KGEdge.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a KGEdge message. + * @function verify + * @memberof atomic.KGEdge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KGEdge.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.target != null && $Object.hasOwnProperty.call(message, "target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.relation != null && $Object.hasOwnProperty.call(message, "relation")) + if (!$util.isString(message.relation)) + return "relation: string expected"; + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) { + properties._metadata = 1; + if (!(message.metadata && typeof message.metadata.length === "number" || $util.isString(message.metadata))) + return "metadata: buffer expected"; + } + return null; + }; + + /** + * Creates a KGEdge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.KGEdge + * @static + * @param {Object.} object Plain object + * @returns {atomic.KGEdge} KGEdge + */ + KGEdge.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.KGEdge) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.KGEdge: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.KGEdge(); + if (object.source != null) + if (typeof object.source !== "string" || object.source.length) + message.source = $String(object.source); + if (object.target != null) + if (typeof object.target !== "string" || object.target.length) + message.target = $String(object.target); + if (object.relation != null) + if (typeof object.relation !== "string" || object.relation.length) + message.relation = $String(object.relation); + if (object.metadata != null) + if (typeof object.metadata === "string") + $util.base64.decode(object.metadata, message.metadata = $util.newBuffer($util.base64.length(object.metadata)), 0); + else if (object.metadata.length >= 0) + message.metadata = object.metadata; + return message; + }; + + /** + * Creates a plain object from a KGEdge message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.KGEdge + * @static + * @param {atomic.KGEdge} message KGEdge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KGEdge.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.source = ""; + object.target = ""; + object.relation = ""; + } + if (message.source != null && $Object.hasOwnProperty.call(message, "source")) + object.source = message.source; + if (message.target != null && $Object.hasOwnProperty.call(message, "target")) + object.target = message.target; + if (message.relation != null && $Object.hasOwnProperty.call(message, "relation")) + object.relation = message.relation; + if (message.metadata != null && $Object.hasOwnProperty.call(message, "metadata")) + object.metadata = options.bytes === $String ? $util.base64.encode(message.metadata, 0, message.metadata.length) : options.bytes === $Array ? $Array.prototype.slice.call(message.metadata) : message.metadata; + return object; + }; + + /** + * Converts this KGEdge to JSON. + * @function toJSON + * @memberof atomic.KGEdge + * @instance + * @returns {Object.} JSON object + */ + KGEdge.prototype.toJSON = function() { + return KGEdge.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for KGEdge + * @function getTypeUrl + * @memberof atomic.KGEdge + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + KGEdge.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.KGEdge"; + }; + + return KGEdge; + })(); + + atomic.ContentHit = (function() { + + /** + * Properties of a ContentHit. + * @typedef {Object} atomic.ContentHit.$Properties + * @property {string|null} [path] ContentHit path + * @property {string|null} [snippet] ContentHit snippet + * @property {number|Long|null} [line] ContentHit line + * @property {number|null} [score] ContentHit score + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ContentHit. + * @memberof atomic + * @interface IContentHit + * @augments atomic.ContentHit.$Properties + * @deprecated Use atomic.ContentHit.$Properties instead. + */ + + /** + * Shape of a ContentHit. + * @typedef {atomic.ContentHit.$Properties} atomic.ContentHit.$Shape + */ + + /** + * Constructs a new ContentHit. + * @memberof atomic + * @classdesc Represents a ContentHit. + * @constructor + * @param {atomic.ContentHit.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ContentHit = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ContentHit path. + * @member {string} path + * @memberof atomic.ContentHit + * @instance + */ + ContentHit.prototype.path = ""; + + /** + * ContentHit snippet. + * @member {string} snippet + * @memberof atomic.ContentHit + * @instance + */ + ContentHit.prototype.snippet = ""; + + /** + * ContentHit line. + * @member {number|Long|null|undefined} line + * @memberof atomic.ContentHit + * @instance + */ + ContentHit.prototype.line = null; + + /** + * ContentHit score. + * @member {number|null|undefined} score + * @memberof atomic.ContentHit + * @instance + */ + ContentHit.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ContentHit.prototype, "_line", { + get: $util.oneOfGetter($oneOfFields = ["line"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ContentHit.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ContentHit instance using the specified properties. + * @function create + * @memberof atomic.ContentHit + * @static + * @param {atomic.ContentHit.$Properties=} [properties] Properties to set + * @returns {atomic.ContentHit} ContentHit instance + * @type {{ + * (properties: atomic.ContentHit.$Shape): atomic.ContentHit & atomic.ContentHit.$Shape; + * (properties?: atomic.ContentHit.$Properties): atomic.ContentHit; + * }} + */ + ContentHit.create = function(properties) { + return new ContentHit(properties); + }; + + /** + * Encodes the specified ContentHit message. Does not implicitly {@link atomic.ContentHit.verify|verify} messages. + * @function encode + * @memberof atomic.ContentHit + * @static + * @param {atomic.ContentHit.$Properties} message ContentHit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentHit.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.snippet != null && $Object.hasOwnProperty.call(message, "snippet") && message.snippet !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snippet); + if (message.line != null && $Object.hasOwnProperty.call(message, "line")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.line); + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.score); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified ContentHit message, length delimited. Does not implicitly {@link atomic.ContentHit.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ContentHit + * @static + * @param {atomic.ContentHit.$Properties} message ContentHit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentHit.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ContentHit message from the specified reader or buffer. + * @function decode + * @memberof atomic.ContentHit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ContentHit & atomic.ContentHit.$Shape} ContentHit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentHit.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.ContentHit(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.snippet = value; + else + delete message.snippet; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.line = reader.uint64(); + message._line = "line"; + continue; + } + case 4: { + if (wireType !== 1) + break; + message.score = reader.double(); + message._score = "score"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a ContentHit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ContentHit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ContentHit & atomic.ContentHit.$Shape} ContentHit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentHit.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ContentHit message. + * @function verify + * @memberof atomic.ContentHit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentHit.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.snippet != null && $Object.hasOwnProperty.call(message, "snippet")) + if (!$util.isString(message.snippet)) + return "snippet: string expected"; + if (message.line != null && $Object.hasOwnProperty.call(message, "line")) { + properties._line = 1; + if (!$util.isInteger(message.line) && !(message.line && $util.isInteger(message.line.low) && $util.isInteger(message.line.high))) + return "line: integer|Long expected"; + } + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates a ContentHit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ContentHit + * @static + * @param {Object.} object Plain object + * @returns {atomic.ContentHit} ContentHit + */ + ContentHit.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ContentHit) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ContentHit: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ContentHit(); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + if (object.snippet != null) + if (typeof object.snippet !== "string" || object.snippet.length) + message.snippet = $String(object.snippet); + if (object.line != null) + if ($util.Long) + message.line = $util.Long.fromValue(object.line, true); + else if (typeof object.line === "string") + message.line = $parseInt(object.line, 10); + else if (typeof object.line === "number") + message.line = object.line; + else if (typeof object.line === "object") + message.line = new $util.LongBits(object.line.low >>> 0, object.line.high >>> 0).toNumber(true); + if (object.score != null) + message.score = $Number(object.score); + return message; + }; + + /** + * Creates a plain object from a ContentHit message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ContentHit + * @static + * @param {atomic.ContentHit} message ContentHit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentHit.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.path = ""; + object.snippet = ""; + } + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.snippet != null && $Object.hasOwnProperty.call(message, "snippet")) + object.snippet = message.snippet; + if (message.line != null && $Object.hasOwnProperty.call(message, "line")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.line = typeof message.line === "number" ? $BigInt(message.line) : $util.Long.fromBits(message.line.low >>> 0, message.line.high >>> 0, true).toBigInt(); + else if (typeof message.line === "number") + object.line = options.longs === $String ? $String(message.line) : message.line; + else + object.line = options.longs === $String ? $util.Long.prototype.toString.call(message.line) : options.longs === $Number ? new $util.LongBits(message.line.low >>> 0, message.line.high >>> 0).toNumber(true) : message.line; + if (message.score != null && $Object.hasOwnProperty.call(message, "score")) + object.score = options.json && !$isFinite(message.score) ? $String(message.score) : message.score; + return object; + }; + + /** + * Converts this ContentHit to JSON. + * @function toJSON + * @memberof atomic.ContentHit + * @instance + * @returns {Object.} JSON object + */ + ContentHit.prototype.toJSON = function() { + return ContentHit.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ContentHit + * @function getTypeUrl + * @memberof atomic.ContentHit + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ContentHit.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ContentHit"; + }; + + return ContentHit; + })(); + + atomic.CodeCaller = (function() { + + /** + * Properties of a CodeCaller. + * @typedef {Object} atomic.CodeCaller.$Properties + * @property {string|null} [path] CodeCaller path + * @property {string|null} [name] CodeCaller name + * @property {number|null} [line] CodeCaller line + * @property {string|null} [summary] CodeCaller summary + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a CodeCaller. + * @memberof atomic + * @interface ICodeCaller + * @augments atomic.CodeCaller.$Properties + * @deprecated Use atomic.CodeCaller.$Properties instead. + */ + + /** + * Shape of a CodeCaller. + * @typedef {atomic.CodeCaller.$Properties} atomic.CodeCaller.$Shape + */ + + /** + * Constructs a new CodeCaller. + * @memberof atomic + * @classdesc Represents a CodeCaller. + * @constructor + * @param {atomic.CodeCaller.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var CodeCaller = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * CodeCaller path. + * @member {string} path + * @memberof atomic.CodeCaller + * @instance + */ + CodeCaller.prototype.path = ""; + + /** + * CodeCaller name. + * @member {string} name + * @memberof atomic.CodeCaller + * @instance + */ + CodeCaller.prototype.name = ""; + + /** + * CodeCaller line. + * @member {number} line + * @memberof atomic.CodeCaller + * @instance + */ + CodeCaller.prototype.line = 0; + + /** + * CodeCaller summary. + * @member {string|null|undefined} summary + * @memberof atomic.CodeCaller + * @instance + */ + CodeCaller.prototype.summary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(CodeCaller.prototype, "_summary", { + get: $util.oneOfGetter($oneOfFields = ["summary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CodeCaller instance using the specified properties. + * @function create + * @memberof atomic.CodeCaller + * @static + * @param {atomic.CodeCaller.$Properties=} [properties] Properties to set + * @returns {atomic.CodeCaller} CodeCaller instance + * @type {{ + * (properties: atomic.CodeCaller.$Shape): atomic.CodeCaller & atomic.CodeCaller.$Shape; + * (properties?: atomic.CodeCaller.$Properties): atomic.CodeCaller; + * }} + */ + CodeCaller.create = function(properties) { + return new CodeCaller(properties); + }; + + /** + * Encodes the specified CodeCaller message. Does not implicitly {@link atomic.CodeCaller.verify|verify} messages. + * @function encode + * @memberof atomic.CodeCaller + * @static + * @param {atomic.CodeCaller.$Properties} message CodeCaller message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCaller.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.path != null && $Object.hasOwnProperty.call(message, "path") && message.path !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.name != null && $Object.hasOwnProperty.call(message, "name") && message.name !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.line != null && $Object.hasOwnProperty.call(message, "line") && message.line !== 0) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.line); + if (message.summary != null && $Object.hasOwnProperty.call(message, "summary")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.summary); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified CodeCaller message, length delimited. Does not implicitly {@link atomic.CodeCaller.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.CodeCaller + * @static + * @param {atomic.CodeCaller.$Properties} message CodeCaller message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CodeCaller.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a CodeCaller message from the specified reader or buffer. + * @function decode + * @memberof atomic.CodeCaller + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.CodeCaller & atomic.CodeCaller.$Shape} CodeCaller + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCaller.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.CodeCaller(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.name = value; + else + delete message.name; + continue; + } + case 3: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.line = value; + else + delete message.line; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.summary = reader.stringVerify(); + message._summary = "summary"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a CodeCaller message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.CodeCaller + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.CodeCaller & atomic.CodeCaller.$Shape} CodeCaller + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CodeCaller.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a CodeCaller message. + * @function verify + * @memberof atomic.CodeCaller + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CodeCaller.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.line != null && $Object.hasOwnProperty.call(message, "line")) + if (!$util.isInteger(message.line)) + return "line: integer expected"; + if (message.summary != null && $Object.hasOwnProperty.call(message, "summary")) { + properties._summary = 1; + if (!$util.isString(message.summary)) + return "summary: string expected"; + } + return null; + }; + + /** + * Creates a CodeCaller message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.CodeCaller + * @static + * @param {Object.} object Plain object + * @returns {atomic.CodeCaller} CodeCaller + */ + CodeCaller.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.CodeCaller) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.CodeCaller: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.CodeCaller(); + if (object.path != null) + if (typeof object.path !== "string" || object.path.length) + message.path = $String(object.path); + if (object.name != null) + if (typeof object.name !== "string" || object.name.length) + message.name = $String(object.name); + if (object.line != null) + if ($Number(object.line) !== 0) + message.line = object.line >>> 0; + if (object.summary != null) + message.summary = $String(object.summary); + return message; + }; + + /** + * Creates a plain object from a CodeCaller message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.CodeCaller + * @static + * @param {atomic.CodeCaller} message CodeCaller + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CodeCaller.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.path = ""; + object.name = ""; + object.line = 0; + } + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.line != null && $Object.hasOwnProperty.call(message, "line")) + object.line = message.line; + if (message.summary != null && $Object.hasOwnProperty.call(message, "summary")) + object.summary = message.summary; + return object; + }; + + /** + * Converts this CodeCaller to JSON. + * @function toJSON + * @memberof atomic.CodeCaller + * @instance + * @returns {Object.} JSON object + */ + CodeCaller.prototype.toJSON = function() { + return CodeCaller.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for CodeCaller + * @function getTypeUrl + * @memberof atomic.CodeCaller + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + CodeCaller.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.CodeCaller"; + }; + + return CodeCaller; + })(); + + atomic.GetProjectIdentityRequest = (function() { + + /** + * Properties of a GetProjectIdentityRequest. + * @typedef {Object} atomic.GetProjectIdentityRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] GetProjectIdentityRequest repository + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetProjectIdentityRequest. + * @memberof atomic + * @interface IGetProjectIdentityRequest + * @augments atomic.GetProjectIdentityRequest.$Properties + * @deprecated Use atomic.GetProjectIdentityRequest.$Properties instead. + */ + + /** + * Shape of a GetProjectIdentityRequest. + * @typedef {atomic.GetProjectIdentityRequest.$Properties} atomic.GetProjectIdentityRequest.$Shape + */ + + /** + * Constructs a new GetProjectIdentityRequest. + * @memberof atomic + * @classdesc Represents a GetProjectIdentityRequest. + * @constructor + * @param {atomic.GetProjectIdentityRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetProjectIdentityRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetProjectIdentityRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.GetProjectIdentityRequest + * @instance + */ + GetProjectIdentityRequest.prototype.repository = null; + + /** + * Creates a new GetProjectIdentityRequest instance using the specified properties. + * @function create + * @memberof atomic.GetProjectIdentityRequest + * @static + * @param {atomic.GetProjectIdentityRequest.$Properties=} [properties] Properties to set + * @returns {atomic.GetProjectIdentityRequest} GetProjectIdentityRequest instance + * @type {{ + * (properties: atomic.GetProjectIdentityRequest.$Shape): atomic.GetProjectIdentityRequest & atomic.GetProjectIdentityRequest.$Shape; + * (properties?: atomic.GetProjectIdentityRequest.$Properties): atomic.GetProjectIdentityRequest; + * }} + */ + GetProjectIdentityRequest.create = function(properties) { + return new GetProjectIdentityRequest(properties); + }; + + /** + * Encodes the specified GetProjectIdentityRequest message. Does not implicitly {@link atomic.GetProjectIdentityRequest.verify|verify} messages. + * @function encode + * @memberof atomic.GetProjectIdentityRequest + * @static + * @param {atomic.GetProjectIdentityRequest.$Properties} message GetProjectIdentityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectIdentityRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetProjectIdentityRequest message, length delimited. Does not implicitly {@link atomic.GetProjectIdentityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetProjectIdentityRequest + * @static + * @param {atomic.GetProjectIdentityRequest.$Properties} message GetProjectIdentityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectIdentityRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetProjectIdentityRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetProjectIdentityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetProjectIdentityRequest & atomic.GetProjectIdentityRequest.$Shape} GetProjectIdentityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectIdentityRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetProjectIdentityRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetProjectIdentityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetProjectIdentityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetProjectIdentityRequest & atomic.GetProjectIdentityRequest.$Shape} GetProjectIdentityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectIdentityRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetProjectIdentityRequest message. + * @function verify + * @memberof atomic.GetProjectIdentityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProjectIdentityRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates a GetProjectIdentityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetProjectIdentityRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetProjectIdentityRequest} GetProjectIdentityRequest + */ + GetProjectIdentityRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetProjectIdentityRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetProjectIdentityRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetProjectIdentityRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.GetProjectIdentityRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a GetProjectIdentityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetProjectIdentityRequest + * @static + * @param {atomic.GetProjectIdentityRequest} message GetProjectIdentityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProjectIdentityRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.repository = null; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + return object; + }; + + /** + * Converts this GetProjectIdentityRequest to JSON. + * @function toJSON + * @memberof atomic.GetProjectIdentityRequest + * @instance + * @returns {Object.} JSON object + */ + GetProjectIdentityRequest.prototype.toJSON = function() { + return GetProjectIdentityRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetProjectIdentityRequest + * @function getTypeUrl + * @memberof atomic.GetProjectIdentityRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetProjectIdentityRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetProjectIdentityRequest"; + }; + + return GetProjectIdentityRequest; + })(); + + atomic.GetProjectIdentityResponse = (function() { + + /** + * Properties of a GetProjectIdentityResponse. + * @typedef {Object} atomic.GetProjectIdentityResponse.$Properties + * @property {string|null} [project] GetProjectIdentityResponse project + * @property {string|null} [urn] GetProjectIdentityResponse urn + * @property {string|null} [created] GetProjectIdentityResponse created + * @property {string|null} [minted] GetProjectIdentityResponse minted + * @property {string|null} [signedBy] GetProjectIdentityResponse signedBy + * @property {string|null} [hash] GetProjectIdentityResponse hash + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetProjectIdentityResponse. + * @memberof atomic + * @interface IGetProjectIdentityResponse + * @augments atomic.GetProjectIdentityResponse.$Properties + * @deprecated Use atomic.GetProjectIdentityResponse.$Properties instead. + */ + + /** + * Shape of a GetProjectIdentityResponse. + * @typedef {atomic.GetProjectIdentityResponse.$Properties} atomic.GetProjectIdentityResponse.$Shape + */ + + /** + * Constructs a new GetProjectIdentityResponse. + * @memberof atomic + * @classdesc Represents a GetProjectIdentityResponse. + * @constructor + * @param {atomic.GetProjectIdentityResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetProjectIdentityResponse = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetProjectIdentityResponse project. + * @member {string} project + * @memberof atomic.GetProjectIdentityResponse + * @instance + */ + GetProjectIdentityResponse.prototype.project = ""; + + /** + * GetProjectIdentityResponse urn. + * @member {string} urn + * @memberof atomic.GetProjectIdentityResponse + * @instance + */ + GetProjectIdentityResponse.prototype.urn = ""; + + /** + * GetProjectIdentityResponse created. + * @member {string} created + * @memberof atomic.GetProjectIdentityResponse + * @instance + */ + GetProjectIdentityResponse.prototype.created = ""; + + /** + * GetProjectIdentityResponse minted. + * @member {string} minted + * @memberof atomic.GetProjectIdentityResponse + * @instance + */ + GetProjectIdentityResponse.prototype.minted = ""; + + /** + * GetProjectIdentityResponse signedBy. + * @member {string|null|undefined} signedBy + * @memberof atomic.GetProjectIdentityResponse + * @instance + */ + GetProjectIdentityResponse.prototype.signedBy = null; + + /** + * GetProjectIdentityResponse hash. + * @member {string} hash + * @memberof atomic.GetProjectIdentityResponse + * @instance + */ + GetProjectIdentityResponse.prototype.hash = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(GetProjectIdentityResponse.prototype, "_signed_by", { + get: $util.oneOfGetter($oneOfFields = ["signedBy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetProjectIdentityResponse instance using the specified properties. + * @function create + * @memberof atomic.GetProjectIdentityResponse + * @static + * @param {atomic.GetProjectIdentityResponse.$Properties=} [properties] Properties to set + * @returns {atomic.GetProjectIdentityResponse} GetProjectIdentityResponse instance + * @type {{ + * (properties: atomic.GetProjectIdentityResponse.$Shape): atomic.GetProjectIdentityResponse & atomic.GetProjectIdentityResponse.$Shape; + * (properties?: atomic.GetProjectIdentityResponse.$Properties): atomic.GetProjectIdentityResponse; + * }} + */ + GetProjectIdentityResponse.create = function(properties) { + return new GetProjectIdentityResponse(properties); + }; + + /** + * Encodes the specified GetProjectIdentityResponse message. Does not implicitly {@link atomic.GetProjectIdentityResponse.verify|verify} messages. + * @function encode + * @memberof atomic.GetProjectIdentityResponse + * @static + * @param {atomic.GetProjectIdentityResponse.$Properties} message GetProjectIdentityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectIdentityResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.project != null && $Object.hasOwnProperty.call(message, "project") && message.project !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.urn != null && $Object.hasOwnProperty.call(message, "urn") && message.urn !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.urn); + if (message.created != null && $Object.hasOwnProperty.call(message, "created") && message.created !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.created); + if (message.minted != null && $Object.hasOwnProperty.call(message, "minted") && message.minted !== "") + writer.uint32(/* id 4, wireType 2 =*/34).string(message.minted); + if (message.signedBy != null && $Object.hasOwnProperty.call(message, "signedBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signedBy); + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash") && message.hash !== "") + writer.uint32(/* id 6, wireType 2 =*/50).string(message.hash); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetProjectIdentityResponse message, length delimited. Does not implicitly {@link atomic.GetProjectIdentityResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetProjectIdentityResponse + * @static + * @param {atomic.GetProjectIdentityResponse.$Properties} message GetProjectIdentityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectIdentityResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetProjectIdentityResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetProjectIdentityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetProjectIdentityResponse & atomic.GetProjectIdentityResponse.$Shape} GetProjectIdentityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectIdentityResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetProjectIdentityResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.project = value; + else + delete message.project; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.urn = value; + else + delete message.urn; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.created = value; + else + delete message.created; + continue; + } + case 4: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.minted = value; + else + delete message.minted; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.signedBy = reader.stringVerify(); + message._signed_by = "signedBy"; + continue; + } + case 6: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.hash = value; + else + delete message.hash; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetProjectIdentityResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetProjectIdentityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetProjectIdentityResponse & atomic.GetProjectIdentityResponse.$Shape} GetProjectIdentityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectIdentityResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetProjectIdentityResponse message. + * @function verify + * @memberof atomic.GetProjectIdentityResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProjectIdentityResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.project != null && $Object.hasOwnProperty.call(message, "project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.urn != null && $Object.hasOwnProperty.call(message, "urn")) + if (!$util.isString(message.urn)) + return "urn: string expected"; + if (message.created != null && $Object.hasOwnProperty.call(message, "created")) + if (!$util.isString(message.created)) + return "created: string expected"; + if (message.minted != null && $Object.hasOwnProperty.call(message, "minted")) + if (!$util.isString(message.minted)) + return "minted: string expected"; + if (message.signedBy != null && $Object.hasOwnProperty.call(message, "signedBy")) { + properties._signed_by = 1; + if (!$util.isString(message.signedBy)) + return "signedBy: string expected"; + } + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) + if (!$util.isString(message.hash)) + return "hash: string expected"; + return null; + }; + + /** + * Creates a GetProjectIdentityResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetProjectIdentityResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetProjectIdentityResponse} GetProjectIdentityResponse + */ + GetProjectIdentityResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetProjectIdentityResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetProjectIdentityResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetProjectIdentityResponse(); + if (object.project != null) + if (typeof object.project !== "string" || object.project.length) + message.project = $String(object.project); + if (object.urn != null) + if (typeof object.urn !== "string" || object.urn.length) + message.urn = $String(object.urn); + if (object.created != null) + if (typeof object.created !== "string" || object.created.length) + message.created = $String(object.created); + if (object.minted != null) + if (typeof object.minted !== "string" || object.minted.length) + message.minted = $String(object.minted); + if (object.signedBy != null) + message.signedBy = $String(object.signedBy); + if (object.hash != null) + if (typeof object.hash !== "string" || object.hash.length) + message.hash = $String(object.hash); + return message; + }; + + /** + * Creates a plain object from a GetProjectIdentityResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetProjectIdentityResponse + * @static + * @param {atomic.GetProjectIdentityResponse} message GetProjectIdentityResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProjectIdentityResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + object.project = ""; + object.urn = ""; + object.created = ""; + object.minted = ""; + object.hash = ""; + } + if (message.project != null && $Object.hasOwnProperty.call(message, "project")) + object.project = message.project; + if (message.urn != null && $Object.hasOwnProperty.call(message, "urn")) + object.urn = message.urn; + if (message.created != null && $Object.hasOwnProperty.call(message, "created")) + object.created = message.created; + if (message.minted != null && $Object.hasOwnProperty.call(message, "minted")) + object.minted = message.minted; + if (message.signedBy != null && $Object.hasOwnProperty.call(message, "signedBy")) + object.signedBy = message.signedBy; + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) + object.hash = message.hash; + return object; + }; + + /** + * Converts this GetProjectIdentityResponse to JSON. + * @function toJSON + * @memberof atomic.GetProjectIdentityResponse + * @instance + * @returns {Object.} JSON object + */ + GetProjectIdentityResponse.prototype.toJSON = function() { + return GetProjectIdentityResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetProjectIdentityResponse + * @function getTypeUrl + * @memberof atomic.GetProjectIdentityResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetProjectIdentityResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetProjectIdentityResponse"; + }; + + return GetProjectIdentityResponse; + })(); + + atomic.GetWorkflowSnapshotRequest = (function() { + + /** + * Properties of a GetWorkflowSnapshotRequest. + * @typedef {Object} atomic.GetWorkflowSnapshotRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] GetWorkflowSnapshotRequest repository + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetWorkflowSnapshotRequest. + * @memberof atomic + * @interface IGetWorkflowSnapshotRequest + * @augments atomic.GetWorkflowSnapshotRequest.$Properties + * @deprecated Use atomic.GetWorkflowSnapshotRequest.$Properties instead. + */ + + /** + * Shape of a GetWorkflowSnapshotRequest. + * @typedef {atomic.GetWorkflowSnapshotRequest.$Properties} atomic.GetWorkflowSnapshotRequest.$Shape + */ + + /** + * Constructs a new GetWorkflowSnapshotRequest. + * @memberof atomic + * @classdesc Represents a GetWorkflowSnapshotRequest. + * @constructor + * @param {atomic.GetWorkflowSnapshotRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetWorkflowSnapshotRequest = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetWorkflowSnapshotRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.GetWorkflowSnapshotRequest + * @instance + */ + GetWorkflowSnapshotRequest.prototype.repository = null; + + /** + * Creates a new GetWorkflowSnapshotRequest instance using the specified properties. + * @function create + * @memberof atomic.GetWorkflowSnapshotRequest + * @static + * @param {atomic.GetWorkflowSnapshotRequest.$Properties=} [properties] Properties to set + * @returns {atomic.GetWorkflowSnapshotRequest} GetWorkflowSnapshotRequest instance + * @type {{ + * (properties: atomic.GetWorkflowSnapshotRequest.$Shape): atomic.GetWorkflowSnapshotRequest & atomic.GetWorkflowSnapshotRequest.$Shape; + * (properties?: atomic.GetWorkflowSnapshotRequest.$Properties): atomic.GetWorkflowSnapshotRequest; + * }} + */ + GetWorkflowSnapshotRequest.create = function(properties) { + return new GetWorkflowSnapshotRequest(properties); + }; + + /** + * Encodes the specified GetWorkflowSnapshotRequest message. Does not implicitly {@link atomic.GetWorkflowSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof atomic.GetWorkflowSnapshotRequest + * @static + * @param {atomic.GetWorkflowSnapshotRequest.$Properties} message GetWorkflowSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowSnapshotRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetWorkflowSnapshotRequest message, length delimited. Does not implicitly {@link atomic.GetWorkflowSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetWorkflowSnapshotRequest + * @static + * @param {atomic.GetWorkflowSnapshotRequest.$Properties} message GetWorkflowSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowSnapshotRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetWorkflowSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetWorkflowSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetWorkflowSnapshotRequest & atomic.GetWorkflowSnapshotRequest.$Shape} GetWorkflowSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowSnapshotRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetWorkflowSnapshotRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetWorkflowSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetWorkflowSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetWorkflowSnapshotRequest & atomic.GetWorkflowSnapshotRequest.$Shape} GetWorkflowSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowSnapshotRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetWorkflowSnapshotRequest message. + * @function verify + * @memberof atomic.GetWorkflowSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkflowSnapshotRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + return null; + }; + + /** + * Creates a GetWorkflowSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetWorkflowSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetWorkflowSnapshotRequest} GetWorkflowSnapshotRequest + */ + GetWorkflowSnapshotRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetWorkflowSnapshotRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetWorkflowSnapshotRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetWorkflowSnapshotRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.GetWorkflowSnapshotRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a GetWorkflowSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetWorkflowSnapshotRequest + * @static + * @param {atomic.GetWorkflowSnapshotRequest} message GetWorkflowSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkflowSnapshotRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) + object.repository = null; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + return object; + }; + + /** + * Converts this GetWorkflowSnapshotRequest to JSON. + * @function toJSON + * @memberof atomic.GetWorkflowSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkflowSnapshotRequest.prototype.toJSON = function() { + return GetWorkflowSnapshotRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetWorkflowSnapshotRequest + * @function getTypeUrl + * @memberof atomic.GetWorkflowSnapshotRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetWorkflowSnapshotRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetWorkflowSnapshotRequest"; + }; + + return GetWorkflowSnapshotRequest; + })(); + + atomic.GetWorkflowSnapshotResponse = (function() { + + /** + * Properties of a GetWorkflowSnapshotResponse. + * @typedef {Object} atomic.GetWorkflowSnapshotResponse.$Properties + * @property {number|null} [apiVersion] GetWorkflowSnapshotResponse apiVersion + * @property {number|null} [generation] GetWorkflowSnapshotResponse generation + * @property {string|null} [ontologyVersion] GetWorkflowSnapshotResponse ontologyVersion + * @property {string|null} [identity] GetWorkflowSnapshotResponse identity + * @property {Array.|null} [nodes] GetWorkflowSnapshotResponse nodes + * @property {Array.|null} [edges] GetWorkflowSnapshotResponse edges + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a GetWorkflowSnapshotResponse. + * @memberof atomic + * @interface IGetWorkflowSnapshotResponse + * @augments atomic.GetWorkflowSnapshotResponse.$Properties + * @deprecated Use atomic.GetWorkflowSnapshotResponse.$Properties instead. + */ + + /** + * Shape of a GetWorkflowSnapshotResponse. + * @typedef {atomic.GetWorkflowSnapshotResponse.$Properties} atomic.GetWorkflowSnapshotResponse.$Shape + */ + + /** + * Constructs a new GetWorkflowSnapshotResponse. + * @memberof atomic + * @classdesc Represents a GetWorkflowSnapshotResponse. + * @constructor + * @param {atomic.GetWorkflowSnapshotResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var GetWorkflowSnapshotResponse = function (properties) { + this.nodes = []; + this.edges = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * GetWorkflowSnapshotResponse apiVersion. + * @member {number} apiVersion + * @memberof atomic.GetWorkflowSnapshotResponse + * @instance + */ + GetWorkflowSnapshotResponse.prototype.apiVersion = 0; + + /** + * GetWorkflowSnapshotResponse generation. + * @member {number} generation + * @memberof atomic.GetWorkflowSnapshotResponse + * @instance + */ + GetWorkflowSnapshotResponse.prototype.generation = 0; + + /** + * GetWorkflowSnapshotResponse ontologyVersion. + * @member {string} ontologyVersion + * @memberof atomic.GetWorkflowSnapshotResponse + * @instance + */ + GetWorkflowSnapshotResponse.prototype.ontologyVersion = ""; + + /** + * GetWorkflowSnapshotResponse identity. + * @member {string} identity + * @memberof atomic.GetWorkflowSnapshotResponse + * @instance + */ + GetWorkflowSnapshotResponse.prototype.identity = ""; + + /** + * GetWorkflowSnapshotResponse nodes. + * @member {Array.} nodes + * @memberof atomic.GetWorkflowSnapshotResponse + * @instance + */ + GetWorkflowSnapshotResponse.prototype.nodes = $util.emptyArray; + + /** + * GetWorkflowSnapshotResponse edges. + * @member {Array.} edges + * @memberof atomic.GetWorkflowSnapshotResponse + * @instance + */ + GetWorkflowSnapshotResponse.prototype.edges = $util.emptyArray; + + /** + * Creates a new GetWorkflowSnapshotResponse instance using the specified properties. + * @function create + * @memberof atomic.GetWorkflowSnapshotResponse + * @static + * @param {atomic.GetWorkflowSnapshotResponse.$Properties=} [properties] Properties to set + * @returns {atomic.GetWorkflowSnapshotResponse} GetWorkflowSnapshotResponse instance + * @type {{ + * (properties: atomic.GetWorkflowSnapshotResponse.$Shape): atomic.GetWorkflowSnapshotResponse & atomic.GetWorkflowSnapshotResponse.$Shape; + * (properties?: atomic.GetWorkflowSnapshotResponse.$Properties): atomic.GetWorkflowSnapshotResponse; + * }} + */ + GetWorkflowSnapshotResponse.create = function(properties) { + return new GetWorkflowSnapshotResponse(properties); + }; + + /** + * Encodes the specified GetWorkflowSnapshotResponse message. Does not implicitly {@link atomic.GetWorkflowSnapshotResponse.verify|verify} messages. + * @function encode + * @memberof atomic.GetWorkflowSnapshotResponse + * @static + * @param {atomic.GetWorkflowSnapshotResponse.$Properties} message GetWorkflowSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowSnapshotResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.apiVersion != null && $Object.hasOwnProperty.call(message, "apiVersion") && message.apiVersion !== 0) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.apiVersion); + if (message.generation != null && $Object.hasOwnProperty.call(message, "generation") && message.generation !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.generation); + if (message.ontologyVersion != null && $Object.hasOwnProperty.call(message, "ontologyVersion") && message.ontologyVersion !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ontologyVersion); + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity") && message.identity !== "") + writer.uint32(/* id 4, wireType 2 =*/34).string(message.identity); + if (message.nodes != null && message.nodes.length) + for (var i = 0; i < message.nodes.length; ++i) + $root.atomic.KGNode.encode(message.nodes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.edges != null && message.edges.length) + for (var i = 0; i < message.edges.length; ++i) + $root.atomic.KGEdge.encode(message.edges[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified GetWorkflowSnapshotResponse message, length delimited. Does not implicitly {@link atomic.GetWorkflowSnapshotResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.GetWorkflowSnapshotResponse + * @static + * @param {atomic.GetWorkflowSnapshotResponse.$Properties} message GetWorkflowSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkflowSnapshotResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a GetWorkflowSnapshotResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.GetWorkflowSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.GetWorkflowSnapshotResponse & atomic.GetWorkflowSnapshotResponse.$Shape} GetWorkflowSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowSnapshotResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.GetWorkflowSnapshotResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.apiVersion = value; + else + delete message.apiVersion; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.generation = value; + else + delete message.generation; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.ontologyVersion = value; + else + delete message.ontologyVersion; + continue; + } + case 4: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.identity = value; + else + delete message.identity; + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.nodes && message.nodes.length)) + message.nodes = []; + message.nodes.push($root.atomic.KGNode.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.edges && message.edges.length)) + message.edges = []; + message.edges.push($root.atomic.KGEdge.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a GetWorkflowSnapshotResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.GetWorkflowSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.GetWorkflowSnapshotResponse & atomic.GetWorkflowSnapshotResponse.$Shape} GetWorkflowSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkflowSnapshotResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a GetWorkflowSnapshotResponse message. + * @function verify + * @memberof atomic.GetWorkflowSnapshotResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkflowSnapshotResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.apiVersion != null && $Object.hasOwnProperty.call(message, "apiVersion")) + if (!$util.isInteger(message.apiVersion)) + return "apiVersion: integer expected"; + if (message.generation != null && $Object.hasOwnProperty.call(message, "generation")) + if (!$util.isInteger(message.generation)) + return "generation: integer expected"; + if (message.ontologyVersion != null && $Object.hasOwnProperty.call(message, "ontologyVersion")) + if (!$util.isString(message.ontologyVersion)) + return "ontologyVersion: string expected"; + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) + if (!$util.isString(message.identity)) + return "identity: string expected"; + if (message.nodes != null && $Object.hasOwnProperty.call(message, "nodes")) { + if (!$Array.isArray(message.nodes)) + return "nodes: array expected"; + for (var i = 0; i < message.nodes.length; ++i) { + var error = $root.atomic.KGNode.verify(message.nodes[i], _depth + 1); + if (error) + return "nodes." + error; + } + } + if (message.edges != null && $Object.hasOwnProperty.call(message, "edges")) { + if (!$Array.isArray(message.edges)) + return "edges: array expected"; + for (var i = 0; i < message.edges.length; ++i) { + var error = $root.atomic.KGEdge.verify(message.edges[i], _depth + 1); + if (error) + return "edges." + error; + } + } + return null; + }; + + /** + * Creates a GetWorkflowSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.GetWorkflowSnapshotResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.GetWorkflowSnapshotResponse} GetWorkflowSnapshotResponse + */ + GetWorkflowSnapshotResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetWorkflowSnapshotResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.GetWorkflowSnapshotResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.GetWorkflowSnapshotResponse(); + if (object.apiVersion != null) + if ($Number(object.apiVersion) !== 0) + message.apiVersion = object.apiVersion >>> 0; + if (object.generation != null) + if ($Number(object.generation) !== 0) + message.generation = object.generation >>> 0; + if (object.ontologyVersion != null) + if (typeof object.ontologyVersion !== "string" || object.ontologyVersion.length) + message.ontologyVersion = $String(object.ontologyVersion); + if (object.identity != null) + if (typeof object.identity !== "string" || object.identity.length) + message.identity = $String(object.identity); + if (object.nodes) { + if (!$Array.isArray(object.nodes)) + throw $TypeError(".atomic.GetWorkflowSnapshotResponse.nodes: array expected"); + message.nodes = $Array(object.nodes.length); + for (var i = 0; i < object.nodes.length; ++i) { + if (!$util.isObject(object.nodes[i])) + throw $TypeError(".atomic.GetWorkflowSnapshotResponse.nodes: object expected"); + message.nodes[i] = $root.atomic.KGNode.fromObject(object.nodes[i], _depth + 1); + } + } + if (object.edges) { + if (!$Array.isArray(object.edges)) + throw $TypeError(".atomic.GetWorkflowSnapshotResponse.edges: array expected"); + message.edges = $Array(object.edges.length); + for (var i = 0; i < object.edges.length; ++i) { + if (!$util.isObject(object.edges[i])) + throw $TypeError(".atomic.GetWorkflowSnapshotResponse.edges: object expected"); + message.edges[i] = $root.atomic.KGEdge.fromObject(object.edges[i], _depth + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a GetWorkflowSnapshotResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.GetWorkflowSnapshotResponse + * @static + * @param {atomic.GetWorkflowSnapshotResponse} message GetWorkflowSnapshotResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkflowSnapshotResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) { + object.nodes = []; + object.edges = []; + } + if (options.defaults) { + object.apiVersion = 0; + object.generation = 0; + object.ontologyVersion = ""; + object.identity = ""; + } + if (message.apiVersion != null && $Object.hasOwnProperty.call(message, "apiVersion")) + object.apiVersion = message.apiVersion; + if (message.generation != null && $Object.hasOwnProperty.call(message, "generation")) + object.generation = message.generation; + if (message.ontologyVersion != null && $Object.hasOwnProperty.call(message, "ontologyVersion")) + object.ontologyVersion = message.ontologyVersion; + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) + object.identity = message.identity; + if (message.nodes && message.nodes.length) { + object.nodes = $Array(message.nodes.length); + for (var j = 0; j < message.nodes.length; ++j) + object.nodes[j] = $root.atomic.KGNode.toObject(message.nodes[j], options, _depth + 1); + } + if (message.edges && message.edges.length) { + object.edges = $Array(message.edges.length); + for (var j = 0; j < message.edges.length; ++j) + object.edges[j] = $root.atomic.KGEdge.toObject(message.edges[j], options, _depth + 1); + } + return object; + }; + + /** + * Converts this GetWorkflowSnapshotResponse to JSON. + * @function toJSON + * @memberof atomic.GetWorkflowSnapshotResponse + * @instance + * @returns {Object.} JSON object + */ + GetWorkflowSnapshotResponse.prototype.toJSON = function() { + return GetWorkflowSnapshotResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for GetWorkflowSnapshotResponse + * @function getTypeUrl + * @memberof atomic.GetWorkflowSnapshotResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + GetWorkflowSnapshotResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.GetWorkflowSnapshotResponse"; + }; + + return GetWorkflowSnapshotResponse; + })(); + + atomic.MaintainKnowledgeGraphRequest = (function() { + + /** + * Properties of a MaintainKnowledgeGraphRequest. + * @typedef {Object} atomic.MaintainKnowledgeGraphRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] MaintainKnowledgeGraphRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] MaintainKnowledgeGraphRequest meta + * @property {atomic.KnowledgeMaintainAction|null} [action] MaintainKnowledgeGraphRequest action + * @property {string|null} [scope] MaintainKnowledgeGraphRequest scope + * @property {Array.|null} [changes] MaintainKnowledgeGraphRequest changes + * @property {Object.|null} [signerAuthHeaders] MaintainKnowledgeGraphRequest signerAuthHeaders + * @property {string|null} [signerRemoteUrl] MaintainKnowledgeGraphRequest signerRemoteUrl + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MaintainKnowledgeGraphRequest. + * @memberof atomic + * @interface IMaintainKnowledgeGraphRequest + * @augments atomic.MaintainKnowledgeGraphRequest.$Properties + * @deprecated Use atomic.MaintainKnowledgeGraphRequest.$Properties instead. + */ + + /** + * Shape of a MaintainKnowledgeGraphRequest. + * @typedef {atomic.MaintainKnowledgeGraphRequest.$Properties} atomic.MaintainKnowledgeGraphRequest.$Shape + */ + + /** + * Constructs a new MaintainKnowledgeGraphRequest. + * @memberof atomic + * @classdesc Represents a MaintainKnowledgeGraphRequest. + * @constructor + * @param {atomic.MaintainKnowledgeGraphRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var MaintainKnowledgeGraphRequest = function (properties) { + this.changes = []; + this.signerAuthHeaders = {}; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * MaintainKnowledgeGraphRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.MaintainKnowledgeGraphRequest + * @instance + */ + MaintainKnowledgeGraphRequest.prototype.repository = null; + + /** + * MaintainKnowledgeGraphRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.MaintainKnowledgeGraphRequest + * @instance + */ + MaintainKnowledgeGraphRequest.prototype.meta = null; + + /** + * MaintainKnowledgeGraphRequest action. + * @member {atomic.KnowledgeMaintainAction} action + * @memberof atomic.MaintainKnowledgeGraphRequest + * @instance + */ + MaintainKnowledgeGraphRequest.prototype.action = 0; + + /** + * MaintainKnowledgeGraphRequest scope. + * @member {string|null|undefined} scope + * @memberof atomic.MaintainKnowledgeGraphRequest + * @instance + */ + MaintainKnowledgeGraphRequest.prototype.scope = null; + + /** + * MaintainKnowledgeGraphRequest changes. + * @member {Array.} changes + * @memberof atomic.MaintainKnowledgeGraphRequest + * @instance + */ + MaintainKnowledgeGraphRequest.prototype.changes = $util.emptyArray; + + /** + * MaintainKnowledgeGraphRequest signerAuthHeaders. + * @member {Object.} signerAuthHeaders + * @memberof atomic.MaintainKnowledgeGraphRequest + * @instance + */ + MaintainKnowledgeGraphRequest.prototype.signerAuthHeaders = $util.emptyObject; + + /** + * MaintainKnowledgeGraphRequest signerRemoteUrl. + * @member {string|null|undefined} signerRemoteUrl + * @memberof atomic.MaintainKnowledgeGraphRequest + * @instance + */ + MaintainKnowledgeGraphRequest.prototype.signerRemoteUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(MaintainKnowledgeGraphRequest.prototype, "_scope", { + get: $util.oneOfGetter($oneOfFields = ["scope"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(MaintainKnowledgeGraphRequest.prototype, "_signer_remote_url", { + get: $util.oneOfGetter($oneOfFields = ["signerRemoteUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MaintainKnowledgeGraphRequest instance using the specified properties. + * @function create + * @memberof atomic.MaintainKnowledgeGraphRequest + * @static + * @param {atomic.MaintainKnowledgeGraphRequest.$Properties=} [properties] Properties to set + * @returns {atomic.MaintainKnowledgeGraphRequest} MaintainKnowledgeGraphRequest instance + * @type {{ + * (properties: atomic.MaintainKnowledgeGraphRequest.$Shape): atomic.MaintainKnowledgeGraphRequest & atomic.MaintainKnowledgeGraphRequest.$Shape; + * (properties?: atomic.MaintainKnowledgeGraphRequest.$Properties): atomic.MaintainKnowledgeGraphRequest; + * }} + */ + MaintainKnowledgeGraphRequest.create = function(properties) { + return new MaintainKnowledgeGraphRequest(properties); + }; + + /** + * Encodes the specified MaintainKnowledgeGraphRequest message. Does not implicitly {@link atomic.MaintainKnowledgeGraphRequest.verify|verify} messages. + * @function encode + * @memberof atomic.MaintainKnowledgeGraphRequest + * @static + * @param {atomic.MaintainKnowledgeGraphRequest.$Properties} message MaintainKnowledgeGraphRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintainKnowledgeGraphRequest.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + $root.atomic.RepositoryRef.encode(message.repository, writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.RequestMeta.encode(message.meta, writer.uint32(/* id 2, wireType 2 =*/18).fork(), _depth + 1).ldelim(); + if (message.action != null && $Object.hasOwnProperty.call(message, "action") && message.action !== 0) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.action); + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.scope); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.atomic.Hash.encode(message.changes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), _depth + 1).ldelim(); + if (message.signerAuthHeaders != null && $Object.hasOwnProperty.call(message, "signerAuthHeaders")) + for (var keys = $Object.keys(message.signerAuthHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.signerAuthHeaders[keys[i]]).ldelim(); + if (message.signerRemoteUrl != null && $Object.hasOwnProperty.call(message, "signerRemoteUrl")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.signerRemoteUrl); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified MaintainKnowledgeGraphRequest message, length delimited. Does not implicitly {@link atomic.MaintainKnowledgeGraphRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.MaintainKnowledgeGraphRequest + * @static + * @param {atomic.MaintainKnowledgeGraphRequest.$Properties} message MaintainKnowledgeGraphRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintainKnowledgeGraphRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a MaintainKnowledgeGraphRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.MaintainKnowledgeGraphRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.MaintainKnowledgeGraphRequest & atomic.MaintainKnowledgeGraphRequest.$Shape} MaintainKnowledgeGraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintainKnowledgeGraphRequest.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, key, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.MaintainKnowledgeGraphRequest(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 2) + break; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.meta = $root.atomic.RequestMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + case 3: { + if (wireType !== 0) + break; + if (value = reader.int32()) + message.action = value; + else + delete message.action; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.scope = reader.stringVerify(); + message._scope = "scope"; + continue; + } + case 5: { + if (wireType !== 2) + break; + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 6: { + if (wireType !== 2) + break; + if (message.signerAuthHeaders === $util.emptyObject) + message.signerAuthHeaders = {}; + var end2 = reader.size() + reader.pos; + if (end2 > reader.len) + throw $RangeError("index out of range"); + reader.len = end2; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.tag(); + wireType = tag2 & 7; + switch (tag2 >>>= 3) { + case 1: + if (wireType !== 2) + break; + key = reader.stringVerify(); + continue; + case 2: + if (wireType !== 2) + break; + value = reader.stringVerify(); + continue; + } + reader.skipType(wireType, _depth, tag2); + } + if (reader.pos !== end2) + throw $RangeError("index out of range"); + reader.len = end; + if (key === "__proto__") + $util.makeProp(message.signerAuthHeaders, key); + message.signerAuthHeaders[key] = value; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.signerRemoteUrl = reader.stringVerify(); + message._signer_remote_url = "signerRemoteUrl"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a MaintainKnowledgeGraphRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.MaintainKnowledgeGraphRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.MaintainKnowledgeGraphRequest & atomic.MaintainKnowledgeGraphRequest.$Shape} MaintainKnowledgeGraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintainKnowledgeGraphRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a MaintainKnowledgeGraphRequest message. + * @function verify + * @memberof atomic.MaintainKnowledgeGraphRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintainKnowledgeGraphRequest.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; + } + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.RequestMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) + if (typeof message.action !== "number" || (message.action | 0) !== message.action) + return "action: enum value expected"; + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope")) { + properties._scope = 1; + if (!$util.isString(message.scope)) + return "scope: string expected"; + } + if (message.changes != null && $Object.hasOwnProperty.call(message, "changes")) { + if (!$Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.atomic.Hash.verify(message.changes[i], _depth + 1); + if (error) + return "changes." + error; + } + } + if (message.signerAuthHeaders != null && $Object.hasOwnProperty.call(message, "signerAuthHeaders")) { + if (!$util.isObject(message.signerAuthHeaders)) + return "signerAuthHeaders: object expected"; + var key = $Object.keys(message.signerAuthHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.signerAuthHeaders[key[i]])) + return "signerAuthHeaders: string{k:string} expected"; + } + if (message.signerRemoteUrl != null && $Object.hasOwnProperty.call(message, "signerRemoteUrl")) { + properties._signer_remote_url = 1; + if (!$util.isString(message.signerRemoteUrl)) + return "signerRemoteUrl: string expected"; + } + return null; + }; + + /** + * Creates a MaintainKnowledgeGraphRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.MaintainKnowledgeGraphRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.MaintainKnowledgeGraphRequest} MaintainKnowledgeGraphRequest + */ + MaintainKnowledgeGraphRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.MaintainKnowledgeGraphRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.MaintainKnowledgeGraphRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.MaintainKnowledgeGraphRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.MaintainKnowledgeGraphRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.MaintainKnowledgeGraphRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.action !== 0 && (typeof object.action !== "string" || $root.atomic.KnowledgeMaintainAction[object.action] !== 0)) + switch (object.action) { + case "KNOWLEDGE_MAINTAIN_ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "KNOWLEDGE_MAINTAIN_ACTION_EMBED": + case 1: + message.action = 1; + break; + case "KNOWLEDGE_MAINTAIN_ACTION_ENRICH": + case 2: + message.action = 2; + break; + case "KNOWLEDGE_MAINTAIN_ACTION_REINDEX": + case 3: + message.action = 3; + break; + default: + if (typeof object.action === "number" && (object.action | 0) === object.action) + message.action = object.action; + } + if (object.scope != null) + message.scope = $String(object.scope); + if (object.changes) { + if (!$Array.isArray(object.changes)) + throw $TypeError(".atomic.MaintainKnowledgeGraphRequest.changes: array expected"); + message.changes = $Array(object.changes.length); + for (var i = 0; i < object.changes.length; ++i) { + if (!$util.isObject(object.changes[i])) + throw $TypeError(".atomic.MaintainKnowledgeGraphRequest.changes: object expected"); + message.changes[i] = $root.atomic.Hash.fromObject(object.changes[i], _depth + 1); + } + } + if (object.signerAuthHeaders) { + if (!$util.isObject(object.signerAuthHeaders)) + throw $TypeError(".atomic.MaintainKnowledgeGraphRequest.signerAuthHeaders: object expected"); + message.signerAuthHeaders = {}; + for (var keys = $Object.keys(object.signerAuthHeaders), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.signerAuthHeaders, keys[i]); + message.signerAuthHeaders[keys[i]] = $String(object.signerAuthHeaders[keys[i]]); + } + } + if (object.signerRemoteUrl != null) + message.signerRemoteUrl = $String(object.signerRemoteUrl); + return message; + }; + + /** + * Creates a plain object from a MaintainKnowledgeGraphRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.MaintainKnowledgeGraphRequest + * @static + * @param {atomic.MaintainKnowledgeGraphRequest} message MaintainKnowledgeGraphRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintainKnowledgeGraphRequest.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.objects || options.defaults) + object.signerAuthHeaders = {}; + if (options.defaults) { + object.repository = null; + object.meta = null; + object.action = options.enums === $String ? "KNOWLEDGE_MAINTAIN_ACTION_UNSPECIFIED" : 0; + } + if (message.repository != null && $Object.hasOwnProperty.call(message, "repository")) + object.repository = $root.atomic.RepositoryRef.toObject(message.repository, options, _depth + 1); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.RequestMeta.toObject(message.meta, options, _depth + 1); + if (message.action != null && $Object.hasOwnProperty.call(message, "action")) + object.action = options.enums === $String ? $root.atomic.KnowledgeMaintainAction[message.action] === $undefined ? message.action : $root.atomic.KnowledgeMaintainAction[message.action] : message.action; + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope")) + object.scope = message.scope; + if (message.changes && message.changes.length) { + object.changes = $Array(message.changes.length); + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.atomic.Hash.toObject(message.changes[j], options, _depth + 1); + } + var keys2; + if (message.signerAuthHeaders && (keys2 = $Object.keys(message.signerAuthHeaders)).length) { + object.signerAuthHeaders = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.signerAuthHeaders, keys2[j]); + object.signerAuthHeaders[keys2[j]] = message.signerAuthHeaders[keys2[j]]; + } + } + if (message.signerRemoteUrl != null && $Object.hasOwnProperty.call(message, "signerRemoteUrl")) + object.signerRemoteUrl = message.signerRemoteUrl; + return object; + }; + + /** + * Converts this MaintainKnowledgeGraphRequest to JSON. + * @function toJSON + * @memberof atomic.MaintainKnowledgeGraphRequest + * @instance + * @returns {Object.} JSON object + */ + MaintainKnowledgeGraphRequest.prototype.toJSON = function() { + return MaintainKnowledgeGraphRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MaintainKnowledgeGraphRequest + * @function getTypeUrl + * @memberof atomic.MaintainKnowledgeGraphRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MaintainKnowledgeGraphRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.MaintainKnowledgeGraphRequest"; + }; + + return MaintainKnowledgeGraphRequest; + })(); + + /** + * KnowledgeMaintainAction enum. + * @name atomic.KnowledgeMaintainAction + * @enum {number} + * @property {number} KNOWLEDGE_MAINTAIN_ACTION_UNSPECIFIED=0 KNOWLEDGE_MAINTAIN_ACTION_UNSPECIFIED value + * @property {number} KNOWLEDGE_MAINTAIN_ACTION_EMBED=1 KNOWLEDGE_MAINTAIN_ACTION_EMBED value + * @property {number} KNOWLEDGE_MAINTAIN_ACTION_ENRICH=2 KNOWLEDGE_MAINTAIN_ACTION_ENRICH value + * @property {number} KNOWLEDGE_MAINTAIN_ACTION_REINDEX=3 KNOWLEDGE_MAINTAIN_ACTION_REINDEX value + */ + atomic.KnowledgeMaintainAction = (function() { + var valuesById = $Object.create(null), values = $Object.create(valuesById); + values[valuesById[0] = "KNOWLEDGE_MAINTAIN_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "KNOWLEDGE_MAINTAIN_ACTION_EMBED"] = 1; + values[valuesById[2] = "KNOWLEDGE_MAINTAIN_ACTION_ENRICH"] = 2; + values[valuesById[3] = "KNOWLEDGE_MAINTAIN_ACTION_REINDEX"] = 3; + return values; + })(); + + atomic.MaintainKnowledgeGraphResponse = (function() { + + /** + * Properties of a MaintainKnowledgeGraphResponse. + * @typedef {Object} atomic.MaintainKnowledgeGraphResponse.$Properties + * @property {number|Long|null} [processed] MaintainKnowledgeGraphResponse processed + * @property {atomic.ResponseMeta.$Properties|null} [meta] MaintainKnowledgeGraphResponse meta + * @property {string|null} [provider] MaintainKnowledgeGraphResponse provider + * @property {number|null} [dimensions] MaintainKnowledgeGraphResponse dimensions + * @property {string|null} [path] MaintainKnowledgeGraphResponse path + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a MaintainKnowledgeGraphResponse. + * @memberof atomic + * @interface IMaintainKnowledgeGraphResponse + * @augments atomic.MaintainKnowledgeGraphResponse.$Properties + * @deprecated Use atomic.MaintainKnowledgeGraphResponse.$Properties instead. + */ + + /** + * Shape of a MaintainKnowledgeGraphResponse. + * @typedef {atomic.MaintainKnowledgeGraphResponse.$Properties} atomic.MaintainKnowledgeGraphResponse.$Shape + */ + + /** + * Constructs a new MaintainKnowledgeGraphResponse. + * @memberof atomic + * @classdesc Represents a MaintainKnowledgeGraphResponse. + * @constructor + * @param {atomic.MaintainKnowledgeGraphResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var MaintainKnowledgeGraphResponse = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * MaintainKnowledgeGraphResponse processed. + * @member {number|Long} processed + * @memberof atomic.MaintainKnowledgeGraphResponse + * @instance + */ + MaintainKnowledgeGraphResponse.prototype.processed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MaintainKnowledgeGraphResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.MaintainKnowledgeGraphResponse + * @instance + */ + MaintainKnowledgeGraphResponse.prototype.meta = null; + + /** + * MaintainKnowledgeGraphResponse provider. + * @member {string|null|undefined} provider + * @memberof atomic.MaintainKnowledgeGraphResponse + * @instance + */ + MaintainKnowledgeGraphResponse.prototype.provider = null; + + /** + * MaintainKnowledgeGraphResponse dimensions. + * @member {number|null|undefined} dimensions + * @memberof atomic.MaintainKnowledgeGraphResponse + * @instance + */ + MaintainKnowledgeGraphResponse.prototype.dimensions = null; + + /** + * MaintainKnowledgeGraphResponse path. + * @member {string|null|undefined} path + * @memberof atomic.MaintainKnowledgeGraphResponse + * @instance + */ + MaintainKnowledgeGraphResponse.prototype.path = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(MaintainKnowledgeGraphResponse.prototype, "_provider", { + get: $util.oneOfGetter($oneOfFields = ["provider"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(MaintainKnowledgeGraphResponse.prototype, "_dimensions", { + get: $util.oneOfGetter($oneOfFields = ["dimensions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(MaintainKnowledgeGraphResponse.prototype, "_path", { + get: $util.oneOfGetter($oneOfFields = ["path"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MaintainKnowledgeGraphResponse instance using the specified properties. + * @function create + * @memberof atomic.MaintainKnowledgeGraphResponse + * @static + * @param {atomic.MaintainKnowledgeGraphResponse.$Properties=} [properties] Properties to set + * @returns {atomic.MaintainKnowledgeGraphResponse} MaintainKnowledgeGraphResponse instance + * @type {{ + * (properties: atomic.MaintainKnowledgeGraphResponse.$Shape): atomic.MaintainKnowledgeGraphResponse & atomic.MaintainKnowledgeGraphResponse.$Shape; + * (properties?: atomic.MaintainKnowledgeGraphResponse.$Properties): atomic.MaintainKnowledgeGraphResponse; + * }} + */ + MaintainKnowledgeGraphResponse.create = function(properties) { + return new MaintainKnowledgeGraphResponse(properties); + }; + + /** + * Encodes the specified MaintainKnowledgeGraphResponse message. Does not implicitly {@link atomic.MaintainKnowledgeGraphResponse.verify|verify} messages. + * @function encode + * @memberof atomic.MaintainKnowledgeGraphResponse + * @static + * @param {atomic.MaintainKnowledgeGraphResponse.$Properties} message MaintainKnowledgeGraphResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintainKnowledgeGraphResponse.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.processed != null && $Object.hasOwnProperty.call(message, "processed") && (typeof message.processed === "object" ? message.processed.low || message.processed.high : message.processed !== 0)) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.processed); + if (message.provider != null && $Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.provider); + if (message.dimensions != null && $Object.hasOwnProperty.call(message, "dimensions")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.dimensions); + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.path); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + $root.atomic.ResponseMeta.encode(message.meta, writer.uint32(/* id 100, wireType 2 =*/802).fork(), _depth + 1).ldelim(); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified MaintainKnowledgeGraphResponse message, length delimited. Does not implicitly {@link atomic.MaintainKnowledgeGraphResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.MaintainKnowledgeGraphResponse + * @static + * @param {atomic.MaintainKnowledgeGraphResponse.$Properties} message MaintainKnowledgeGraphResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintainKnowledgeGraphResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a MaintainKnowledgeGraphResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.MaintainKnowledgeGraphResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.MaintainKnowledgeGraphResponse & atomic.MaintainKnowledgeGraphResponse.$Shape} MaintainKnowledgeGraphResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintainKnowledgeGraphResponse.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.atomic.MaintainKnowledgeGraphResponse(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.processed = value; + else + delete message.processed; + continue; + } + case 100: { + if (wireType !== 2) + break; + message.meta = $root.atomic.ResponseMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + case 2: { + if (wireType !== 2) + break; + message.provider = reader.stringVerify(); + message._provider = "provider"; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.dimensions = reader.uint32(); + message._dimensions = "dimensions"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.path = reader.stringVerify(); + message._path = "path"; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a MaintainKnowledgeGraphResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.MaintainKnowledgeGraphResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.MaintainKnowledgeGraphResponse & atomic.MaintainKnowledgeGraphResponse.$Shape} MaintainKnowledgeGraphResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintainKnowledgeGraphResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a MaintainKnowledgeGraphResponse message. + * @function verify + * @memberof atomic.MaintainKnowledgeGraphResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintainKnowledgeGraphResponse.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + var properties = {}; + if (message.processed != null && $Object.hasOwnProperty.call(message, "processed")) + if (!$util.isInteger(message.processed) && !(message.processed && $util.isInteger(message.processed.low) && $util.isInteger(message.processed.high))) + return "processed: integer|Long expected"; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.ResponseMeta.verify(message.meta, _depth + 1); + if (error) + return "meta." + error; + } + if (message.provider != null && $Object.hasOwnProperty.call(message, "provider")) { + properties._provider = 1; + if (!$util.isString(message.provider)) + return "provider: string expected"; + } + if (message.dimensions != null && $Object.hasOwnProperty.call(message, "dimensions")) { + properties._dimensions = 1; + if (!$util.isInteger(message.dimensions)) + return "dimensions: integer expected"; + } + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) { + properties._path = 1; + if (!$util.isString(message.path)) + return "path: string expected"; + } + return null; + }; + + /** + * Creates a MaintainKnowledgeGraphResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.MaintainKnowledgeGraphResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.MaintainKnowledgeGraphResponse} MaintainKnowledgeGraphResponse + */ + MaintainKnowledgeGraphResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.MaintainKnowledgeGraphResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.MaintainKnowledgeGraphResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.MaintainKnowledgeGraphResponse(); + if (object.processed != null) + if (typeof object.processed === "object" ? object.processed.low || object.processed.high : $Number(object.processed) !== 0) + if ($util.Long) + message.processed = $util.Long.fromValue(object.processed, true); + else if (typeof object.processed === "string") + message.processed = $parseInt(object.processed, 10); + else if (typeof object.processed === "number") + message.processed = object.processed; + else if (typeof object.processed === "object") + message.processed = new $util.LongBits(object.processed.low >>> 0, object.processed.high >>> 0).toNumber(true); + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.MaintainKnowledgeGraphResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _depth + 1); + } + if (object.provider != null) + message.provider = $String(object.provider); + if (object.dimensions != null) + message.dimensions = object.dimensions >>> 0; + if (object.path != null) + message.path = $String(object.path); + return message; + }; + + /** + * Creates a plain object from a MaintainKnowledgeGraphResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.MaintainKnowledgeGraphResponse + * @static + * @param {atomic.MaintainKnowledgeGraphResponse} message MaintainKnowledgeGraphResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintainKnowledgeGraphResponse.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.processed = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.processed = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.meta = null; + } + if (message.processed != null && $Object.hasOwnProperty.call(message, "processed")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.processed = typeof message.processed === "number" ? $BigInt(message.processed) : $util.Long.fromBits(message.processed.low >>> 0, message.processed.high >>> 0, true).toBigInt(); + else if (typeof message.processed === "number") + object.processed = options.longs === $String ? $String(message.processed) : message.processed; + else + object.processed = options.longs === $String ? $util.Long.prototype.toString.call(message.processed) : options.longs === $Number ? new $util.LongBits(message.processed.low >>> 0, message.processed.high >>> 0).toNumber(true) : message.processed; + if (message.provider != null && $Object.hasOwnProperty.call(message, "provider")) + object.provider = message.provider; + if (message.dimensions != null && $Object.hasOwnProperty.call(message, "dimensions")) + object.dimensions = message.dimensions; + if (message.path != null && $Object.hasOwnProperty.call(message, "path")) + object.path = message.path; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.ResponseMeta.toObject(message.meta, options, _depth + 1); + return object; + }; + + /** + * Converts this MaintainKnowledgeGraphResponse to JSON. + * @function toJSON + * @memberof atomic.MaintainKnowledgeGraphResponse + * @instance + * @returns {Object.} JSON object + */ + MaintainKnowledgeGraphResponse.prototype.toJSON = function() { + return MaintainKnowledgeGraphResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for MaintainKnowledgeGraphResponse + * @function getTypeUrl + * @memberof atomic.MaintainKnowledgeGraphResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + MaintainKnowledgeGraphResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.MaintainKnowledgeGraphResponse"; + }; + + return MaintainKnowledgeGraphResponse; + })(); + + return atomic; +})(); + +$root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @typedef {Object} google.protobuf.Timestamp.$Properties + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @augments google.protobuf.Timestamp.$Properties + * @deprecated Use google.protobuf.Timestamp.$Properties instead. + */ + + /** + * Shape of a Timestamp. + * @typedef {google.protobuf.Timestamp.$Properties} google.protobuf.Timestamp.$Shape + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @constructor + * @param {google.protobuf.Timestamp.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var Timestamp = function (properties) { + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp.$Properties=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + * @type {{ + * (properties: google.protobuf.Timestamp.$Shape): google.protobuf.Timestamp & google.protobuf.Timestamp.$Shape; + * (properties?: google.protobuf.Timestamp.$Properties): google.protobuf.Timestamp; + * }} + */ + Timestamp.create = function(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp.$Properties} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function (message, writer, _depth) { + if (!writer) + writer = $Writer.create(); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + if (message.seconds != null && $Object.hasOwnProperty.call(message, "seconds") && (typeof message.seconds === "object" ? message.seconds.low || message.seconds.high : message.seconds !== 0)) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && $Object.hasOwnProperty.call(message, "nanos") && message.nanos !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) + for (var i = 0; i < message.$unknowns.length; ++i) + writer.raw(message.$unknowns[i]); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp.$Properties} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp & google.protobuf.Timestamp.$Shape} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function (reader, length, _end, _depth, _target) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (_depth === $undefined) + _depth = 0; + if (_depth > $Reader.recursionLimit) + throw $Error("max depth exceeded"); + var end, message, value; + if (length === $undefined) + end = reader.len; + else { + end = reader.pos + length; + if (end > reader.len) + throw $RangeError("index out of range"); + length = reader.len; + reader.len = end; + } + message = _target || new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + var wireType = tag & 7; + switch (tag >>>= 3) { + case 1: { + if (wireType !== 0) + break; + if (typeof (value = reader.int64()) === "object" ? value.low || value.high : value !== 0) + message.seconds = value; + else + delete message.seconds; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (value = reader.int32()) + message.nanos = value; + else + delete message.nanos; + continue; + } + } + reader.skipType(wireType, _depth, tag); + if (!reader.discardUnknown) { + $util.makeProp(message, "$unknowns", false); + (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos)); + } + } + if (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; + } + if (_end !== $undefined) + throw $Error("missing end group"); + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp & google.protobuf.Timestamp.$Shape} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function (message, _depth) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + return "max depth exceeded"; + if (message.seconds != null && $Object.hasOwnProperty.call(message, "seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && $Object.hasOwnProperty.call(message, "nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function (object, _depth) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + if (!$util.isObject(object)) + throw $TypeError(".google.protobuf.Timestamp: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if (typeof object.seconds === "object" ? object.seconds.low || object.seconds.high : $Number(object.seconds) !== 0) + if ($util.Long) + message.seconds = $util.Long.fromValue(object.seconds, false); + else if (typeof object.seconds === "string") + message.seconds = $parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + if ($Number(object.nanos) !== 0) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function (message, options, _depth) { + if (!options) + options = {}; + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.seconds = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.nanos = 0; + } + if (message.seconds != null && $Object.hasOwnProperty.call(message, "seconds")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.seconds = typeof message.seconds === "number" ? $BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); + else if (typeof message.seconds === "number") + object.seconds = options.longs === $String ? $String(message.seconds) : message.seconds; + else + object.seconds = options.longs === $String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === $Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && $Object.hasOwnProperty.call(message, "nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function() { + return Timestamp.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + Timestamp.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + return google; +})(); + +module.exports = $root; diff --git a/vendor/nodeatomic/dist/generated/proto.d.cts b/vendor/nodeatomic/dist/generated/proto.d.cts new file mode 100644 index 0000000..e470d27 --- /dev/null +++ b/vendor/nodeatomic/dist/generated/proto.d.cts @@ -0,0 +1,13067 @@ +import * as $protobuf from "protobufjs"; +import Long = require("long"); + +/** Namespace atomic. */ +export namespace atomic { + + /** + * Properties of a ResolveRepositoryRequest. + * @deprecated Use atomic.ResolveRepositoryRequest.$Properties instead. + */ + interface IResolveRepositoryRequest extends atomic.ResolveRepositoryRequest.$Properties { + } + + /** Represents a ResolveRepositoryRequest. */ + class ResolveRepositoryRequest { + + /** + * Constructs a new ResolveRepositoryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ResolveRepositoryRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ResolveRepositoryRequest path. */ + path: string; + + /** + * Creates a new ResolveRepositoryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResolveRepositoryRequest instance + */ + static create(properties: atomic.ResolveRepositoryRequest.$Shape): atomic.ResolveRepositoryRequest & atomic.ResolveRepositoryRequest.$Shape; + static create(properties?: atomic.ResolveRepositoryRequest.$Properties): atomic.ResolveRepositoryRequest; + + /** + * Encodes the specified ResolveRepositoryRequest message. Does not implicitly {@link atomic.ResolveRepositoryRequest.verify|verify} messages. + * @param message ResolveRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ResolveRepositoryRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResolveRepositoryRequest message, length delimited. Does not implicitly {@link atomic.ResolveRepositoryRequest.verify|verify} messages. + * @param message ResolveRepositoryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ResolveRepositoryRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResolveRepositoryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ResolveRepositoryRequest & atomic.ResolveRepositoryRequest.$Shape} ResolveRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ResolveRepositoryRequest & atomic.ResolveRepositoryRequest.$Shape; + + /** + * Decodes a ResolveRepositoryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ResolveRepositoryRequest & atomic.ResolveRepositoryRequest.$Shape} ResolveRepositoryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ResolveRepositoryRequest & atomic.ResolveRepositoryRequest.$Shape; + + /** + * Verifies a ResolveRepositoryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResolveRepositoryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResolveRepositoryRequest + */ + static fromObject(object: { [k: string]: any }): atomic.ResolveRepositoryRequest; + + /** + * Creates a plain object from a ResolveRepositoryRequest message. Also converts values to other types if specified. + * @param message ResolveRepositoryRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ResolveRepositoryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResolveRepositoryRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ResolveRepositoryRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ResolveRepositoryRequest { + + /** Properties of a ResolveRepositoryRequest. */ + interface $Properties { + + /** ResolveRepositoryRequest path */ + path?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ResolveRepositoryRequest. */ + type $Shape = atomic.ResolveRepositoryRequest.$Properties; + } + + /** + * Properties of a ResolveRepositoryResponse. + * @deprecated Use atomic.ResolveRepositoryResponse.$Properties instead. + */ + interface IResolveRepositoryResponse extends atomic.ResolveRepositoryResponse.$Properties { + } + + /** Represents a ResolveRepositoryResponse. */ + class ResolveRepositoryResponse { + + /** + * Constructs a new ResolveRepositoryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ResolveRepositoryResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ResolveRepositoryResponse repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** ResolveRepositoryResponse workspace. */ + workspace?: (atomic.WorkspaceInfo.$Properties|null); + + /** + * Creates a new ResolveRepositoryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ResolveRepositoryResponse instance + */ + static create(properties: atomic.ResolveRepositoryResponse.$Shape): atomic.ResolveRepositoryResponse & atomic.ResolveRepositoryResponse.$Shape; + static create(properties?: atomic.ResolveRepositoryResponse.$Properties): atomic.ResolveRepositoryResponse; + + /** + * Encodes the specified ResolveRepositoryResponse message. Does not implicitly {@link atomic.ResolveRepositoryResponse.verify|verify} messages. + * @param message ResolveRepositoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ResolveRepositoryResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResolveRepositoryResponse message, length delimited. Does not implicitly {@link atomic.ResolveRepositoryResponse.verify|verify} messages. + * @param message ResolveRepositoryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ResolveRepositoryResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResolveRepositoryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ResolveRepositoryResponse & atomic.ResolveRepositoryResponse.$Shape} ResolveRepositoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ResolveRepositoryResponse & atomic.ResolveRepositoryResponse.$Shape; + + /** + * Decodes a ResolveRepositoryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ResolveRepositoryResponse & atomic.ResolveRepositoryResponse.$Shape} ResolveRepositoryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ResolveRepositoryResponse & atomic.ResolveRepositoryResponse.$Shape; + + /** + * Verifies a ResolveRepositoryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResolveRepositoryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResolveRepositoryResponse + */ + static fromObject(object: { [k: string]: any }): atomic.ResolveRepositoryResponse; + + /** + * Creates a plain object from a ResolveRepositoryResponse message. Also converts values to other types if specified. + * @param message ResolveRepositoryResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ResolveRepositoryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResolveRepositoryResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ResolveRepositoryResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ResolveRepositoryResponse { + + /** Properties of a ResolveRepositoryResponse. */ + interface $Properties { + + /** ResolveRepositoryResponse repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** ResolveRepositoryResponse workspace */ + workspace?: (atomic.WorkspaceInfo.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ResolveRepositoryResponse. */ + type $Shape = atomic.ResolveRepositoryResponse.$Properties; + } + + /** + * Properties of a RepositoryRef. + * @deprecated Use atomic.RepositoryRef.$Properties instead. + */ + interface IRepositoryRef extends atomic.RepositoryRef.$Properties { + } + + /** Represents a RepositoryRef. */ + class RepositoryRef { + + /** + * Constructs a new RepositoryRef. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.RepositoryRef.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** RepositoryRef authority. */ + authority: string; + + /** RepositoryRef repositoryId. */ + repositoryId: Uint8Array; + + /** RepositoryRef workspaceId. */ + workspaceId?: (string|null); + + /** + * Creates a new RepositoryRef instance using the specified properties. + * @param [properties] Properties to set + * @returns RepositoryRef instance + */ + static create(properties: atomic.RepositoryRef.$Shape): atomic.RepositoryRef & atomic.RepositoryRef.$Shape; + static create(properties?: atomic.RepositoryRef.$Properties): atomic.RepositoryRef; + + /** + * Encodes the specified RepositoryRef message. Does not implicitly {@link atomic.RepositoryRef.verify|verify} messages. + * @param message RepositoryRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.RepositoryRef.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepositoryRef message, length delimited. Does not implicitly {@link atomic.RepositoryRef.verify|verify} messages. + * @param message RepositoryRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.RepositoryRef.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepositoryRef message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.RepositoryRef & atomic.RepositoryRef.$Shape} RepositoryRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.RepositoryRef & atomic.RepositoryRef.$Shape; + + /** + * Decodes a RepositoryRef message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.RepositoryRef & atomic.RepositoryRef.$Shape} RepositoryRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.RepositoryRef & atomic.RepositoryRef.$Shape; + + /** + * Verifies a RepositoryRef message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RepositoryRef message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepositoryRef + */ + static fromObject(object: { [k: string]: any }): atomic.RepositoryRef; + + /** + * Creates a plain object from a RepositoryRef message. Also converts values to other types if specified. + * @param message RepositoryRef + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.RepositoryRef, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepositoryRef to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for RepositoryRef + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace RepositoryRef { + + /** Properties of a RepositoryRef. */ + interface $Properties { + + /** RepositoryRef authority */ + authority?: (string|null); + + /** RepositoryRef repositoryId */ + repositoryId?: (Uint8Array|null); + + /** RepositoryRef workspaceId */ + workspaceId?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a RepositoryRef. */ + type $Shape = atomic.RepositoryRef.$Properties; + } + + /** + * Properties of a WorkspaceInfo. + * @deprecated Use atomic.WorkspaceInfo.$Properties instead. + */ + interface IWorkspaceInfo extends atomic.WorkspaceInfo.$Properties { + } + + /** Represents a WorkspaceInfo. */ + class WorkspaceInfo { + + /** + * Constructs a new WorkspaceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.WorkspaceInfo.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** WorkspaceInfo workspaceId. */ + workspaceId: string; + + /** WorkspaceInfo rootPath. */ + rootPath: string; + + /** WorkspaceInfo relativeCwd. */ + relativeCwd: string; + + /** WorkspaceInfo currentView. */ + currentView?: (atomic.ViewRef.$Properties|null); + + /** + * Creates a new WorkspaceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkspaceInfo instance + */ + static create(properties: atomic.WorkspaceInfo.$Shape): atomic.WorkspaceInfo & atomic.WorkspaceInfo.$Shape; + static create(properties?: atomic.WorkspaceInfo.$Properties): atomic.WorkspaceInfo; + + /** + * Encodes the specified WorkspaceInfo message. Does not implicitly {@link atomic.WorkspaceInfo.verify|verify} messages. + * @param message WorkspaceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.WorkspaceInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkspaceInfo message, length delimited. Does not implicitly {@link atomic.WorkspaceInfo.verify|verify} messages. + * @param message WorkspaceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.WorkspaceInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkspaceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.WorkspaceInfo & atomic.WorkspaceInfo.$Shape} WorkspaceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.WorkspaceInfo & atomic.WorkspaceInfo.$Shape; + + /** + * Decodes a WorkspaceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.WorkspaceInfo & atomic.WorkspaceInfo.$Shape} WorkspaceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.WorkspaceInfo & atomic.WorkspaceInfo.$Shape; + + /** + * Verifies a WorkspaceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkspaceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkspaceInfo + */ + static fromObject(object: { [k: string]: any }): atomic.WorkspaceInfo; + + /** + * Creates a plain object from a WorkspaceInfo message. Also converts values to other types if specified. + * @param message WorkspaceInfo + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.WorkspaceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkspaceInfo to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for WorkspaceInfo + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace WorkspaceInfo { + + /** Properties of a WorkspaceInfo. */ + interface $Properties { + + /** WorkspaceInfo workspaceId */ + workspaceId?: (string|null); + + /** WorkspaceInfo rootPath */ + rootPath?: (string|null); + + /** WorkspaceInfo relativeCwd */ + relativeCwd?: (string|null); + + /** WorkspaceInfo currentView */ + currentView?: (atomic.ViewRef.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a WorkspaceInfo. */ + type $Shape = atomic.WorkspaceInfo.$Properties; + } + + /** + * Properties of a ViewRef. + * @deprecated Use atomic.ViewRef.$Properties instead. + */ + interface IViewRef extends atomic.ViewRef.$Properties { + } + + /** Represents a ViewRef. */ + class ViewRef { + + /** + * Constructs a new ViewRef. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ViewRef.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ViewRef viewId. */ + viewId: Uint8Array; + + /** ViewRef name. */ + name?: (string|null); + + /** + * Creates a new ViewRef instance using the specified properties. + * @param [properties] Properties to set + * @returns ViewRef instance + */ + static create(properties: atomic.ViewRef.$Shape): atomic.ViewRef & atomic.ViewRef.$Shape; + static create(properties?: atomic.ViewRef.$Properties): atomic.ViewRef; + + /** + * Encodes the specified ViewRef message. Does not implicitly {@link atomic.ViewRef.verify|verify} messages. + * @param message ViewRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ViewRef.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ViewRef message, length delimited. Does not implicitly {@link atomic.ViewRef.verify|verify} messages. + * @param message ViewRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ViewRef.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ViewRef message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ViewRef & atomic.ViewRef.$Shape} ViewRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ViewRef & atomic.ViewRef.$Shape; + + /** + * Decodes a ViewRef message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ViewRef & atomic.ViewRef.$Shape} ViewRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ViewRef & atomic.ViewRef.$Shape; + + /** + * Verifies a ViewRef message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ViewRef message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ViewRef + */ + static fromObject(object: { [k: string]: any }): atomic.ViewRef; + + /** + * Creates a plain object from a ViewRef message. Also converts values to other types if specified. + * @param message ViewRef + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ViewRef, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ViewRef to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ViewRef + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ViewRef { + + /** Properties of a ViewRef. */ + interface $Properties { + + /** ViewRef viewId */ + viewId?: (Uint8Array|null); + + /** ViewRef name */ + name?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ViewRef. */ + type $Shape = atomic.ViewRef.$Properties; + } + + /** + * Properties of a StatusRequest. + * @deprecated Use atomic.StatusRequest.$Properties instead. + */ + interface IStatusRequest extends atomic.StatusRequest.$Properties { + } + + /** Represents a StatusRequest. */ + class StatusRequest { + + /** + * Constructs a new StatusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.StatusRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** StatusRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** StatusRequest options. */ + options?: (atomic.StatusOptions.$Properties|null); + + /** + * Creates a new StatusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StatusRequest instance + */ + static create(properties: atomic.StatusRequest.$Shape): atomic.StatusRequest & atomic.StatusRequest.$Shape; + static create(properties?: atomic.StatusRequest.$Properties): atomic.StatusRequest; + + /** + * Encodes the specified StatusRequest message. Does not implicitly {@link atomic.StatusRequest.verify|verify} messages. + * @param message StatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.StatusRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatusRequest message, length delimited. Does not implicitly {@link atomic.StatusRequest.verify|verify} messages. + * @param message StatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.StatusRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.StatusRequest & atomic.StatusRequest.$Shape} StatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.StatusRequest & atomic.StatusRequest.$Shape; + + /** + * Decodes a StatusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.StatusRequest & atomic.StatusRequest.$Shape} StatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.StatusRequest & atomic.StatusRequest.$Shape; + + /** + * Verifies a StatusRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatusRequest + */ + static fromObject(object: { [k: string]: any }): atomic.StatusRequest; + + /** + * Creates a plain object from a StatusRequest message. Also converts values to other types if specified. + * @param message StatusRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.StatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatusRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for StatusRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace StatusRequest { + + /** Properties of a StatusRequest. */ + interface $Properties { + + /** StatusRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** StatusRequest options */ + options?: (atomic.StatusOptions.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a StatusRequest. */ + type $Shape = atomic.StatusRequest.$Properties; + } + + /** + * Properties of a StatusOptions. + * @deprecated Use atomic.StatusOptions.$Properties instead. + */ + interface IStatusOptions extends atomic.StatusOptions.$Properties { + } + + /** Represents a StatusOptions. */ + class StatusOptions { + + /** + * Constructs a new StatusOptions. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.StatusOptions.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** StatusOptions includeUntracked. */ + includeUntracked?: (boolean|null); + + /** StatusOptions includeIgnored. */ + includeIgnored?: (boolean|null); + + /** StatusOptions respectIgnoreFiles. */ + respectIgnoreFiles?: (boolean|null); + + /** StatusOptions hashContents. */ + hashContents?: (boolean|null); + + /** StatusOptions pathFilters. */ + pathFilters: string[]; + + /** + * Creates a new StatusOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns StatusOptions instance + */ + static create(properties: atomic.StatusOptions.$Shape): atomic.StatusOptions & atomic.StatusOptions.$Shape; + static create(properties?: atomic.StatusOptions.$Properties): atomic.StatusOptions; + + /** + * Encodes the specified StatusOptions message. Does not implicitly {@link atomic.StatusOptions.verify|verify} messages. + * @param message StatusOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.StatusOptions.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatusOptions message, length delimited. Does not implicitly {@link atomic.StatusOptions.verify|verify} messages. + * @param message StatusOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.StatusOptions.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatusOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.StatusOptions & atomic.StatusOptions.$Shape} StatusOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.StatusOptions & atomic.StatusOptions.$Shape; + + /** + * Decodes a StatusOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.StatusOptions & atomic.StatusOptions.$Shape} StatusOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.StatusOptions & atomic.StatusOptions.$Shape; + + /** + * Verifies a StatusOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatusOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatusOptions + */ + static fromObject(object: { [k: string]: any }): atomic.StatusOptions; + + /** + * Creates a plain object from a StatusOptions message. Also converts values to other types if specified. + * @param message StatusOptions + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.StatusOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatusOptions to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for StatusOptions + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace StatusOptions { + + /** Properties of a StatusOptions. */ + interface $Properties { + + /** StatusOptions includeUntracked */ + includeUntracked?: (boolean|null); + + /** StatusOptions includeIgnored */ + includeIgnored?: (boolean|null); + + /** StatusOptions respectIgnoreFiles */ + respectIgnoreFiles?: (boolean|null); + + /** StatusOptions hashContents */ + hashContents?: (boolean|null); + + /** StatusOptions pathFilters */ + pathFilters?: (string[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a StatusOptions. */ + type $Shape = atomic.StatusOptions.$Properties; + } + + /** + * Properties of a StatusResponse. + * @deprecated Use atomic.StatusResponse.$Properties instead. + */ + interface IStatusResponse extends atomic.StatusResponse.$Properties { + } + + /** Represents a StatusResponse. */ + class StatusResponse { + + /** + * Constructs a new StatusResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.StatusResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** StatusResponse view. */ + view: string; + + /** StatusResponse viewMerkle. */ + viewMerkle?: (atomic.Hash.$Properties|null); + + /** StatusResponse files. */ + files: atomic.FileStatusEntry.$Properties[]; + + /** StatusResponse modifiedCount. */ + modifiedCount: number; + + /** StatusResponse deletedCount. */ + deletedCount: number; + + /** StatusResponse untrackedCount. */ + untrackedCount: number; + + /** StatusResponse addedCount. */ + addedCount: number; + + /** StatusResponse conflictedCount. */ + conflictedCount: number; + + /** StatusResponse staleIndexCount. */ + staleIndexCount: number; + + /** StatusResponse snapshot. */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** StatusResponse needsReindex. */ + needsReindex: boolean; + + /** + * Creates a new StatusResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StatusResponse instance + */ + static create(properties: atomic.StatusResponse.$Shape): atomic.StatusResponse & atomic.StatusResponse.$Shape; + static create(properties?: atomic.StatusResponse.$Properties): atomic.StatusResponse; + + /** + * Encodes the specified StatusResponse message. Does not implicitly {@link atomic.StatusResponse.verify|verify} messages. + * @param message StatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.StatusResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatusResponse message, length delimited. Does not implicitly {@link atomic.StatusResponse.verify|verify} messages. + * @param message StatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.StatusResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatusResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.StatusResponse & atomic.StatusResponse.$Shape} StatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.StatusResponse & atomic.StatusResponse.$Shape; + + /** + * Decodes a StatusResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.StatusResponse & atomic.StatusResponse.$Shape} StatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.StatusResponse & atomic.StatusResponse.$Shape; + + /** + * Verifies a StatusResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatusResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatusResponse + */ + static fromObject(object: { [k: string]: any }): atomic.StatusResponse; + + /** + * Creates a plain object from a StatusResponse message. Also converts values to other types if specified. + * @param message StatusResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.StatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatusResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for StatusResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace StatusResponse { + + /** Properties of a StatusResponse. */ + interface $Properties { + + /** StatusResponse view */ + view?: (string|null); + + /** StatusResponse viewMerkle */ + viewMerkle?: (atomic.Hash.$Properties|null); + + /** StatusResponse files */ + files?: (atomic.FileStatusEntry.$Properties[]|null); + + /** StatusResponse modifiedCount */ + modifiedCount?: (number|null); + + /** StatusResponse deletedCount */ + deletedCount?: (number|null); + + /** StatusResponse untrackedCount */ + untrackedCount?: (number|null); + + /** StatusResponse addedCount */ + addedCount?: (number|null); + + /** StatusResponse conflictedCount */ + conflictedCount?: (number|null); + + /** StatusResponse staleIndexCount */ + staleIndexCount?: (number|null); + + /** StatusResponse snapshot */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** StatusResponse needsReindex */ + needsReindex?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a StatusResponse. */ + type $Shape = atomic.StatusResponse.$Properties; + } + + /** + * Properties of a Hash. + * @deprecated Use atomic.Hash.$Properties instead. + */ + interface IHash extends atomic.Hash.$Properties { + } + + /** Represents a Hash. */ + class Hash { + + /** + * Constructs a new Hash. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.Hash.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** Hash value. */ + value: Uint8Array; + + /** Hash algorithm. */ + algorithm: atomic.HashAlgorithm; + + /** + * Creates a new Hash instance using the specified properties. + * @param [properties] Properties to set + * @returns Hash instance + */ + static create(properties: atomic.Hash.$Shape): atomic.Hash & atomic.Hash.$Shape; + static create(properties?: atomic.Hash.$Properties): atomic.Hash; + + /** + * Encodes the specified Hash message. Does not implicitly {@link atomic.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.Hash.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Hash message, length delimited. Does not implicitly {@link atomic.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.Hash.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.Hash & atomic.Hash.$Shape} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.Hash & atomic.Hash.$Shape; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.Hash & atomic.Hash.$Shape} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.Hash & atomic.Hash.$Shape; + + /** + * Verifies a Hash message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Hash + */ + static fromObject(object: { [k: string]: any }): atomic.Hash; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @param message Hash + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Hash to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for Hash + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace Hash { + + /** Properties of a Hash. */ + interface $Properties { + + /** Hash value */ + value?: (Uint8Array|null); + + /** Hash algorithm */ + algorithm?: (atomic.HashAlgorithm|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a Hash. */ + type $Shape = atomic.Hash.$Properties; + } + + /** HashAlgorithm enum. */ + enum HashAlgorithm { + + /** HASH_ALGORITHM_UNSPECIFIED value */ + HASH_ALGORITHM_UNSPECIFIED = 0, + + /** HASH_ALGORITHM_BLAKE3 value */ + HASH_ALGORITHM_BLAKE3 = 1 + } + + /** + * Properties of a FileStatusEntry. + * @deprecated Use atomic.FileStatusEntry.$Properties instead. + */ + interface IFileStatusEntry extends atomic.FileStatusEntry.$Properties { + } + + /** Represents a FileStatusEntry. */ + class FileStatusEntry { + + /** + * Constructs a new FileStatusEntry. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.FileStatusEntry.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** FileStatusEntry path. */ + path: string; + + /** FileStatusEntry status. */ + status: atomic.FileStatus; + + /** FileStatusEntry inode. */ + inode?: (number|Long|null); + + /** FileStatusEntry recordedHash. */ + recordedHash?: (atomic.Hash.$Properties|null); + + /** FileStatusEntry currentHash. */ + currentHash?: (atomic.Hash.$Properties|null); + + /** FileStatusEntry details. */ + details?: (string|null); + + /** + * Creates a new FileStatusEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns FileStatusEntry instance + */ + static create(properties: atomic.FileStatusEntry.$Shape): atomic.FileStatusEntry & atomic.FileStatusEntry.$Shape; + static create(properties?: atomic.FileStatusEntry.$Properties): atomic.FileStatusEntry; + + /** + * Encodes the specified FileStatusEntry message. Does not implicitly {@link atomic.FileStatusEntry.verify|verify} messages. + * @param message FileStatusEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.FileStatusEntry.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileStatusEntry message, length delimited. Does not implicitly {@link atomic.FileStatusEntry.verify|verify} messages. + * @param message FileStatusEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.FileStatusEntry.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileStatusEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.FileStatusEntry & atomic.FileStatusEntry.$Shape} FileStatusEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.FileStatusEntry & atomic.FileStatusEntry.$Shape; + + /** + * Decodes a FileStatusEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.FileStatusEntry & atomic.FileStatusEntry.$Shape} FileStatusEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.FileStatusEntry & atomic.FileStatusEntry.$Shape; + + /** + * Verifies a FileStatusEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileStatusEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileStatusEntry + */ + static fromObject(object: { [k: string]: any }): atomic.FileStatusEntry; + + /** + * Creates a plain object from a FileStatusEntry message. Also converts values to other types if specified. + * @param message FileStatusEntry + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.FileStatusEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileStatusEntry to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for FileStatusEntry + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace FileStatusEntry { + + /** Properties of a FileStatusEntry. */ + interface $Properties { + + /** FileStatusEntry path */ + path?: (string|null); + + /** FileStatusEntry status */ + status?: (atomic.FileStatus|null); + + /** FileStatusEntry inode */ + inode?: (number|Long|null); + + /** FileStatusEntry recordedHash */ + recordedHash?: (atomic.Hash.$Properties|null); + + /** FileStatusEntry currentHash */ + currentHash?: (atomic.Hash.$Properties|null); + + /** FileStatusEntry details */ + details?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a FileStatusEntry. */ + type $Shape = atomic.FileStatusEntry.$Properties; + } + + /** FileStatus enum. */ + enum FileStatus { + + /** FILE_STATUS_UNSPECIFIED value */ + FILE_STATUS_UNSPECIFIED = 0, + + /** FILE_STATUS_MODIFIED value */ + FILE_STATUS_MODIFIED = 1, + + /** FILE_STATUS_DELETED value */ + FILE_STATUS_DELETED = 2, + + /** FILE_STATUS_UNTRACKED value */ + FILE_STATUS_UNTRACKED = 3, + + /** FILE_STATUS_ADDED value */ + FILE_STATUS_ADDED = 4, + + /** FILE_STATUS_CONFLICTED value */ + FILE_STATUS_CONFLICTED = 5 + } + + /** + * Properties of a ViewSnapshot. + * @deprecated Use atomic.ViewSnapshot.$Properties instead. + */ + interface IViewSnapshot extends atomic.ViewSnapshot.$Properties { + } + + /** Represents a ViewSnapshot. */ + class ViewSnapshot { + + /** + * Constructs a new ViewSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ViewSnapshot.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ViewSnapshot view. */ + view?: (atomic.ViewRef.$Properties|null); + + /** ViewSnapshot effectiveState. */ + effectiveState?: (atomic.Hash.$Properties|null); + + /** ViewSnapshot ownMerkle. */ + ownMerkle?: (atomic.Hash.$Properties|null); + + /** + * Creates a new ViewSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns ViewSnapshot instance + */ + static create(properties: atomic.ViewSnapshot.$Shape): atomic.ViewSnapshot & atomic.ViewSnapshot.$Shape; + static create(properties?: atomic.ViewSnapshot.$Properties): atomic.ViewSnapshot; + + /** + * Encodes the specified ViewSnapshot message. Does not implicitly {@link atomic.ViewSnapshot.verify|verify} messages. + * @param message ViewSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ViewSnapshot.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ViewSnapshot message, length delimited. Does not implicitly {@link atomic.ViewSnapshot.verify|verify} messages. + * @param message ViewSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ViewSnapshot.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ViewSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ViewSnapshot & atomic.ViewSnapshot.$Shape} ViewSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ViewSnapshot & atomic.ViewSnapshot.$Shape; + + /** + * Decodes a ViewSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ViewSnapshot & atomic.ViewSnapshot.$Shape} ViewSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ViewSnapshot & atomic.ViewSnapshot.$Shape; + + /** + * Verifies a ViewSnapshot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ViewSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ViewSnapshot + */ + static fromObject(object: { [k: string]: any }): atomic.ViewSnapshot; + + /** + * Creates a plain object from a ViewSnapshot message. Also converts values to other types if specified. + * @param message ViewSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ViewSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ViewSnapshot to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ViewSnapshot + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ViewSnapshot { + + /** Properties of a ViewSnapshot. */ + interface $Properties { + + /** ViewSnapshot view */ + view?: (atomic.ViewRef.$Properties|null); + + /** ViewSnapshot effectiveState */ + effectiveState?: (atomic.Hash.$Properties|null); + + /** ViewSnapshot ownMerkle */ + ownMerkle?: (atomic.Hash.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ViewSnapshot. */ + type $Shape = atomic.ViewSnapshot.$Properties; + } + + /** + * Properties of an AddFilesRequest. + * @deprecated Use atomic.AddFilesRequest.$Properties instead. + */ + interface IAddFilesRequest extends atomic.AddFilesRequest.$Properties { + } + + /** Represents an AddFilesRequest. */ + class AddFilesRequest { + + /** + * Constructs a new AddFilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.AddFilesRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** AddFilesRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** AddFilesRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** AddFilesRequest paths. */ + paths: string[]; + + /** AddFilesRequest expected. */ + expected?: (atomic.ExpectedState.$Properties|null); + + /** AddFilesRequest dryRun. */ + dryRun: boolean; + + /** AddFilesRequest force. */ + force: boolean; + + /** AddFilesRequest directory. */ + directory: boolean; + + /** AddFilesRequest noRecursive. */ + noRecursive: boolean; + + /** + * Creates a new AddFilesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFilesRequest instance + */ + static create(properties: atomic.AddFilesRequest.$Shape): atomic.AddFilesRequest & atomic.AddFilesRequest.$Shape; + static create(properties?: atomic.AddFilesRequest.$Properties): atomic.AddFilesRequest; + + /** + * Encodes the specified AddFilesRequest message. Does not implicitly {@link atomic.AddFilesRequest.verify|verify} messages. + * @param message AddFilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.AddFilesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddFilesRequest message, length delimited. Does not implicitly {@link atomic.AddFilesRequest.verify|verify} messages. + * @param message AddFilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.AddFilesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddFilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.AddFilesRequest & atomic.AddFilesRequest.$Shape} AddFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.AddFilesRequest & atomic.AddFilesRequest.$Shape; + + /** + * Decodes an AddFilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.AddFilesRequest & atomic.AddFilesRequest.$Shape} AddFilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.AddFilesRequest & atomic.AddFilesRequest.$Shape; + + /** + * Verifies an AddFilesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddFilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFilesRequest + */ + static fromObject(object: { [k: string]: any }): atomic.AddFilesRequest; + + /** + * Creates a plain object from an AddFilesRequest message. Also converts values to other types if specified. + * @param message AddFilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.AddFilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddFilesRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for AddFilesRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace AddFilesRequest { + + /** Properties of an AddFilesRequest. */ + interface $Properties { + + /** AddFilesRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** AddFilesRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** AddFilesRequest paths */ + paths?: (string[]|null); + + /** AddFilesRequest expected */ + expected?: (atomic.ExpectedState.$Properties|null); + + /** AddFilesRequest dryRun */ + dryRun?: (boolean|null); + + /** AddFilesRequest force */ + force?: (boolean|null); + + /** AddFilesRequest directory */ + directory?: (boolean|null); + + /** AddFilesRequest noRecursive */ + noRecursive?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of an AddFilesRequest. */ + type $Shape = { + repository?: atomic.RepositoryRef.$Shape|null; + meta?: atomic.RequestMeta.$Shape|null; + paths?: string[]|null; + expected?: atomic.ExpectedState.$Shape|null; + dryRun?: boolean|null; + force?: boolean|null; + directory?: boolean|null; + noRecursive?: boolean|null; + $unknowns?: Uint8Array[]; + }; + } + + /** + * Properties of a RequestMeta. + * @deprecated Use atomic.RequestMeta.$Properties instead. + */ + interface IRequestMeta extends atomic.RequestMeta.$Properties { + } + + /** Represents a RequestMeta. */ + class RequestMeta { + + /** + * Constructs a new RequestMeta. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.RequestMeta.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** RequestMeta requestId. */ + requestId: string; + + /** RequestMeta observedAt. */ + observedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** + * Creates a new RequestMeta instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestMeta instance + */ + static create(properties: atomic.RequestMeta.$Shape): atomic.RequestMeta & atomic.RequestMeta.$Shape; + static create(properties?: atomic.RequestMeta.$Properties): atomic.RequestMeta; + + /** + * Encodes the specified RequestMeta message. Does not implicitly {@link atomic.RequestMeta.verify|verify} messages. + * @param message RequestMeta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.RequestMeta.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestMeta message, length delimited. Does not implicitly {@link atomic.RequestMeta.verify|verify} messages. + * @param message RequestMeta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.RequestMeta.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestMeta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.RequestMeta & atomic.RequestMeta.$Shape} RequestMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.RequestMeta & atomic.RequestMeta.$Shape; + + /** + * Decodes a RequestMeta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.RequestMeta & atomic.RequestMeta.$Shape} RequestMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.RequestMeta & atomic.RequestMeta.$Shape; + + /** + * Verifies a RequestMeta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestMeta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestMeta + */ + static fromObject(object: { [k: string]: any }): atomic.RequestMeta; + + /** + * Creates a plain object from a RequestMeta message. Also converts values to other types if specified. + * @param message RequestMeta + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.RequestMeta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestMeta to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for RequestMeta + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace RequestMeta { + + /** Properties of a RequestMeta. */ + interface $Properties { + + /** RequestMeta requestId */ + requestId?: (string|null); + + /** RequestMeta observedAt */ + observedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a RequestMeta. */ + type $Shape = atomic.RequestMeta.$Properties; + } + + /** + * Properties of an ExpectedState. + * @deprecated Use atomic.ExpectedState.$Properties instead. + */ + interface IExpectedState extends atomic.ExpectedState.$Properties { + } + + /** Represents an ExpectedState. */ + class ExpectedState { + + /** + * Constructs a new ExpectedState. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ExpectedState.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ExpectedState generation. */ + generation?: (number|Long|null); + + /** ExpectedState merkleRoot. */ + merkleRoot?: (atomic.Hash.$Properties|null); + + /** ExpectedState sequence. */ + sequence?: (number|Long|null); + + /** ExpectedState viewSnapshot. */ + viewSnapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** ExpectedState kind. */ + kind?: ("generation"|"merkleRoot"|"sequence"|"viewSnapshot"); + + /** + * Creates a new ExpectedState instance using the specified properties. + * @param [properties] Properties to set + * @returns ExpectedState instance + */ + static create(properties: atomic.ExpectedState.$Shape): atomic.ExpectedState & atomic.ExpectedState.$Shape; + static create(properties?: atomic.ExpectedState.$Properties): atomic.ExpectedState; + + /** + * Encodes the specified ExpectedState message. Does not implicitly {@link atomic.ExpectedState.verify|verify} messages. + * @param message ExpectedState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ExpectedState.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExpectedState message, length delimited. Does not implicitly {@link atomic.ExpectedState.verify|verify} messages. + * @param message ExpectedState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ExpectedState.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExpectedState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ExpectedState & atomic.ExpectedState.$Shape} ExpectedState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ExpectedState & atomic.ExpectedState.$Shape; + + /** + * Decodes an ExpectedState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ExpectedState & atomic.ExpectedState.$Shape} ExpectedState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ExpectedState & atomic.ExpectedState.$Shape; + + /** + * Verifies an ExpectedState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExpectedState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExpectedState + */ + static fromObject(object: { [k: string]: any }): atomic.ExpectedState; + + /** + * Creates a plain object from an ExpectedState message. Also converts values to other types if specified. + * @param message ExpectedState + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ExpectedState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExpectedState to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ExpectedState + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ExpectedState { + + /** Properties of an ExpectedState. */ + interface $Properties { + + /** ExpectedState generation */ + generation?: (number|Long|null); + + /** ExpectedState merkleRoot */ + merkleRoot?: (atomic.Hash.$Properties|null); + + /** ExpectedState sequence */ + sequence?: (number|Long|null); + + /** ExpectedState viewSnapshot */ + viewSnapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** ExpectedState kind */ + kind?: ("generation"|"merkleRoot"|"sequence"|"viewSnapshot"); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Narrowed shape of an ExpectedState. */ + type $Shape = { + generation?: number|Long|null; + merkleRoot?: atomic.Hash.$Shape|null; + sequence?: number|Long|null; + viewSnapshot?: atomic.ViewSnapshot.$Shape|null; + $unknowns?: Uint8Array[]; + } & ( + ({ kind?: undefined; generation?: null; merkleRoot?: null; sequence?: null; viewSnapshot?: null }|{ kind?: "generation"; generation: number|Long; merkleRoot?: null; sequence?: null; viewSnapshot?: null }|{ kind?: "merkleRoot"; generation?: null; merkleRoot: atomic.Hash.$Shape; sequence?: null; viewSnapshot?: null }|{ kind?: "sequence"; generation?: null; merkleRoot?: null; sequence: number|Long; viewSnapshot?: null }|{ kind?: "viewSnapshot"; generation?: null; merkleRoot?: null; sequence?: null; viewSnapshot: atomic.ViewSnapshot.$Shape }) + ); + } + + /** + * Properties of an AddFilesResponse. + * @deprecated Use atomic.AddFilesResponse.$Properties instead. + */ + interface IAddFilesResponse extends atomic.AddFilesResponse.$Properties { + } + + /** Represents an AddFilesResponse. */ + class AddFilesResponse { + + /** + * Constructs a new AddFilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.AddFilesResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** AddFilesResponse tracked. */ + tracked: number; + + /** AddFilesResponse wouldAdd. */ + wouldAdd: string[]; + + /** AddFilesResponse skippedTracked. */ + skippedTracked: string[]; + + /** AddFilesResponse skippedIgnored. */ + skippedIgnored: string[]; + + /** AddFilesResponse failedPaths. */ + failedPaths: string[]; + + /** AddFilesResponse dryRun. */ + dryRun: boolean; + + /** AddFilesResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** + * Creates a new AddFilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFilesResponse instance + */ + static create(properties: atomic.AddFilesResponse.$Shape): atomic.AddFilesResponse & atomic.AddFilesResponse.$Shape; + static create(properties?: atomic.AddFilesResponse.$Properties): atomic.AddFilesResponse; + + /** + * Encodes the specified AddFilesResponse message. Does not implicitly {@link atomic.AddFilesResponse.verify|verify} messages. + * @param message AddFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.AddFilesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddFilesResponse message, length delimited. Does not implicitly {@link atomic.AddFilesResponse.verify|verify} messages. + * @param message AddFilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.AddFilesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddFilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.AddFilesResponse & atomic.AddFilesResponse.$Shape} AddFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.AddFilesResponse & atomic.AddFilesResponse.$Shape; + + /** + * Decodes an AddFilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.AddFilesResponse & atomic.AddFilesResponse.$Shape} AddFilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.AddFilesResponse & atomic.AddFilesResponse.$Shape; + + /** + * Verifies an AddFilesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddFilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFilesResponse + */ + static fromObject(object: { [k: string]: any }): atomic.AddFilesResponse; + + /** + * Creates a plain object from an AddFilesResponse message. Also converts values to other types if specified. + * @param message AddFilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.AddFilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddFilesResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for AddFilesResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace AddFilesResponse { + + /** Properties of an AddFilesResponse. */ + interface $Properties { + + /** AddFilesResponse tracked */ + tracked?: (number|null); + + /** AddFilesResponse wouldAdd */ + wouldAdd?: (string[]|null); + + /** AddFilesResponse skippedTracked */ + skippedTracked?: (string[]|null); + + /** AddFilesResponse skippedIgnored */ + skippedIgnored?: (string[]|null); + + /** AddFilesResponse failedPaths */ + failedPaths?: (string[]|null); + + /** AddFilesResponse dryRun */ + dryRun?: (boolean|null); + + /** AddFilesResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of an AddFilesResponse. */ + type $Shape = atomic.AddFilesResponse.$Properties; + } + + /** + * Properties of a ResponseMeta. + * @deprecated Use atomic.ResponseMeta.$Properties instead. + */ + interface IResponseMeta extends atomic.ResponseMeta.$Properties { + } + + /** Represents a ResponseMeta. */ + class ResponseMeta { + + /** + * Constructs a new ResponseMeta. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ResponseMeta.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ResponseMeta requestId. */ + requestId: string; + + /** ResponseMeta replayed. */ + replayed: boolean; + + /** ResponseMeta snapshot. */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** + * Creates a new ResponseMeta instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseMeta instance + */ + static create(properties: atomic.ResponseMeta.$Shape): atomic.ResponseMeta & atomic.ResponseMeta.$Shape; + static create(properties?: atomic.ResponseMeta.$Properties): atomic.ResponseMeta; + + /** + * Encodes the specified ResponseMeta message. Does not implicitly {@link atomic.ResponseMeta.verify|verify} messages. + * @param message ResponseMeta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ResponseMeta.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseMeta message, length delimited. Does not implicitly {@link atomic.ResponseMeta.verify|verify} messages. + * @param message ResponseMeta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ResponseMeta.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseMeta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ResponseMeta & atomic.ResponseMeta.$Shape} ResponseMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ResponseMeta & atomic.ResponseMeta.$Shape; + + /** + * Decodes a ResponseMeta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ResponseMeta & atomic.ResponseMeta.$Shape} ResponseMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ResponseMeta & atomic.ResponseMeta.$Shape; + + /** + * Verifies a ResponseMeta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseMeta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseMeta + */ + static fromObject(object: { [k: string]: any }): atomic.ResponseMeta; + + /** + * Creates a plain object from a ResponseMeta message. Also converts values to other types if specified. + * @param message ResponseMeta + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ResponseMeta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseMeta to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ResponseMeta + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ResponseMeta { + + /** Properties of a ResponseMeta. */ + interface $Properties { + + /** ResponseMeta requestId */ + requestId?: (string|null); + + /** ResponseMeta replayed */ + replayed?: (boolean|null); + + /** ResponseMeta snapshot */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ResponseMeta. */ + type $Shape = atomic.ResponseMeta.$Properties; + } + + /** + * Properties of a RecordRequest. + * @deprecated Use atomic.RecordRequest.$Properties instead. + */ + interface IRecordRequest extends atomic.RecordRequest.$Properties { + } + + /** Represents a RecordRequest. */ + class RecordRequest { + + /** + * Constructs a new RecordRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.RecordRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** RecordRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** RecordRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** RecordRequest message. */ + message: string; + + /** RecordRequest paths. */ + paths: string[]; + + /** RecordRequest expected. */ + expected?: (atomic.ExpectedState.$Properties|null); + + /** RecordRequest author. */ + author?: (atomic.Author.$Properties|null); + + /** RecordRequest identityName. */ + identityName?: (string|null); + + /** RecordRequest aiAuthorship. */ + aiAuthorship?: (atomic.RecordAiAuthorship.$Properties|null); + + /** + * Creates a new RecordRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordRequest instance + */ + static create(properties: atomic.RecordRequest.$Shape): atomic.RecordRequest & atomic.RecordRequest.$Shape; + static create(properties?: atomic.RecordRequest.$Properties): atomic.RecordRequest; + + /** + * Encodes the specified RecordRequest message. Does not implicitly {@link atomic.RecordRequest.verify|verify} messages. + * @param message RecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.RecordRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordRequest message, length delimited. Does not implicitly {@link atomic.RecordRequest.verify|verify} messages. + * @param message RecordRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.RecordRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.RecordRequest & atomic.RecordRequest.$Shape} RecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.RecordRequest & atomic.RecordRequest.$Shape; + + /** + * Decodes a RecordRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.RecordRequest & atomic.RecordRequest.$Shape} RecordRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.RecordRequest & atomic.RecordRequest.$Shape; + + /** + * Verifies a RecordRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordRequest + */ + static fromObject(object: { [k: string]: any }): atomic.RecordRequest; + + /** + * Creates a plain object from a RecordRequest message. Also converts values to other types if specified. + * @param message RecordRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.RecordRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for RecordRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace RecordRequest { + + /** Properties of a RecordRequest. */ + interface $Properties { + + /** RecordRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** RecordRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** RecordRequest message */ + message?: (string|null); + + /** RecordRequest paths */ + paths?: (string[]|null); + + /** RecordRequest expected */ + expected?: (atomic.ExpectedState.$Properties|null); + + /** RecordRequest author */ + author?: (atomic.Author.$Properties|null); + + /** RecordRequest identityName */ + identityName?: (string|null); + + /** RecordRequest aiAuthorship */ + aiAuthorship?: (atomic.RecordAiAuthorship.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a RecordRequest. */ + type $Shape = { + repository?: atomic.RepositoryRef.$Shape|null; + meta?: atomic.RequestMeta.$Shape|null; + message?: string|null; + paths?: string[]|null; + expected?: atomic.ExpectedState.$Shape|null; + author?: atomic.Author.$Shape|null; + identityName?: string|null; + aiAuthorship?: atomic.RecordAiAuthorship.$Shape|null; + $unknowns?: Uint8Array[]; + }; + } + + /** + * Properties of an Author. + * @deprecated Use atomic.Author.$Properties instead. + */ + interface IAuthor extends atomic.Author.$Properties { + } + + /** Represents an Author. */ + class Author { + + /** + * Constructs a new Author. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.Author.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** Author name. */ + name: string; + + /** Author email. */ + email?: (string|null); + + /** + * Creates a new Author instance using the specified properties. + * @param [properties] Properties to set + * @returns Author instance + */ + static create(properties: atomic.Author.$Shape): atomic.Author & atomic.Author.$Shape; + static create(properties?: atomic.Author.$Properties): atomic.Author; + + /** + * Encodes the specified Author message. Does not implicitly {@link atomic.Author.verify|verify} messages. + * @param message Author message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.Author.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Author message, length delimited. Does not implicitly {@link atomic.Author.verify|verify} messages. + * @param message Author message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.Author.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Author message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.Author & atomic.Author.$Shape} Author + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.Author & atomic.Author.$Shape; + + /** + * Decodes an Author message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.Author & atomic.Author.$Shape} Author + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.Author & atomic.Author.$Shape; + + /** + * Verifies an Author message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Author message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Author + */ + static fromObject(object: { [k: string]: any }): atomic.Author; + + /** + * Creates a plain object from an Author message. Also converts values to other types if specified. + * @param message Author + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.Author, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Author to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for Author + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace Author { + + /** Properties of an Author. */ + interface $Properties { + + /** Author name */ + name?: (string|null); + + /** Author email */ + email?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of an Author. */ + type $Shape = atomic.Author.$Properties; + } + + /** + * Properties of a RecordAiAuthorship. + * @deprecated Use atomic.RecordAiAuthorship.$Properties instead. + */ + interface IRecordAiAuthorship extends atomic.RecordAiAuthorship.$Properties { + } + + /** Represents a RecordAiAuthorship. */ + class RecordAiAuthorship { + + /** + * Constructs a new RecordAiAuthorship. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.RecordAiAuthorship.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** RecordAiAuthorship provider. */ + provider: string; + + /** RecordAiAuthorship model. */ + model: string; + + /** RecordAiAuthorship tool. */ + tool?: (string|null); + + /** RecordAiAuthorship suggestionType. */ + suggestionType?: (string|null); + + /** RecordAiAuthorship inputTokens. */ + inputTokens?: (number|Long|null); + + /** RecordAiAuthorship outputTokens. */ + outputTokens?: (number|Long|null); + + /** RecordAiAuthorship requestId. */ + requestId?: (string|null); + + /** RecordAiAuthorship sessionId. */ + sessionId?: (string|null); + + /** + * Creates a new RecordAiAuthorship instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordAiAuthorship instance + */ + static create(properties: atomic.RecordAiAuthorship.$Shape): atomic.RecordAiAuthorship & atomic.RecordAiAuthorship.$Shape; + static create(properties?: atomic.RecordAiAuthorship.$Properties): atomic.RecordAiAuthorship; + + /** + * Encodes the specified RecordAiAuthorship message. Does not implicitly {@link atomic.RecordAiAuthorship.verify|verify} messages. + * @param message RecordAiAuthorship message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.RecordAiAuthorship.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordAiAuthorship message, length delimited. Does not implicitly {@link atomic.RecordAiAuthorship.verify|verify} messages. + * @param message RecordAiAuthorship message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.RecordAiAuthorship.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordAiAuthorship message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.RecordAiAuthorship & atomic.RecordAiAuthorship.$Shape} RecordAiAuthorship + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.RecordAiAuthorship & atomic.RecordAiAuthorship.$Shape; + + /** + * Decodes a RecordAiAuthorship message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.RecordAiAuthorship & atomic.RecordAiAuthorship.$Shape} RecordAiAuthorship + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.RecordAiAuthorship & atomic.RecordAiAuthorship.$Shape; + + /** + * Verifies a RecordAiAuthorship message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordAiAuthorship message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordAiAuthorship + */ + static fromObject(object: { [k: string]: any }): atomic.RecordAiAuthorship; + + /** + * Creates a plain object from a RecordAiAuthorship message. Also converts values to other types if specified. + * @param message RecordAiAuthorship + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.RecordAiAuthorship, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordAiAuthorship to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for RecordAiAuthorship + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace RecordAiAuthorship { + + /** Properties of a RecordAiAuthorship. */ + interface $Properties { + + /** RecordAiAuthorship provider */ + provider?: (string|null); + + /** RecordAiAuthorship model */ + model?: (string|null); + + /** RecordAiAuthorship tool */ + tool?: (string|null); + + /** RecordAiAuthorship suggestionType */ + suggestionType?: (string|null); + + /** RecordAiAuthorship inputTokens */ + inputTokens?: (number|Long|null); + + /** RecordAiAuthorship outputTokens */ + outputTokens?: (number|Long|null); + + /** RecordAiAuthorship requestId */ + requestId?: (string|null); + + /** RecordAiAuthorship sessionId */ + sessionId?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a RecordAiAuthorship. */ + type $Shape = atomic.RecordAiAuthorship.$Properties; + } + + /** + * Properties of a RecordResponse. + * @deprecated Use atomic.RecordResponse.$Properties instead. + */ + interface IRecordResponse extends atomic.RecordResponse.$Properties { + } + + /** Represents a RecordResponse. */ + class RecordResponse { + + /** + * Constructs a new RecordResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.RecordResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** RecordResponse change. */ + change?: (atomic.ChangeInfo.$Properties|null); + + /** RecordResponse viewMerkle. */ + viewMerkle?: (atomic.Hash.$Properties|null); + + /** RecordResponse view. */ + view?: (string|null); + + /** RecordResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** + * Creates a new RecordResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordResponse instance + */ + static create(properties: atomic.RecordResponse.$Shape): atomic.RecordResponse & atomic.RecordResponse.$Shape; + static create(properties?: atomic.RecordResponse.$Properties): atomic.RecordResponse; + + /** + * Encodes the specified RecordResponse message. Does not implicitly {@link atomic.RecordResponse.verify|verify} messages. + * @param message RecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.RecordResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordResponse message, length delimited. Does not implicitly {@link atomic.RecordResponse.verify|verify} messages. + * @param message RecordResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.RecordResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.RecordResponse & atomic.RecordResponse.$Shape} RecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.RecordResponse & atomic.RecordResponse.$Shape; + + /** + * Decodes a RecordResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.RecordResponse & atomic.RecordResponse.$Shape} RecordResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.RecordResponse & atomic.RecordResponse.$Shape; + + /** + * Verifies a RecordResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordResponse + */ + static fromObject(object: { [k: string]: any }): atomic.RecordResponse; + + /** + * Creates a plain object from a RecordResponse message. Also converts values to other types if specified. + * @param message RecordResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.RecordResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for RecordResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace RecordResponse { + + /** Properties of a RecordResponse. */ + interface $Properties { + + /** RecordResponse change */ + change?: (atomic.ChangeInfo.$Properties|null); + + /** RecordResponse viewMerkle */ + viewMerkle?: (atomic.Hash.$Properties|null); + + /** RecordResponse view */ + view?: (string|null); + + /** RecordResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a RecordResponse. */ + type $Shape = atomic.RecordResponse.$Properties; + } + + /** + * Properties of a ChangeInfo. + * @deprecated Use atomic.ChangeInfo.$Properties instead. + */ + interface IChangeInfo extends atomic.ChangeInfo.$Properties { + } + + /** Represents a ChangeInfo. */ + class ChangeInfo { + + /** + * Constructs a new ChangeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeInfo.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeInfo hash. */ + hash?: (atomic.Hash.$Properties|null); + + /** ChangeInfo message. */ + message?: (string|null); + + /** ChangeInfo description. */ + description?: (string|null); + + /** ChangeInfo authors. */ + authors: atomic.Author.$Properties[]; + + /** ChangeInfo recordedAt. */ + recordedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** ChangeInfo dependencies. */ + dependencies: atomic.Hash.$Properties[]; + + /** ChangeInfo graphSectionCount. */ + graphSectionCount: number; + + /** ChangeInfo semanticSectionCount. */ + semanticSectionCount: number; + + /** ChangeInfo contentChunkCount. */ + contentChunkCount: number; + + /** ChangeInfo hasProvenance. */ + hasProvenance: boolean; + + /** ChangeInfo hasUnhashed. */ + hasUnhashed: boolean; + + /** ChangeInfo hasSignature. */ + hasSignature: boolean; + + /** + * Creates a new ChangeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeInfo instance + */ + static create(properties: atomic.ChangeInfo.$Shape): atomic.ChangeInfo & atomic.ChangeInfo.$Shape; + static create(properties?: atomic.ChangeInfo.$Properties): atomic.ChangeInfo; + + /** + * Encodes the specified ChangeInfo message. Does not implicitly {@link atomic.ChangeInfo.verify|verify} messages. + * @param message ChangeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeInfo message, length delimited. Does not implicitly {@link atomic.ChangeInfo.verify|verify} messages. + * @param message ChangeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeInfo & atomic.ChangeInfo.$Shape} ChangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeInfo & atomic.ChangeInfo.$Shape; + + /** + * Decodes a ChangeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeInfo & atomic.ChangeInfo.$Shape} ChangeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeInfo & atomic.ChangeInfo.$Shape; + + /** + * Verifies a ChangeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeInfo + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeInfo; + + /** + * Creates a plain object from a ChangeInfo message. Also converts values to other types if specified. + * @param message ChangeInfo + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeInfo to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeInfo + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeInfo { + + /** Properties of a ChangeInfo. */ + interface $Properties { + + /** ChangeInfo hash */ + hash?: (atomic.Hash.$Properties|null); + + /** ChangeInfo message */ + message?: (string|null); + + /** ChangeInfo description */ + description?: (string|null); + + /** ChangeInfo authors */ + authors?: (atomic.Author.$Properties[]|null); + + /** ChangeInfo recordedAt */ + recordedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** ChangeInfo dependencies */ + dependencies?: (atomic.Hash.$Properties[]|null); + + /** ChangeInfo graphSectionCount */ + graphSectionCount?: (number|null); + + /** ChangeInfo semanticSectionCount */ + semanticSectionCount?: (number|null); + + /** ChangeInfo contentChunkCount */ + contentChunkCount?: (number|null); + + /** ChangeInfo hasProvenance */ + hasProvenance?: (boolean|null); + + /** ChangeInfo hasUnhashed */ + hasUnhashed?: (boolean|null); + + /** ChangeInfo hasSignature */ + hasSignature?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeInfo. */ + type $Shape = atomic.ChangeInfo.$Properties; + } + + /** + * Properties of a LogRequest. + * @deprecated Use atomic.LogRequest.$Properties instead. + */ + interface ILogRequest extends atomic.LogRequest.$Properties { + } + + /** Represents a LogRequest. */ + class LogRequest { + + /** + * Constructs a new LogRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.LogRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** LogRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** LogRequest allViews. */ + allViews: boolean; + + /** LogRequest view. */ + view?: (string|null); + + /** LogRequest cursor. */ + cursor?: (atomic.PageCursor.$Properties|null); + + /** LogRequest budget. */ + budget?: (atomic.PageBudget.$Properties|null); + + /** LogRequest pathFilter. */ + pathFilter: string[]; + + /** LogRequest tagsOnly. */ + tagsOnly: boolean; + + /** + * Creates a new LogRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LogRequest instance + */ + static create(properties: atomic.LogRequest.$Shape): atomic.LogRequest & atomic.LogRequest.$Shape; + static create(properties?: atomic.LogRequest.$Properties): atomic.LogRequest; + + /** + * Encodes the specified LogRequest message. Does not implicitly {@link atomic.LogRequest.verify|verify} messages. + * @param message LogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.LogRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogRequest message, length delimited. Does not implicitly {@link atomic.LogRequest.verify|verify} messages. + * @param message LogRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.LogRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.LogRequest & atomic.LogRequest.$Shape} LogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.LogRequest & atomic.LogRequest.$Shape; + + /** + * Decodes a LogRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.LogRequest & atomic.LogRequest.$Shape} LogRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.LogRequest & atomic.LogRequest.$Shape; + + /** + * Verifies a LogRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogRequest + */ + static fromObject(object: { [k: string]: any }): atomic.LogRequest; + + /** + * Creates a plain object from a LogRequest message. Also converts values to other types if specified. + * @param message LogRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.LogRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for LogRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace LogRequest { + + /** Properties of a LogRequest. */ + interface $Properties { + + /** LogRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** LogRequest allViews */ + allViews?: (boolean|null); + + /** LogRequest view */ + view?: (string|null); + + /** LogRequest cursor */ + cursor?: (atomic.PageCursor.$Properties|null); + + /** LogRequest budget */ + budget?: (atomic.PageBudget.$Properties|null); + + /** LogRequest pathFilter */ + pathFilter?: (string[]|null); + + /** LogRequest tagsOnly */ + tagsOnly?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a LogRequest. */ + type $Shape = atomic.LogRequest.$Properties; + } + + /** + * Properties of a PageCursor. + * @deprecated Use atomic.PageCursor.$Properties instead. + */ + interface IPageCursor extends atomic.PageCursor.$Properties { + } + + /** Represents a PageCursor. */ + class PageCursor { + + /** + * Constructs a new PageCursor. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PageCursor.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PageCursor seq. */ + seq: (number|Long); + + /** PageCursor offset. */ + offset: (number|Long); + + /** + * Creates a new PageCursor instance using the specified properties. + * @param [properties] Properties to set + * @returns PageCursor instance + */ + static create(properties: atomic.PageCursor.$Shape): atomic.PageCursor & atomic.PageCursor.$Shape; + static create(properties?: atomic.PageCursor.$Properties): atomic.PageCursor; + + /** + * Encodes the specified PageCursor message. Does not implicitly {@link atomic.PageCursor.verify|verify} messages. + * @param message PageCursor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PageCursor.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PageCursor message, length delimited. Does not implicitly {@link atomic.PageCursor.verify|verify} messages. + * @param message PageCursor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PageCursor.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PageCursor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PageCursor & atomic.PageCursor.$Shape} PageCursor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.PageCursor & atomic.PageCursor.$Shape; + + /** + * Decodes a PageCursor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PageCursor & atomic.PageCursor.$Shape} PageCursor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.PageCursor & atomic.PageCursor.$Shape; + + /** + * Verifies a PageCursor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PageCursor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PageCursor + */ + static fromObject(object: { [k: string]: any }): atomic.PageCursor; + + /** + * Creates a plain object from a PageCursor message. Also converts values to other types if specified. + * @param message PageCursor + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PageCursor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PageCursor to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PageCursor + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PageCursor { + + /** Properties of a PageCursor. */ + interface $Properties { + + /** PageCursor seq */ + seq?: (number|Long|null); + + /** PageCursor offset */ + offset?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PageCursor. */ + type $Shape = atomic.PageCursor.$Properties; + } + + /** + * Properties of a PageBudget. + * @deprecated Use atomic.PageBudget.$Properties instead. + */ + interface IPageBudget extends atomic.PageBudget.$Properties { + } + + /** Represents a PageBudget. */ + class PageBudget { + + /** + * Constructs a new PageBudget. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PageBudget.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PageBudget maxItems. */ + maxItems?: (number|null); + + /** PageBudget maxBytes. */ + maxBytes?: (number|null); + + /** + * Creates a new PageBudget instance using the specified properties. + * @param [properties] Properties to set + * @returns PageBudget instance + */ + static create(properties: atomic.PageBudget.$Shape): atomic.PageBudget & atomic.PageBudget.$Shape; + static create(properties?: atomic.PageBudget.$Properties): atomic.PageBudget; + + /** + * Encodes the specified PageBudget message. Does not implicitly {@link atomic.PageBudget.verify|verify} messages. + * @param message PageBudget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PageBudget.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PageBudget message, length delimited. Does not implicitly {@link atomic.PageBudget.verify|verify} messages. + * @param message PageBudget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PageBudget.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PageBudget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PageBudget & atomic.PageBudget.$Shape} PageBudget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.PageBudget & atomic.PageBudget.$Shape; + + /** + * Decodes a PageBudget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PageBudget & atomic.PageBudget.$Shape} PageBudget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.PageBudget & atomic.PageBudget.$Shape; + + /** + * Verifies a PageBudget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PageBudget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PageBudget + */ + static fromObject(object: { [k: string]: any }): atomic.PageBudget; + + /** + * Creates a plain object from a PageBudget message. Also converts values to other types if specified. + * @param message PageBudget + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PageBudget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PageBudget to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PageBudget + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PageBudget { + + /** Properties of a PageBudget. */ + interface $Properties { + + /** PageBudget maxItems */ + maxItems?: (number|null); + + /** PageBudget maxBytes */ + maxBytes?: (number|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PageBudget. */ + type $Shape = atomic.PageBudget.$Properties; + } + + /** + * Properties of a LogResponse. + * @deprecated Use atomic.LogResponse.$Properties instead. + */ + interface ILogResponse extends atomic.LogResponse.$Properties { + } + + /** Represents a LogResponse. */ + class LogResponse { + + /** + * Constructs a new LogResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.LogResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** LogResponse entries. */ + entries: atomic.ChangeLogEntry.$Properties[]; + + /** LogResponse nextCursor. */ + nextCursor?: (atomic.PageCursor.$Properties|null); + + /** + * Creates a new LogResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LogResponse instance + */ + static create(properties: atomic.LogResponse.$Shape): atomic.LogResponse & atomic.LogResponse.$Shape; + static create(properties?: atomic.LogResponse.$Properties): atomic.LogResponse; + + /** + * Encodes the specified LogResponse message. Does not implicitly {@link atomic.LogResponse.verify|verify} messages. + * @param message LogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.LogResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LogResponse message, length delimited. Does not implicitly {@link atomic.LogResponse.verify|verify} messages. + * @param message LogResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.LogResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LogResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.LogResponse & atomic.LogResponse.$Shape} LogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.LogResponse & atomic.LogResponse.$Shape; + + /** + * Decodes a LogResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.LogResponse & atomic.LogResponse.$Shape} LogResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.LogResponse & atomic.LogResponse.$Shape; + + /** + * Verifies a LogResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LogResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LogResponse + */ + static fromObject(object: { [k: string]: any }): atomic.LogResponse; + + /** + * Creates a plain object from a LogResponse message. Also converts values to other types if specified. + * @param message LogResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.LogResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LogResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for LogResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace LogResponse { + + /** Properties of a LogResponse. */ + interface $Properties { + + /** LogResponse entries */ + entries?: (atomic.ChangeLogEntry.$Properties[]|null); + + /** LogResponse nextCursor */ + nextCursor?: (atomic.PageCursor.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a LogResponse. */ + type $Shape = atomic.LogResponse.$Properties; + } + + /** + * Properties of a ChangeLogEntry. + * @deprecated Use atomic.ChangeLogEntry.$Properties instead. + */ + interface IChangeLogEntry extends atomic.ChangeLogEntry.$Properties { + } + + /** Represents a ChangeLogEntry. */ + class ChangeLogEntry { + + /** + * Constructs a new ChangeLogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeLogEntry.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeLogEntry hash. */ + hash?: (atomic.Hash.$Properties|null); + + /** ChangeLogEntry sequence. */ + sequence: (number|Long); + + /** ChangeLogEntry state. */ + state?: (atomic.Hash.$Properties|null); + + /** ChangeLogEntry message. */ + message?: (string|null); + + /** ChangeLogEntry description. */ + description?: (string|null); + + /** ChangeLogEntry authors. */ + authors: atomic.Author.$Properties[]; + + /** ChangeLogEntry recordedAt. */ + recordedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** ChangeLogEntry dependencies. */ + dependencies: atomic.Hash.$Properties[]; + + /** ChangeLogEntry view. */ + view?: (string|null); + + /** ChangeLogEntry isTagged. */ + isTagged: boolean; + + /** + * Creates a new ChangeLogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeLogEntry instance + */ + static create(properties: atomic.ChangeLogEntry.$Shape): atomic.ChangeLogEntry & atomic.ChangeLogEntry.$Shape; + static create(properties?: atomic.ChangeLogEntry.$Properties): atomic.ChangeLogEntry; + + /** + * Encodes the specified ChangeLogEntry message. Does not implicitly {@link atomic.ChangeLogEntry.verify|verify} messages. + * @param message ChangeLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeLogEntry.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeLogEntry message, length delimited. Does not implicitly {@link atomic.ChangeLogEntry.verify|verify} messages. + * @param message ChangeLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeLogEntry.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeLogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeLogEntry & atomic.ChangeLogEntry.$Shape} ChangeLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeLogEntry & atomic.ChangeLogEntry.$Shape; + + /** + * Decodes a ChangeLogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeLogEntry & atomic.ChangeLogEntry.$Shape} ChangeLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeLogEntry & atomic.ChangeLogEntry.$Shape; + + /** + * Verifies a ChangeLogEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeLogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeLogEntry + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeLogEntry; + + /** + * Creates a plain object from a ChangeLogEntry message. Also converts values to other types if specified. + * @param message ChangeLogEntry + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeLogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeLogEntry to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeLogEntry + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeLogEntry { + + /** Properties of a ChangeLogEntry. */ + interface $Properties { + + /** ChangeLogEntry hash */ + hash?: (atomic.Hash.$Properties|null); + + /** ChangeLogEntry sequence */ + sequence?: (number|Long|null); + + /** ChangeLogEntry state */ + state?: (atomic.Hash.$Properties|null); + + /** ChangeLogEntry message */ + message?: (string|null); + + /** ChangeLogEntry description */ + description?: (string|null); + + /** ChangeLogEntry authors */ + authors?: (atomic.Author.$Properties[]|null); + + /** ChangeLogEntry recordedAt */ + recordedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** ChangeLogEntry dependencies */ + dependencies?: (atomic.Hash.$Properties[]|null); + + /** ChangeLogEntry view */ + view?: (string|null); + + /** ChangeLogEntry isTagged */ + isTagged?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeLogEntry. */ + type $Shape = atomic.ChangeLogEntry.$Properties; + } + + /** + * Properties of a GetChangeRequest. + * @deprecated Use atomic.GetChangeRequest.$Properties instead. + */ + interface IGetChangeRequest extends atomic.GetChangeRequest.$Properties { + } + + /** Represents a GetChangeRequest. */ + class GetChangeRequest { + + /** + * Constructs a new GetChangeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetChangeRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetChangeRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** GetChangeRequest ref. */ + ref?: (atomic.ChangeRef.$Properties|null); + + /** GetChangeRequest includes. */ + includes?: (atomic.ChangeIncludes.$Properties|null); + + /** GetChangeRequest view. */ + view?: (atomic.ViewRef.$Properties|null); + + /** GetChangeRequest includeFileContents. */ + includeFileContents: boolean; + + /** + * Creates a new GetChangeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetChangeRequest instance + */ + static create(properties: atomic.GetChangeRequest.$Shape): atomic.GetChangeRequest & atomic.GetChangeRequest.$Shape; + static create(properties?: atomic.GetChangeRequest.$Properties): atomic.GetChangeRequest; + + /** + * Encodes the specified GetChangeRequest message. Does not implicitly {@link atomic.GetChangeRequest.verify|verify} messages. + * @param message GetChangeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetChangeRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetChangeRequest message, length delimited. Does not implicitly {@link atomic.GetChangeRequest.verify|verify} messages. + * @param message GetChangeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetChangeRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetChangeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetChangeRequest & atomic.GetChangeRequest.$Shape} GetChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetChangeRequest & atomic.GetChangeRequest.$Shape; + + /** + * Decodes a GetChangeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetChangeRequest & atomic.GetChangeRequest.$Shape} GetChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetChangeRequest & atomic.GetChangeRequest.$Shape; + + /** + * Verifies a GetChangeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetChangeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetChangeRequest + */ + static fromObject(object: { [k: string]: any }): atomic.GetChangeRequest; + + /** + * Creates a plain object from a GetChangeRequest message. Also converts values to other types if specified. + * @param message GetChangeRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetChangeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetChangeRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetChangeRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetChangeRequest { + + /** Properties of a GetChangeRequest. */ + interface $Properties { + + /** GetChangeRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** GetChangeRequest ref */ + ref?: (atomic.ChangeRef.$Properties|null); + + /** GetChangeRequest includes */ + includes?: (atomic.ChangeIncludes.$Properties|null); + + /** GetChangeRequest view */ + view?: (atomic.ViewRef.$Properties|null); + + /** GetChangeRequest includeFileContents */ + includeFileContents?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetChangeRequest. */ + type $Shape = { + repository?: atomic.RepositoryRef.$Shape|null; + ref?: atomic.ChangeRef.$Shape|null; + includes?: atomic.ChangeIncludes.$Shape|null; + view?: atomic.ViewRef.$Shape|null; + includeFileContents?: boolean|null; + $unknowns?: Uint8Array[]; + }; + } + + /** + * Properties of a ChangeRef. + * @deprecated Use atomic.ChangeRef.$Properties instead. + */ + interface IChangeRef extends atomic.ChangeRef.$Properties { + } + + /** Represents a ChangeRef. */ + class ChangeRef { + + /** + * Constructs a new ChangeRef. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeRef.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeRef hash. */ + hash?: (atomic.Hash.$Properties|null); + + /** ChangeRef sequence. */ + sequence?: (number|Long|null); + + /** ChangeRef prefix. */ + prefix?: (string|null); + + /** ChangeRef kind. */ + kind?: ("hash"|"sequence"|"prefix"); + + /** + * Creates a new ChangeRef instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeRef instance + */ + static create(properties: atomic.ChangeRef.$Shape): atomic.ChangeRef & atomic.ChangeRef.$Shape; + static create(properties?: atomic.ChangeRef.$Properties): atomic.ChangeRef; + + /** + * Encodes the specified ChangeRef message. Does not implicitly {@link atomic.ChangeRef.verify|verify} messages. + * @param message ChangeRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeRef.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeRef message, length delimited. Does not implicitly {@link atomic.ChangeRef.verify|verify} messages. + * @param message ChangeRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeRef.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeRef message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeRef & atomic.ChangeRef.$Shape} ChangeRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeRef & atomic.ChangeRef.$Shape; + + /** + * Decodes a ChangeRef message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeRef & atomic.ChangeRef.$Shape} ChangeRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeRef & atomic.ChangeRef.$Shape; + + /** + * Verifies a ChangeRef message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeRef message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeRef + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeRef; + + /** + * Creates a plain object from a ChangeRef message. Also converts values to other types if specified. + * @param message ChangeRef + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeRef, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeRef to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeRef + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeRef { + + /** Properties of a ChangeRef. */ + interface $Properties { + + /** ChangeRef hash */ + hash?: (atomic.Hash.$Properties|null); + + /** ChangeRef sequence */ + sequence?: (number|Long|null); + + /** ChangeRef prefix */ + prefix?: (string|null); + + /** ChangeRef kind */ + kind?: ("hash"|"sequence"|"prefix"); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Narrowed shape of a ChangeRef. */ + type $Shape = { + hash?: atomic.Hash.$Shape|null; + sequence?: number|Long|null; + prefix?: string|null; + $unknowns?: Uint8Array[]; + } & ( + ({ kind?: undefined; hash?: null; sequence?: null; prefix?: null }|{ kind?: "hash"; hash: atomic.Hash.$Shape; sequence?: null; prefix?: null }|{ kind?: "sequence"; hash?: null; sequence: number|Long; prefix?: null }|{ kind?: "prefix"; hash?: null; sequence?: null; prefix: string }) + ); + } + + /** + * Properties of a ChangeIncludes. + * @deprecated Use atomic.ChangeIncludes.$Properties instead. + */ + interface IChangeIncludes extends atomic.ChangeIncludes.$Properties { + } + + /** Represents a ChangeIncludes. */ + class ChangeIncludes { + + /** + * Constructs a new ChangeIncludes. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeIncludes.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeIncludes metadata. */ + metadata: boolean; + + /** ChangeIncludes graphSection. */ + graphSection: boolean; + + /** ChangeIncludes semanticSection. */ + semanticSection: boolean; + + /** ChangeIncludes signatures. */ + signatures: boolean; + + /** ChangeIncludes contentChunks. */ + contentChunks: boolean; + + /** ChangeIncludes blastRadius. */ + blastRadius: boolean; + + /** + * Creates a new ChangeIncludes instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeIncludes instance + */ + static create(properties: atomic.ChangeIncludes.$Shape): atomic.ChangeIncludes & atomic.ChangeIncludes.$Shape; + static create(properties?: atomic.ChangeIncludes.$Properties): atomic.ChangeIncludes; + + /** + * Encodes the specified ChangeIncludes message. Does not implicitly {@link atomic.ChangeIncludes.verify|verify} messages. + * @param message ChangeIncludes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeIncludes.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeIncludes message, length delimited. Does not implicitly {@link atomic.ChangeIncludes.verify|verify} messages. + * @param message ChangeIncludes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeIncludes.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeIncludes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeIncludes & atomic.ChangeIncludes.$Shape} ChangeIncludes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeIncludes & atomic.ChangeIncludes.$Shape; + + /** + * Decodes a ChangeIncludes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeIncludes & atomic.ChangeIncludes.$Shape} ChangeIncludes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeIncludes & atomic.ChangeIncludes.$Shape; + + /** + * Verifies a ChangeIncludes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeIncludes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeIncludes + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeIncludes; + + /** + * Creates a plain object from a ChangeIncludes message. Also converts values to other types if specified. + * @param message ChangeIncludes + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeIncludes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeIncludes to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeIncludes + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeIncludes { + + /** Properties of a ChangeIncludes. */ + interface $Properties { + + /** ChangeIncludes metadata */ + metadata?: (boolean|null); + + /** ChangeIncludes graphSection */ + graphSection?: (boolean|null); + + /** ChangeIncludes semanticSection */ + semanticSection?: (boolean|null); + + /** ChangeIncludes signatures */ + signatures?: (boolean|null); + + /** ChangeIncludes contentChunks */ + contentChunks?: (boolean|null); + + /** ChangeIncludes blastRadius */ + blastRadius?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeIncludes. */ + type $Shape = atomic.ChangeIncludes.$Properties; + } + + /** + * Properties of a GetChangeResponse. + * @deprecated Use atomic.GetChangeResponse.$Properties instead. + */ + interface IGetChangeResponse extends atomic.GetChangeResponse.$Properties { + } + + /** Represents a GetChangeResponse. */ + class GetChangeResponse { + + /** + * Constructs a new GetChangeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetChangeResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetChangeResponse change. */ + change?: (atomic.ChangeInfo.$Properties|null); + + /** GetChangeResponse graphSection. */ + graphSection?: (atomic.VersionedBytes.$Properties|null); + + /** GetChangeResponse semanticSection. */ + semanticSection?: (atomic.VersionedBytes.$Properties|null); + + /** GetChangeResponse signatures. */ + signatures: atomic.ChangeSignature.$Properties[]; + + /** GetChangeResponse contentChunks. */ + contentChunks?: (Uint8Array|null); + + /** GetChangeResponse changeBundle. */ + changeBundle?: (atomic.VersionedBytes.$Properties|null); + + /** GetChangeResponse provenanceLedger. */ + provenanceLedger: atomic.VersionedBytes.$Properties[]; + + /** GetChangeResponse sequence. */ + sequence?: (number|Long|null); + + /** GetChangeResponse fileContents. */ + fileContents: atomic.ChangeFileContent.$Properties[]; + + /** GetChangeResponse provenanceLedgerHashes. */ + provenanceLedgerHashes: atomic.Hash.$Properties[]; + + /** GetChangeResponse metadata. */ + metadata?: (atomic.ChangeMetadata.$Properties|null); + + /** GetChangeResponse blastRadius. */ + blastRadius?: (atomic.ChangeBlastRadius.$Properties|null); + + /** GetChangeResponse intentContext. */ + intentContext?: (atomic.ChangeIntentContext.$Properties|null); + + /** + * Creates a new GetChangeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetChangeResponse instance + */ + static create(properties: atomic.GetChangeResponse.$Shape): atomic.GetChangeResponse & atomic.GetChangeResponse.$Shape; + static create(properties?: atomic.GetChangeResponse.$Properties): atomic.GetChangeResponse; + + /** + * Encodes the specified GetChangeResponse message. Does not implicitly {@link atomic.GetChangeResponse.verify|verify} messages. + * @param message GetChangeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetChangeResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetChangeResponse message, length delimited. Does not implicitly {@link atomic.GetChangeResponse.verify|verify} messages. + * @param message GetChangeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetChangeResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetChangeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetChangeResponse & atomic.GetChangeResponse.$Shape} GetChangeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetChangeResponse & atomic.GetChangeResponse.$Shape; + + /** + * Decodes a GetChangeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetChangeResponse & atomic.GetChangeResponse.$Shape} GetChangeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetChangeResponse & atomic.GetChangeResponse.$Shape; + + /** + * Verifies a GetChangeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetChangeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetChangeResponse + */ + static fromObject(object: { [k: string]: any }): atomic.GetChangeResponse; + + /** + * Creates a plain object from a GetChangeResponse message. Also converts values to other types if specified. + * @param message GetChangeResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetChangeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetChangeResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetChangeResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetChangeResponse { + + /** Properties of a GetChangeResponse. */ + interface $Properties { + + /** GetChangeResponse change */ + change?: (atomic.ChangeInfo.$Properties|null); + + /** GetChangeResponse graphSection */ + graphSection?: (atomic.VersionedBytes.$Properties|null); + + /** GetChangeResponse semanticSection */ + semanticSection?: (atomic.VersionedBytes.$Properties|null); + + /** GetChangeResponse signatures */ + signatures?: (atomic.ChangeSignature.$Properties[]|null); + + /** GetChangeResponse contentChunks */ + contentChunks?: (Uint8Array|null); + + /** GetChangeResponse changeBundle */ + changeBundle?: (atomic.VersionedBytes.$Properties|null); + + /** GetChangeResponse provenanceLedger */ + provenanceLedger?: (atomic.VersionedBytes.$Properties[]|null); + + /** GetChangeResponse sequence */ + sequence?: (number|Long|null); + + /** GetChangeResponse fileContents */ + fileContents?: (atomic.ChangeFileContent.$Properties[]|null); + + /** GetChangeResponse provenanceLedgerHashes */ + provenanceLedgerHashes?: (atomic.Hash.$Properties[]|null); + + /** GetChangeResponse metadata */ + metadata?: (atomic.ChangeMetadata.$Properties|null); + + /** GetChangeResponse blastRadius */ + blastRadius?: (atomic.ChangeBlastRadius.$Properties|null); + + /** GetChangeResponse intentContext */ + intentContext?: (atomic.ChangeIntentContext.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetChangeResponse. */ + type $Shape = atomic.GetChangeResponse.$Properties; + } + + /** + * Properties of a VersionedBytes. + * @deprecated Use atomic.VersionedBytes.$Properties instead. + */ + interface IVersionedBytes extends atomic.VersionedBytes.$Properties { + } + + /** Represents a VersionedBytes. */ + class VersionedBytes { + + /** + * Constructs a new VersionedBytes. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.VersionedBytes.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** VersionedBytes schema. */ + schema: string; + + /** VersionedBytes payload. */ + payload: Uint8Array; + + /** + * Creates a new VersionedBytes instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionedBytes instance + */ + static create(properties: atomic.VersionedBytes.$Shape): atomic.VersionedBytes & atomic.VersionedBytes.$Shape; + static create(properties?: atomic.VersionedBytes.$Properties): atomic.VersionedBytes; + + /** + * Encodes the specified VersionedBytes message. Does not implicitly {@link atomic.VersionedBytes.verify|verify} messages. + * @param message VersionedBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.VersionedBytes.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersionedBytes message, length delimited. Does not implicitly {@link atomic.VersionedBytes.verify|verify} messages. + * @param message VersionedBytes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.VersionedBytes.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersionedBytes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.VersionedBytes & atomic.VersionedBytes.$Shape} VersionedBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.VersionedBytes & atomic.VersionedBytes.$Shape; + + /** + * Decodes a VersionedBytes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.VersionedBytes & atomic.VersionedBytes.$Shape} VersionedBytes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.VersionedBytes & atomic.VersionedBytes.$Shape; + + /** + * Verifies a VersionedBytes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersionedBytes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionedBytes + */ + static fromObject(object: { [k: string]: any }): atomic.VersionedBytes; + + /** + * Creates a plain object from a VersionedBytes message. Also converts values to other types if specified. + * @param message VersionedBytes + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.VersionedBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersionedBytes to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for VersionedBytes + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace VersionedBytes { + + /** Properties of a VersionedBytes. */ + interface $Properties { + + /** VersionedBytes schema */ + schema?: (string|null); + + /** VersionedBytes payload */ + payload?: (Uint8Array|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a VersionedBytes. */ + type $Shape = atomic.VersionedBytes.$Properties; + } + + /** + * Properties of a ChangeSignature. + * @deprecated Use atomic.ChangeSignature.$Properties instead. + */ + interface IChangeSignature extends atomic.ChangeSignature.$Properties { + } + + /** Represents a ChangeSignature. */ + class ChangeSignature { + + /** + * Constructs a new ChangeSignature. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeSignature.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeSignature identityDid. */ + identityDid: string; + + /** ChangeSignature signature. */ + signature: Uint8Array; + + /** ChangeSignature signedAt. */ + signedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** + * Creates a new ChangeSignature instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeSignature instance + */ + static create(properties: atomic.ChangeSignature.$Shape): atomic.ChangeSignature & atomic.ChangeSignature.$Shape; + static create(properties?: atomic.ChangeSignature.$Properties): atomic.ChangeSignature; + + /** + * Encodes the specified ChangeSignature message. Does not implicitly {@link atomic.ChangeSignature.verify|verify} messages. + * @param message ChangeSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeSignature.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeSignature message, length delimited. Does not implicitly {@link atomic.ChangeSignature.verify|verify} messages. + * @param message ChangeSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeSignature.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeSignature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeSignature & atomic.ChangeSignature.$Shape} ChangeSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeSignature & atomic.ChangeSignature.$Shape; + + /** + * Decodes a ChangeSignature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeSignature & atomic.ChangeSignature.$Shape} ChangeSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeSignature & atomic.ChangeSignature.$Shape; + + /** + * Verifies a ChangeSignature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeSignature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeSignature + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeSignature; + + /** + * Creates a plain object from a ChangeSignature message. Also converts values to other types if specified. + * @param message ChangeSignature + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeSignature to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeSignature + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeSignature { + + /** Properties of a ChangeSignature. */ + interface $Properties { + + /** ChangeSignature identityDid */ + identityDid?: (string|null); + + /** ChangeSignature signature */ + signature?: (Uint8Array|null); + + /** ChangeSignature signedAt */ + signedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeSignature. */ + type $Shape = atomic.ChangeSignature.$Properties; + } + + /** + * Properties of a ChangeFileContent. + * @deprecated Use atomic.ChangeFileContent.$Properties instead. + */ + interface IChangeFileContent extends atomic.ChangeFileContent.$Properties { + } + + /** Represents a ChangeFileContent. */ + class ChangeFileContent { + + /** + * Constructs a new ChangeFileContent. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeFileContent.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeFileContent path. */ + path: string; + + /** ChangeFileContent before. */ + before?: (Uint8Array|null); + + /** ChangeFileContent after. */ + after?: (Uint8Array|null); + + /** ChangeFileContent beforeExists. */ + beforeExists?: (boolean|null); + + /** ChangeFileContent afterExists. */ + afterExists?: (boolean|null); + + /** ChangeFileContent isDirectory. */ + isDirectory: boolean; + + /** + * Creates a new ChangeFileContent instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeFileContent instance + */ + static create(properties: atomic.ChangeFileContent.$Shape): atomic.ChangeFileContent & atomic.ChangeFileContent.$Shape; + static create(properties?: atomic.ChangeFileContent.$Properties): atomic.ChangeFileContent; + + /** + * Encodes the specified ChangeFileContent message. Does not implicitly {@link atomic.ChangeFileContent.verify|verify} messages. + * @param message ChangeFileContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeFileContent.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeFileContent message, length delimited. Does not implicitly {@link atomic.ChangeFileContent.verify|verify} messages. + * @param message ChangeFileContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeFileContent.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeFileContent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeFileContent & atomic.ChangeFileContent.$Shape} ChangeFileContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeFileContent & atomic.ChangeFileContent.$Shape; + + /** + * Decodes a ChangeFileContent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeFileContent & atomic.ChangeFileContent.$Shape} ChangeFileContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeFileContent & atomic.ChangeFileContent.$Shape; + + /** + * Verifies a ChangeFileContent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeFileContent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeFileContent + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeFileContent; + + /** + * Creates a plain object from a ChangeFileContent message. Also converts values to other types if specified. + * @param message ChangeFileContent + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeFileContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeFileContent to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeFileContent + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeFileContent { + + /** Properties of a ChangeFileContent. */ + interface $Properties { + + /** ChangeFileContent path */ + path?: (string|null); + + /** ChangeFileContent before */ + before?: (Uint8Array|null); + + /** ChangeFileContent after */ + after?: (Uint8Array|null); + + /** ChangeFileContent beforeExists */ + beforeExists?: (boolean|null); + + /** ChangeFileContent afterExists */ + afterExists?: (boolean|null); + + /** ChangeFileContent isDirectory */ + isDirectory?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeFileContent. */ + type $Shape = atomic.ChangeFileContent.$Properties; + } + + /** + * Properties of a ChangeMetadata. + * @deprecated Use atomic.ChangeMetadata.$Properties instead. + */ + interface IChangeMetadata extends atomic.ChangeMetadata.$Properties { + } + + /** Represents a ChangeMetadata. */ + class ChangeMetadata { + + /** + * Constructs a new ChangeMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeMetadata.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeMetadata schemaVersion. */ + schemaVersion: number; + + /** ChangeMetadata changeHash. */ + changeHash?: (atomic.Hash.$Properties|null); + + /** ChangeMetadata usage. */ + usage: atomic.ChangeAIUsage.$Properties[]; + + /** ChangeMetadata affectedPaths. */ + affectedPaths: string[]; + + /** ChangeMetadata warnings. */ + warnings: string[]; + + /** ChangeMetadata graphSummary. */ + graphSummary?: (atomic.ChangeGraphSummary.$Properties|null); + + /** + * Creates a new ChangeMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeMetadata instance + */ + static create(properties: atomic.ChangeMetadata.$Shape): atomic.ChangeMetadata & atomic.ChangeMetadata.$Shape; + static create(properties?: atomic.ChangeMetadata.$Properties): atomic.ChangeMetadata; + + /** + * Encodes the specified ChangeMetadata message. Does not implicitly {@link atomic.ChangeMetadata.verify|verify} messages. + * @param message ChangeMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeMetadata.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeMetadata message, length delimited. Does not implicitly {@link atomic.ChangeMetadata.verify|verify} messages. + * @param message ChangeMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeMetadata.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeMetadata & atomic.ChangeMetadata.$Shape} ChangeMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeMetadata & atomic.ChangeMetadata.$Shape; + + /** + * Decodes a ChangeMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeMetadata & atomic.ChangeMetadata.$Shape} ChangeMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeMetadata & atomic.ChangeMetadata.$Shape; + + /** + * Verifies a ChangeMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeMetadata + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeMetadata; + + /** + * Creates a plain object from a ChangeMetadata message. Also converts values to other types if specified. + * @param message ChangeMetadata + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeMetadata to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeMetadata + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeMetadata { + + /** Properties of a ChangeMetadata. */ + interface $Properties { + + /** ChangeMetadata schemaVersion */ + schemaVersion?: (number|null); + + /** ChangeMetadata changeHash */ + changeHash?: (atomic.Hash.$Properties|null); + + /** ChangeMetadata usage */ + usage?: (atomic.ChangeAIUsage.$Properties[]|null); + + /** ChangeMetadata affectedPaths */ + affectedPaths?: (string[]|null); + + /** ChangeMetadata warnings */ + warnings?: (string[]|null); + + /** ChangeMetadata graphSummary */ + graphSummary?: (atomic.ChangeGraphSummary.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeMetadata. */ + type $Shape = atomic.ChangeMetadata.$Properties; + } + + /** + * Properties of a ChangeAIUsage. + * @deprecated Use atomic.ChangeAIUsage.$Properties instead. + */ + interface IChangeAIUsage extends atomic.ChangeAIUsage.$Properties { + } + + /** Represents a ChangeAIUsage. */ + class ChangeAIUsage { + + /** + * Constructs a new ChangeAIUsage. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeAIUsage.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeAIUsage recordIndex. */ + recordIndex: number; + + /** ChangeAIUsage vendor. */ + vendor: string; + + /** ChangeAIUsage model. */ + model: string; + + /** ChangeAIUsage modelVersion. */ + modelVersion?: (string|null); + + /** ChangeAIUsage tool. */ + tool: string; + + /** ChangeAIUsage requestId. */ + requestId?: (string|null); + + /** ChangeAIUsage sessionId. */ + sessionId?: (string|null); + + /** ChangeAIUsage sessionSlug. */ + sessionSlug?: (string|null); + + /** ChangeAIUsage stepCount. */ + stepCount?: (number|null); + + /** ChangeAIUsage tokens. */ + tokens?: (atomic.ChangeTokenUsage.$Properties|null); + + /** ChangeAIUsage costMicroUsd. */ + costMicroUsd?: (number|Long|null); + + /** + * Creates a new ChangeAIUsage instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeAIUsage instance + */ + static create(properties: atomic.ChangeAIUsage.$Shape): atomic.ChangeAIUsage & atomic.ChangeAIUsage.$Shape; + static create(properties?: atomic.ChangeAIUsage.$Properties): atomic.ChangeAIUsage; + + /** + * Encodes the specified ChangeAIUsage message. Does not implicitly {@link atomic.ChangeAIUsage.verify|verify} messages. + * @param message ChangeAIUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeAIUsage.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeAIUsage message, length delimited. Does not implicitly {@link atomic.ChangeAIUsage.verify|verify} messages. + * @param message ChangeAIUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeAIUsage.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeAIUsage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeAIUsage & atomic.ChangeAIUsage.$Shape} ChangeAIUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeAIUsage & atomic.ChangeAIUsage.$Shape; + + /** + * Decodes a ChangeAIUsage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeAIUsage & atomic.ChangeAIUsage.$Shape} ChangeAIUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeAIUsage & atomic.ChangeAIUsage.$Shape; + + /** + * Verifies a ChangeAIUsage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeAIUsage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeAIUsage + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeAIUsage; + + /** + * Creates a plain object from a ChangeAIUsage message. Also converts values to other types if specified. + * @param message ChangeAIUsage + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeAIUsage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeAIUsage to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeAIUsage + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeAIUsage { + + /** Properties of a ChangeAIUsage. */ + interface $Properties { + + /** ChangeAIUsage recordIndex */ + recordIndex?: (number|null); + + /** ChangeAIUsage vendor */ + vendor?: (string|null); + + /** ChangeAIUsage model */ + model?: (string|null); + + /** ChangeAIUsage modelVersion */ + modelVersion?: (string|null); + + /** ChangeAIUsage tool */ + tool?: (string|null); + + /** ChangeAIUsage requestId */ + requestId?: (string|null); + + /** ChangeAIUsage sessionId */ + sessionId?: (string|null); + + /** ChangeAIUsage sessionSlug */ + sessionSlug?: (string|null); + + /** ChangeAIUsage stepCount */ + stepCount?: (number|null); + + /** ChangeAIUsage tokens */ + tokens?: (atomic.ChangeTokenUsage.$Properties|null); + + /** ChangeAIUsage costMicroUsd */ + costMicroUsd?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeAIUsage. */ + type $Shape = atomic.ChangeAIUsage.$Properties; + } + + /** + * Properties of a ChangeTokenUsage. + * @deprecated Use atomic.ChangeTokenUsage.$Properties instead. + */ + interface IChangeTokenUsage extends atomic.ChangeTokenUsage.$Properties { + } + + /** Represents a ChangeTokenUsage. */ + class ChangeTokenUsage { + + /** + * Constructs a new ChangeTokenUsage. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeTokenUsage.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeTokenUsage inputTokens. */ + inputTokens: (number|Long); + + /** ChangeTokenUsage outputTokens. */ + outputTokens: (number|Long); + + /** ChangeTokenUsage totalTokens. */ + totalTokens: (number|Long); + + /** ChangeTokenUsage cacheReadTokens. */ + cacheReadTokens: (number|Long); + + /** ChangeTokenUsage cacheWriteTokens. */ + cacheWriteTokens: (number|Long); + + /** ChangeTokenUsage reasoningTokens. */ + reasoningTokens: (number|Long); + + /** + * Creates a new ChangeTokenUsage instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeTokenUsage instance + */ + static create(properties: atomic.ChangeTokenUsage.$Shape): atomic.ChangeTokenUsage & atomic.ChangeTokenUsage.$Shape; + static create(properties?: atomic.ChangeTokenUsage.$Properties): atomic.ChangeTokenUsage; + + /** + * Encodes the specified ChangeTokenUsage message. Does not implicitly {@link atomic.ChangeTokenUsage.verify|verify} messages. + * @param message ChangeTokenUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeTokenUsage.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeTokenUsage message, length delimited. Does not implicitly {@link atomic.ChangeTokenUsage.verify|verify} messages. + * @param message ChangeTokenUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeTokenUsage.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeTokenUsage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeTokenUsage & atomic.ChangeTokenUsage.$Shape} ChangeTokenUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeTokenUsage & atomic.ChangeTokenUsage.$Shape; + + /** + * Decodes a ChangeTokenUsage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeTokenUsage & atomic.ChangeTokenUsage.$Shape} ChangeTokenUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeTokenUsage & atomic.ChangeTokenUsage.$Shape; + + /** + * Verifies a ChangeTokenUsage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeTokenUsage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeTokenUsage + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeTokenUsage; + + /** + * Creates a plain object from a ChangeTokenUsage message. Also converts values to other types if specified. + * @param message ChangeTokenUsage + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeTokenUsage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeTokenUsage to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeTokenUsage + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeTokenUsage { + + /** Properties of a ChangeTokenUsage. */ + interface $Properties { + + /** ChangeTokenUsage inputTokens */ + inputTokens?: (number|Long|null); + + /** ChangeTokenUsage outputTokens */ + outputTokens?: (number|Long|null); + + /** ChangeTokenUsage totalTokens */ + totalTokens?: (number|Long|null); + + /** ChangeTokenUsage cacheReadTokens */ + cacheReadTokens?: (number|Long|null); + + /** ChangeTokenUsage cacheWriteTokens */ + cacheWriteTokens?: (number|Long|null); + + /** ChangeTokenUsage reasoningTokens */ + reasoningTokens?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeTokenUsage. */ + type $Shape = atomic.ChangeTokenUsage.$Properties; + } + + /** + * Properties of a ChangeGraphSummary. + * @deprecated Use atomic.ChangeGraphSummary.$Properties instead. + */ + interface IChangeGraphSummary extends atomic.ChangeGraphSummary.$Properties { + } + + /** Represents a ChangeGraphSummary. */ + class ChangeGraphSummary { + + /** + * Constructs a new ChangeGraphSummary. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeGraphSummary.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeGraphSummary verticesAdded. */ + verticesAdded: (number|Long); + + /** ChangeGraphSummary edgesChanged. */ + edgesChanged: (number|Long); + + /** ChangeGraphSummary contentBytes. */ + contentBytes: (number|Long); + + /** ChangeGraphSummary filesChanged. */ + filesChanged: (number|Long); + + /** ChangeGraphSummary files. */ + files: atomic.ChangeFileSummary.$Properties[]; + + /** + * Creates a new ChangeGraphSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeGraphSummary instance + */ + static create(properties: atomic.ChangeGraphSummary.$Shape): atomic.ChangeGraphSummary & atomic.ChangeGraphSummary.$Shape; + static create(properties?: atomic.ChangeGraphSummary.$Properties): atomic.ChangeGraphSummary; + + /** + * Encodes the specified ChangeGraphSummary message. Does not implicitly {@link atomic.ChangeGraphSummary.verify|verify} messages. + * @param message ChangeGraphSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeGraphSummary.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeGraphSummary message, length delimited. Does not implicitly {@link atomic.ChangeGraphSummary.verify|verify} messages. + * @param message ChangeGraphSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeGraphSummary.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeGraphSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeGraphSummary & atomic.ChangeGraphSummary.$Shape} ChangeGraphSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeGraphSummary & atomic.ChangeGraphSummary.$Shape; + + /** + * Decodes a ChangeGraphSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeGraphSummary & atomic.ChangeGraphSummary.$Shape} ChangeGraphSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeGraphSummary & atomic.ChangeGraphSummary.$Shape; + + /** + * Verifies a ChangeGraphSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeGraphSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeGraphSummary + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeGraphSummary; + + /** + * Creates a plain object from a ChangeGraphSummary message. Also converts values to other types if specified. + * @param message ChangeGraphSummary + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeGraphSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeGraphSummary to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeGraphSummary + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeGraphSummary { + + /** Properties of a ChangeGraphSummary. */ + interface $Properties { + + /** ChangeGraphSummary verticesAdded */ + verticesAdded?: (number|Long|null); + + /** ChangeGraphSummary edgesChanged */ + edgesChanged?: (number|Long|null); + + /** ChangeGraphSummary contentBytes */ + contentBytes?: (number|Long|null); + + /** ChangeGraphSummary filesChanged */ + filesChanged?: (number|Long|null); + + /** ChangeGraphSummary files */ + files?: (atomic.ChangeFileSummary.$Properties[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeGraphSummary. */ + type $Shape = atomic.ChangeGraphSummary.$Properties; + } + + /** + * Properties of a ChangeFileSummary. + * @deprecated Use atomic.ChangeFileSummary.$Properties instead. + */ + interface IChangeFileSummary extends atomic.ChangeFileSummary.$Properties { + } + + /** Represents a ChangeFileSummary. */ + class ChangeFileSummary { + + /** + * Constructs a new ChangeFileSummary. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeFileSummary.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeFileSummary symbol. */ + symbol: string; + + /** ChangeFileSummary path. */ + path: string; + + /** ChangeFileSummary info. */ + info: string; + + /** + * Creates a new ChangeFileSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeFileSummary instance + */ + static create(properties: atomic.ChangeFileSummary.$Shape): atomic.ChangeFileSummary & atomic.ChangeFileSummary.$Shape; + static create(properties?: atomic.ChangeFileSummary.$Properties): atomic.ChangeFileSummary; + + /** + * Encodes the specified ChangeFileSummary message. Does not implicitly {@link atomic.ChangeFileSummary.verify|verify} messages. + * @param message ChangeFileSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeFileSummary.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeFileSummary message, length delimited. Does not implicitly {@link atomic.ChangeFileSummary.verify|verify} messages. + * @param message ChangeFileSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeFileSummary.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeFileSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeFileSummary & atomic.ChangeFileSummary.$Shape} ChangeFileSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeFileSummary & atomic.ChangeFileSummary.$Shape; + + /** + * Decodes a ChangeFileSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeFileSummary & atomic.ChangeFileSummary.$Shape} ChangeFileSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeFileSummary & atomic.ChangeFileSummary.$Shape; + + /** + * Verifies a ChangeFileSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeFileSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeFileSummary + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeFileSummary; + + /** + * Creates a plain object from a ChangeFileSummary message. Also converts values to other types if specified. + * @param message ChangeFileSummary + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeFileSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeFileSummary to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeFileSummary + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeFileSummary { + + /** Properties of a ChangeFileSummary. */ + interface $Properties { + + /** ChangeFileSummary symbol */ + symbol?: (string|null); + + /** ChangeFileSummary path */ + path?: (string|null); + + /** ChangeFileSummary info */ + info?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeFileSummary. */ + type $Shape = atomic.ChangeFileSummary.$Properties; + } + + /** + * Properties of a ChangeBlastRadius. + * @deprecated Use atomic.ChangeBlastRadius.$Properties instead. + */ + interface IChangeBlastRadius extends atomic.ChangeBlastRadius.$Properties { + } + + /** Represents a ChangeBlastRadius. */ + class ChangeBlastRadius { + + /** + * Constructs a new ChangeBlastRadius. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeBlastRadius.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeBlastRadius changeHash. */ + changeHash?: (atomic.Hash.$Properties|null); + + /** ChangeBlastRadius mode. */ + mode: string; + + /** ChangeBlastRadius files. */ + files: atomic.ChangeImpactFile.$Properties[]; + + /** ChangeBlastRadius edges. */ + edges: atomic.ChangeImpactEdge.$Properties[]; + + /** ChangeBlastRadius warnings. */ + warnings: string[]; + + /** ChangeBlastRadius context. */ + context: string; + + /** + * Creates a new ChangeBlastRadius instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeBlastRadius instance + */ + static create(properties: atomic.ChangeBlastRadius.$Shape): atomic.ChangeBlastRadius & atomic.ChangeBlastRadius.$Shape; + static create(properties?: atomic.ChangeBlastRadius.$Properties): atomic.ChangeBlastRadius; + + /** + * Encodes the specified ChangeBlastRadius message. Does not implicitly {@link atomic.ChangeBlastRadius.verify|verify} messages. + * @param message ChangeBlastRadius message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeBlastRadius.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeBlastRadius message, length delimited. Does not implicitly {@link atomic.ChangeBlastRadius.verify|verify} messages. + * @param message ChangeBlastRadius message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeBlastRadius.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeBlastRadius message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeBlastRadius & atomic.ChangeBlastRadius.$Shape} ChangeBlastRadius + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeBlastRadius & atomic.ChangeBlastRadius.$Shape; + + /** + * Decodes a ChangeBlastRadius message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeBlastRadius & atomic.ChangeBlastRadius.$Shape} ChangeBlastRadius + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeBlastRadius & atomic.ChangeBlastRadius.$Shape; + + /** + * Verifies a ChangeBlastRadius message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeBlastRadius message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeBlastRadius + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeBlastRadius; + + /** + * Creates a plain object from a ChangeBlastRadius message. Also converts values to other types if specified. + * @param message ChangeBlastRadius + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeBlastRadius, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeBlastRadius to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeBlastRadius + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeBlastRadius { + + /** Properties of a ChangeBlastRadius. */ + interface $Properties { + + /** ChangeBlastRadius changeHash */ + changeHash?: (atomic.Hash.$Properties|null); + + /** ChangeBlastRadius mode */ + mode?: (string|null); + + /** ChangeBlastRadius files */ + files?: (atomic.ChangeImpactFile.$Properties[]|null); + + /** ChangeBlastRadius edges */ + edges?: (atomic.ChangeImpactEdge.$Properties[]|null); + + /** ChangeBlastRadius warnings */ + warnings?: (string[]|null); + + /** ChangeBlastRadius context */ + context?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeBlastRadius. */ + type $Shape = atomic.ChangeBlastRadius.$Properties; + } + + /** + * Properties of a ChangeImpactFile. + * @deprecated Use atomic.ChangeImpactFile.$Properties instead. + */ + interface IChangeImpactFile extends atomic.ChangeImpactFile.$Properties { + } + + /** Represents a ChangeImpactFile. */ + class ChangeImpactFile { + + /** + * Constructs a new ChangeImpactFile. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeImpactFile.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeImpactFile path. */ + path: string; + + /** ChangeImpactFile hop. */ + hop: number; + + /** + * Creates a new ChangeImpactFile instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeImpactFile instance + */ + static create(properties: atomic.ChangeImpactFile.$Shape): atomic.ChangeImpactFile & atomic.ChangeImpactFile.$Shape; + static create(properties?: atomic.ChangeImpactFile.$Properties): atomic.ChangeImpactFile; + + /** + * Encodes the specified ChangeImpactFile message. Does not implicitly {@link atomic.ChangeImpactFile.verify|verify} messages. + * @param message ChangeImpactFile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeImpactFile.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeImpactFile message, length delimited. Does not implicitly {@link atomic.ChangeImpactFile.verify|verify} messages. + * @param message ChangeImpactFile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeImpactFile.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeImpactFile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeImpactFile & atomic.ChangeImpactFile.$Shape} ChangeImpactFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeImpactFile & atomic.ChangeImpactFile.$Shape; + + /** + * Decodes a ChangeImpactFile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeImpactFile & atomic.ChangeImpactFile.$Shape} ChangeImpactFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeImpactFile & atomic.ChangeImpactFile.$Shape; + + /** + * Verifies a ChangeImpactFile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeImpactFile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeImpactFile + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeImpactFile; + + /** + * Creates a plain object from a ChangeImpactFile message. Also converts values to other types if specified. + * @param message ChangeImpactFile + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeImpactFile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeImpactFile to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeImpactFile + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeImpactFile { + + /** Properties of a ChangeImpactFile. */ + interface $Properties { + + /** ChangeImpactFile path */ + path?: (string|null); + + /** ChangeImpactFile hop */ + hop?: (number|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeImpactFile. */ + type $Shape = atomic.ChangeImpactFile.$Properties; + } + + /** + * Properties of a ChangeImpactEdge. + * @deprecated Use atomic.ChangeImpactEdge.$Properties instead. + */ + interface IChangeImpactEdge extends atomic.ChangeImpactEdge.$Properties { + } + + /** Represents a ChangeImpactEdge. */ + class ChangeImpactEdge { + + /** + * Constructs a new ChangeImpactEdge. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeImpactEdge.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeImpactEdge fromPath. */ + fromPath: string; + + /** ChangeImpactEdge toPath. */ + toPath: string; + + /** ChangeImpactEdge relation. */ + relation: string; + + /** + * Creates a new ChangeImpactEdge instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeImpactEdge instance + */ + static create(properties: atomic.ChangeImpactEdge.$Shape): atomic.ChangeImpactEdge & atomic.ChangeImpactEdge.$Shape; + static create(properties?: atomic.ChangeImpactEdge.$Properties): atomic.ChangeImpactEdge; + + /** + * Encodes the specified ChangeImpactEdge message. Does not implicitly {@link atomic.ChangeImpactEdge.verify|verify} messages. + * @param message ChangeImpactEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeImpactEdge.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeImpactEdge message, length delimited. Does not implicitly {@link atomic.ChangeImpactEdge.verify|verify} messages. + * @param message ChangeImpactEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeImpactEdge.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeImpactEdge message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeImpactEdge & atomic.ChangeImpactEdge.$Shape} ChangeImpactEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeImpactEdge & atomic.ChangeImpactEdge.$Shape; + + /** + * Decodes a ChangeImpactEdge message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeImpactEdge & atomic.ChangeImpactEdge.$Shape} ChangeImpactEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeImpactEdge & atomic.ChangeImpactEdge.$Shape; + + /** + * Verifies a ChangeImpactEdge message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeImpactEdge message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeImpactEdge + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeImpactEdge; + + /** + * Creates a plain object from a ChangeImpactEdge message. Also converts values to other types if specified. + * @param message ChangeImpactEdge + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeImpactEdge, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeImpactEdge to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeImpactEdge + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeImpactEdge { + + /** Properties of a ChangeImpactEdge. */ + interface $Properties { + + /** ChangeImpactEdge fromPath */ + fromPath?: (string|null); + + /** ChangeImpactEdge toPath */ + toPath?: (string|null); + + /** ChangeImpactEdge relation */ + relation?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeImpactEdge. */ + type $Shape = atomic.ChangeImpactEdge.$Properties; + } + + /** + * Properties of a ChangeIntentContext. + * @deprecated Use atomic.ChangeIntentContext.$Properties instead. + */ + interface IChangeIntentContext extends atomic.ChangeIntentContext.$Properties { + } + + /** Represents a ChangeIntentContext. */ + class ChangeIntentContext { + + /** + * Constructs a new ChangeIntentContext. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeIntentContext.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeIntentContext schemaVersion. */ + schemaVersion: number; + + /** ChangeIntentContext changeHash. */ + changeHash?: (atomic.Hash.$Properties|null); + + /** ChangeIntentContext planId. */ + planId?: (string|null); + + /** ChangeIntentContext status. */ + status: string; + + /** ChangeIntentContext plans. */ + plans: atomic.ChangePlanBinding.$Properties[]; + + /** ChangeIntentContext associatedIntents. */ + associatedIntents: atomic.ChangeIntentAssociation.$Properties[]; + + /** ChangeIntentContext warnings. */ + warnings: string[]; + + /** ChangeIntentContext validationStatus. */ + validationStatus: string; + + /** ChangeIntentContext context. */ + context: string; + + /** + * Creates a new ChangeIntentContext instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeIntentContext instance + */ + static create(properties: atomic.ChangeIntentContext.$Shape): atomic.ChangeIntentContext & atomic.ChangeIntentContext.$Shape; + static create(properties?: atomic.ChangeIntentContext.$Properties): atomic.ChangeIntentContext; + + /** + * Encodes the specified ChangeIntentContext message. Does not implicitly {@link atomic.ChangeIntentContext.verify|verify} messages. + * @param message ChangeIntentContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeIntentContext.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeIntentContext message, length delimited. Does not implicitly {@link atomic.ChangeIntentContext.verify|verify} messages. + * @param message ChangeIntentContext message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeIntentContext.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeIntentContext message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeIntentContext & atomic.ChangeIntentContext.$Shape} ChangeIntentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeIntentContext & atomic.ChangeIntentContext.$Shape; + + /** + * Decodes a ChangeIntentContext message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeIntentContext & atomic.ChangeIntentContext.$Shape} ChangeIntentContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeIntentContext & atomic.ChangeIntentContext.$Shape; + + /** + * Verifies a ChangeIntentContext message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeIntentContext message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeIntentContext + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeIntentContext; + + /** + * Creates a plain object from a ChangeIntentContext message. Also converts values to other types if specified. + * @param message ChangeIntentContext + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeIntentContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeIntentContext to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeIntentContext + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeIntentContext { + + /** Properties of a ChangeIntentContext. */ + interface $Properties { + + /** ChangeIntentContext schemaVersion */ + schemaVersion?: (number|null); + + /** ChangeIntentContext changeHash */ + changeHash?: (atomic.Hash.$Properties|null); + + /** ChangeIntentContext planId */ + planId?: (string|null); + + /** ChangeIntentContext status */ + status?: (string|null); + + /** ChangeIntentContext plans */ + plans?: (atomic.ChangePlanBinding.$Properties[]|null); + + /** ChangeIntentContext associatedIntents */ + associatedIntents?: (atomic.ChangeIntentAssociation.$Properties[]|null); + + /** ChangeIntentContext warnings */ + warnings?: (string[]|null); + + /** ChangeIntentContext validationStatus */ + validationStatus?: (string|null); + + /** ChangeIntentContext context */ + context?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeIntentContext. */ + type $Shape = atomic.ChangeIntentContext.$Properties; + } + + /** + * Properties of a ChangePlanBinding. + * @deprecated Use atomic.ChangePlanBinding.$Properties instead. + */ + interface IChangePlanBinding extends atomic.ChangePlanBinding.$Properties { + } + + /** Represents a ChangePlanBinding. */ + class ChangePlanBinding { + + /** + * Constructs a new ChangePlanBinding. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangePlanBinding.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangePlanBinding planId. */ + planId: string; + + /** ChangePlanBinding source. */ + source: string; + + /** ChangePlanBinding sessionId. */ + sessionId: string; + + /** ChangePlanBinding provenanceHash. */ + provenanceHash?: (atomic.Hash.$Properties|null); + + /** ChangePlanBinding turnNumber. */ + turnNumber?: (number|null); + + /** ChangePlanBinding intent. */ + intent?: (atomic.ChangeIntentIdentity.$Properties|null); + + /** + * Creates a new ChangePlanBinding instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangePlanBinding instance + */ + static create(properties: atomic.ChangePlanBinding.$Shape): atomic.ChangePlanBinding & atomic.ChangePlanBinding.$Shape; + static create(properties?: atomic.ChangePlanBinding.$Properties): atomic.ChangePlanBinding; + + /** + * Encodes the specified ChangePlanBinding message. Does not implicitly {@link atomic.ChangePlanBinding.verify|verify} messages. + * @param message ChangePlanBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangePlanBinding.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangePlanBinding message, length delimited. Does not implicitly {@link atomic.ChangePlanBinding.verify|verify} messages. + * @param message ChangePlanBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangePlanBinding.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangePlanBinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangePlanBinding & atomic.ChangePlanBinding.$Shape} ChangePlanBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangePlanBinding & atomic.ChangePlanBinding.$Shape; + + /** + * Decodes a ChangePlanBinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangePlanBinding & atomic.ChangePlanBinding.$Shape} ChangePlanBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangePlanBinding & atomic.ChangePlanBinding.$Shape; + + /** + * Verifies a ChangePlanBinding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangePlanBinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangePlanBinding + */ + static fromObject(object: { [k: string]: any }): atomic.ChangePlanBinding; + + /** + * Creates a plain object from a ChangePlanBinding message. Also converts values to other types if specified. + * @param message ChangePlanBinding + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangePlanBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangePlanBinding to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangePlanBinding + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangePlanBinding { + + /** Properties of a ChangePlanBinding. */ + interface $Properties { + + /** ChangePlanBinding planId */ + planId?: (string|null); + + /** ChangePlanBinding source */ + source?: (string|null); + + /** ChangePlanBinding sessionId */ + sessionId?: (string|null); + + /** ChangePlanBinding provenanceHash */ + provenanceHash?: (atomic.Hash.$Properties|null); + + /** ChangePlanBinding turnNumber */ + turnNumber?: (number|null); + + /** ChangePlanBinding intent */ + intent?: (atomic.ChangeIntentIdentity.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangePlanBinding. */ + type $Shape = atomic.ChangePlanBinding.$Properties; + } + + /** + * Properties of a ChangeIntentIdentity. + * @deprecated Use atomic.ChangeIntentIdentity.$Properties instead. + */ + interface IChangeIntentIdentity extends atomic.ChangeIntentIdentity.$Properties { + } + + /** Represents a ChangeIntentIdentity. */ + class ChangeIntentIdentity { + + /** + * Constructs a new ChangeIntentIdentity. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeIntentIdentity.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeIntentIdentity id. */ + id: string; + + /** ChangeIntentIdentity uid. */ + uid: string; + + /** ChangeIntentIdentity title. */ + title: string; + + /** ChangeIntentIdentity path. */ + path: string; + + /** + * Creates a new ChangeIntentIdentity instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeIntentIdentity instance + */ + static create(properties: atomic.ChangeIntentIdentity.$Shape): atomic.ChangeIntentIdentity & atomic.ChangeIntentIdentity.$Shape; + static create(properties?: atomic.ChangeIntentIdentity.$Properties): atomic.ChangeIntentIdentity; + + /** + * Encodes the specified ChangeIntentIdentity message. Does not implicitly {@link atomic.ChangeIntentIdentity.verify|verify} messages. + * @param message ChangeIntentIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeIntentIdentity.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeIntentIdentity message, length delimited. Does not implicitly {@link atomic.ChangeIntentIdentity.verify|verify} messages. + * @param message ChangeIntentIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeIntentIdentity.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeIntentIdentity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeIntentIdentity & atomic.ChangeIntentIdentity.$Shape} ChangeIntentIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeIntentIdentity & atomic.ChangeIntentIdentity.$Shape; + + /** + * Decodes a ChangeIntentIdentity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeIntentIdentity & atomic.ChangeIntentIdentity.$Shape} ChangeIntentIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeIntentIdentity & atomic.ChangeIntentIdentity.$Shape; + + /** + * Verifies a ChangeIntentIdentity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeIntentIdentity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeIntentIdentity + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeIntentIdentity; + + /** + * Creates a plain object from a ChangeIntentIdentity message. Also converts values to other types if specified. + * @param message ChangeIntentIdentity + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeIntentIdentity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeIntentIdentity to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeIntentIdentity + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeIntentIdentity { + + /** Properties of a ChangeIntentIdentity. */ + interface $Properties { + + /** ChangeIntentIdentity id */ + id?: (string|null); + + /** ChangeIntentIdentity uid */ + uid?: (string|null); + + /** ChangeIntentIdentity title */ + title?: (string|null); + + /** ChangeIntentIdentity path */ + path?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeIntentIdentity. */ + type $Shape = atomic.ChangeIntentIdentity.$Properties; + } + + /** + * Properties of a ChangeIntentAssociation. + * @deprecated Use atomic.ChangeIntentAssociation.$Properties instead. + */ + interface IChangeIntentAssociation extends atomic.ChangeIntentAssociation.$Properties { + } + + /** Represents a ChangeIntentAssociation. */ + class ChangeIntentAssociation { + + /** + * Constructs a new ChangeIntentAssociation. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeIntentAssociation.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeIntentAssociation path. */ + path: string; + + /** ChangeIntentAssociation intent. */ + intent?: (atomic.ChangeIntentIdentity.$Properties|null); + + /** ChangeIntentAssociation commitmentNodeIds. */ + commitmentNodeIds: string[]; + + /** ChangeIntentAssociation patchNodeIds. */ + patchNodeIds: string[]; + + /** ChangeIntentAssociation provenanceHashes. */ + provenanceHashes: atomic.Hash.$Properties[]; + + /** + * Creates a new ChangeIntentAssociation instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeIntentAssociation instance + */ + static create(properties: atomic.ChangeIntentAssociation.$Shape): atomic.ChangeIntentAssociation & atomic.ChangeIntentAssociation.$Shape; + static create(properties?: atomic.ChangeIntentAssociation.$Properties): atomic.ChangeIntentAssociation; + + /** + * Encodes the specified ChangeIntentAssociation message. Does not implicitly {@link atomic.ChangeIntentAssociation.verify|verify} messages. + * @param message ChangeIntentAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeIntentAssociation.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeIntentAssociation message, length delimited. Does not implicitly {@link atomic.ChangeIntentAssociation.verify|verify} messages. + * @param message ChangeIntentAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeIntentAssociation.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeIntentAssociation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeIntentAssociation & atomic.ChangeIntentAssociation.$Shape} ChangeIntentAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ChangeIntentAssociation & atomic.ChangeIntentAssociation.$Shape; + + /** + * Decodes a ChangeIntentAssociation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeIntentAssociation & atomic.ChangeIntentAssociation.$Shape} ChangeIntentAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ChangeIntentAssociation & atomic.ChangeIntentAssociation.$Shape; + + /** + * Verifies a ChangeIntentAssociation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeIntentAssociation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeIntentAssociation + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeIntentAssociation; + + /** + * Creates a plain object from a ChangeIntentAssociation message. Also converts values to other types if specified. + * @param message ChangeIntentAssociation + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeIntentAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeIntentAssociation to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeIntentAssociation + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeIntentAssociation { + + /** Properties of a ChangeIntentAssociation. */ + interface $Properties { + + /** ChangeIntentAssociation path */ + path?: (string|null); + + /** ChangeIntentAssociation intent */ + intent?: (atomic.ChangeIntentIdentity.$Properties|null); + + /** ChangeIntentAssociation commitmentNodeIds */ + commitmentNodeIds?: (string[]|null); + + /** ChangeIntentAssociation patchNodeIds */ + patchNodeIds?: (string[]|null); + + /** ChangeIntentAssociation provenanceHashes */ + provenanceHashes?: (atomic.Hash.$Properties[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeIntentAssociation. */ + type $Shape = atomic.ChangeIntentAssociation.$Properties; + } + + /** + * Properties of a PreviewRestoreRequest. + * @deprecated Use atomic.PreviewRestoreRequest.$Properties instead. + */ + interface IPreviewRestoreRequest extends atomic.PreviewRestoreRequest.$Properties { + } + + /** Represents a PreviewRestoreRequest. */ + class PreviewRestoreRequest { + + /** + * Constructs a new PreviewRestoreRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PreviewRestoreRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PreviewRestoreRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** PreviewRestoreRequest paths. */ + paths: string[]; + + /** PreviewRestoreRequest force. */ + force: boolean; + + /** PreviewRestoreRequest contentPath. */ + contentPath?: (string|null); + + /** + * Creates a new PreviewRestoreRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PreviewRestoreRequest instance + */ + static create(properties: atomic.PreviewRestoreRequest.$Shape): atomic.PreviewRestoreRequest & atomic.PreviewRestoreRequest.$Shape; + static create(properties?: atomic.PreviewRestoreRequest.$Properties): atomic.PreviewRestoreRequest; + + /** + * Encodes the specified PreviewRestoreRequest message. Does not implicitly {@link atomic.PreviewRestoreRequest.verify|verify} messages. + * @param message PreviewRestoreRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PreviewRestoreRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreviewRestoreRequest message, length delimited. Does not implicitly {@link atomic.PreviewRestoreRequest.verify|verify} messages. + * @param message PreviewRestoreRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PreviewRestoreRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreviewRestoreRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PreviewRestoreRequest & atomic.PreviewRestoreRequest.$Shape} PreviewRestoreRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.PreviewRestoreRequest & atomic.PreviewRestoreRequest.$Shape; + + /** + * Decodes a PreviewRestoreRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PreviewRestoreRequest & atomic.PreviewRestoreRequest.$Shape} PreviewRestoreRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.PreviewRestoreRequest & atomic.PreviewRestoreRequest.$Shape; + + /** + * Verifies a PreviewRestoreRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreviewRestoreRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreviewRestoreRequest + */ + static fromObject(object: { [k: string]: any }): atomic.PreviewRestoreRequest; + + /** + * Creates a plain object from a PreviewRestoreRequest message. Also converts values to other types if specified. + * @param message PreviewRestoreRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PreviewRestoreRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreviewRestoreRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PreviewRestoreRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PreviewRestoreRequest { + + /** Properties of a PreviewRestoreRequest. */ + interface $Properties { + + /** PreviewRestoreRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** PreviewRestoreRequest paths */ + paths?: (string[]|null); + + /** PreviewRestoreRequest force */ + force?: (boolean|null); + + /** PreviewRestoreRequest contentPath */ + contentPath?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PreviewRestoreRequest. */ + type $Shape = atomic.PreviewRestoreRequest.$Properties; + } + + /** + * Properties of a PreviewMutationResponse. + * @deprecated Use atomic.PreviewMutationResponse.$Properties instead. + */ + interface IPreviewMutationResponse extends atomic.PreviewMutationResponse.$Properties { + } + + /** Represents a PreviewMutationResponse. */ + class PreviewMutationResponse { + + /** + * Constructs a new PreviewMutationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PreviewMutationResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PreviewMutationResponse affectedPaths. */ + affectedPaths: string[]; + + /** PreviewMutationResponse changes. */ + changes: atomic.ChangeInfo.$Properties[]; + + /** PreviewMutationResponse conflicts. */ + conflicts: atomic.ConflictInfo.$Properties[]; + + /** PreviewMutationResponse snapshot. */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** PreviewMutationResponse untracked. */ + untracked: string[]; + + /** PreviewMutationResponse pristineContent. */ + pristineContent?: (Uint8Array|null); + + /** PreviewMutationResponse view. */ + view?: (string|null); + + /** + * Creates a new PreviewMutationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PreviewMutationResponse instance + */ + static create(properties: atomic.PreviewMutationResponse.$Shape): atomic.PreviewMutationResponse & atomic.PreviewMutationResponse.$Shape; + static create(properties?: atomic.PreviewMutationResponse.$Properties): atomic.PreviewMutationResponse; + + /** + * Encodes the specified PreviewMutationResponse message. Does not implicitly {@link atomic.PreviewMutationResponse.verify|verify} messages. + * @param message PreviewMutationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PreviewMutationResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreviewMutationResponse message, length delimited. Does not implicitly {@link atomic.PreviewMutationResponse.verify|verify} messages. + * @param message PreviewMutationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PreviewMutationResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreviewMutationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PreviewMutationResponse & atomic.PreviewMutationResponse.$Shape} PreviewMutationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.PreviewMutationResponse & atomic.PreviewMutationResponse.$Shape; + + /** + * Decodes a PreviewMutationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PreviewMutationResponse & atomic.PreviewMutationResponse.$Shape} PreviewMutationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.PreviewMutationResponse & atomic.PreviewMutationResponse.$Shape; + + /** + * Verifies a PreviewMutationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PreviewMutationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreviewMutationResponse + */ + static fromObject(object: { [k: string]: any }): atomic.PreviewMutationResponse; + + /** + * Creates a plain object from a PreviewMutationResponse message. Also converts values to other types if specified. + * @param message PreviewMutationResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PreviewMutationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreviewMutationResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PreviewMutationResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PreviewMutationResponse { + + /** Properties of a PreviewMutationResponse. */ + interface $Properties { + + /** PreviewMutationResponse affectedPaths */ + affectedPaths?: (string[]|null); + + /** PreviewMutationResponse changes */ + changes?: (atomic.ChangeInfo.$Properties[]|null); + + /** PreviewMutationResponse conflicts */ + conflicts?: (atomic.ConflictInfo.$Properties[]|null); + + /** PreviewMutationResponse snapshot */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** PreviewMutationResponse untracked */ + untracked?: (string[]|null); + + /** PreviewMutationResponse pristineContent */ + pristineContent?: (Uint8Array|null); + + /** PreviewMutationResponse view */ + view?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PreviewMutationResponse. */ + type $Shape = atomic.PreviewMutationResponse.$Properties; + } + + /** + * Properties of a ConflictInfo. + * @deprecated Use atomic.ConflictInfo.$Properties instead. + */ + interface IConflictInfo extends atomic.ConflictInfo.$Properties { + } + + /** Represents a ConflictInfo. */ + class ConflictInfo { + + /** + * Constructs a new ConflictInfo. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ConflictInfo.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ConflictInfo path. */ + path: string; + + /** ConflictInfo view. */ + view?: (string|null); + + /** ConflictInfo base. */ + base?: (atomic.Hash.$Properties|null); + + /** ConflictInfo kind. */ + kind?: (string|null); + + /** ConflictInfo line. */ + line?: (number|Long|null); + + /** ConflictInfo sides. */ + sides: string[]; + + /** + * Creates a new ConflictInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ConflictInfo instance + */ + static create(properties: atomic.ConflictInfo.$Shape): atomic.ConflictInfo & atomic.ConflictInfo.$Shape; + static create(properties?: atomic.ConflictInfo.$Properties): atomic.ConflictInfo; + + /** + * Encodes the specified ConflictInfo message. Does not implicitly {@link atomic.ConflictInfo.verify|verify} messages. + * @param message ConflictInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ConflictInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConflictInfo message, length delimited. Does not implicitly {@link atomic.ConflictInfo.verify|verify} messages. + * @param message ConflictInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ConflictInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConflictInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ConflictInfo & atomic.ConflictInfo.$Shape} ConflictInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ConflictInfo & atomic.ConflictInfo.$Shape; + + /** + * Decodes a ConflictInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ConflictInfo & atomic.ConflictInfo.$Shape} ConflictInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ConflictInfo & atomic.ConflictInfo.$Shape; + + /** + * Verifies a ConflictInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConflictInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConflictInfo + */ + static fromObject(object: { [k: string]: any }): atomic.ConflictInfo; + + /** + * Creates a plain object from a ConflictInfo message. Also converts values to other types if specified. + * @param message ConflictInfo + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ConflictInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConflictInfo to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ConflictInfo + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ConflictInfo { + + /** Properties of a ConflictInfo. */ + interface $Properties { + + /** ConflictInfo path */ + path?: (string|null); + + /** ConflictInfo view */ + view?: (string|null); + + /** ConflictInfo base */ + base?: (atomic.Hash.$Properties|null); + + /** ConflictInfo kind */ + kind?: (string|null); + + /** ConflictInfo line */ + line?: (number|Long|null); + + /** ConflictInfo sides */ + sides?: (string[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ConflictInfo. */ + type $Shape = atomic.ConflictInfo.$Properties; + } + + /** + * Properties of a ListViewsRequest. + * @deprecated Use atomic.ListViewsRequest.$Properties instead. + */ + interface IListViewsRequest extends atomic.ListViewsRequest.$Properties { + } + + /** Represents a ListViewsRequest. */ + class ListViewsRequest { + + /** + * Constructs a new ListViewsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ListViewsRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ListViewsRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** ListViewsRequest includeDetails. */ + includeDetails: boolean; + + /** + * Creates a new ListViewsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListViewsRequest instance + */ + static create(properties: atomic.ListViewsRequest.$Shape): atomic.ListViewsRequest & atomic.ListViewsRequest.$Shape; + static create(properties?: atomic.ListViewsRequest.$Properties): atomic.ListViewsRequest; + + /** + * Encodes the specified ListViewsRequest message. Does not implicitly {@link atomic.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ListViewsRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link atomic.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ListViewsRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ListViewsRequest & atomic.ListViewsRequest.$Shape} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ListViewsRequest & atomic.ListViewsRequest.$Shape; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ListViewsRequest & atomic.ListViewsRequest.$Shape} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ListViewsRequest & atomic.ListViewsRequest.$Shape; + + /** + * Verifies a ListViewsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListViewsRequest + */ + static fromObject(object: { [k: string]: any }): atomic.ListViewsRequest; + + /** + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @param message ListViewsRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ListViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListViewsRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ListViewsRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ListViewsRequest { + + /** Properties of a ListViewsRequest. */ + interface $Properties { + + /** ListViewsRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** ListViewsRequest includeDetails */ + includeDetails?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ListViewsRequest. */ + type $Shape = atomic.ListViewsRequest.$Properties; + } + + /** + * Properties of a ListViewsResponse. + * @deprecated Use atomic.ListViewsResponse.$Properties instead. + */ + interface IListViewsResponse extends atomic.ListViewsResponse.$Properties { + } + + /** Represents a ListViewsResponse. */ + class ListViewsResponse { + + /** + * Constructs a new ListViewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ListViewsResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ListViewsResponse views. */ + views: atomic.ViewInfo.$Properties[]; + + /** + * Creates a new ListViewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListViewsResponse instance + */ + static create(properties: atomic.ListViewsResponse.$Shape): atomic.ListViewsResponse & atomic.ListViewsResponse.$Shape; + static create(properties?: atomic.ListViewsResponse.$Properties): atomic.ListViewsResponse; + + /** + * Encodes the specified ListViewsResponse message. Does not implicitly {@link atomic.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ListViewsResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link atomic.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ListViewsResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ListViewsResponse & atomic.ListViewsResponse.$Shape} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ListViewsResponse & atomic.ListViewsResponse.$Shape; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ListViewsResponse & atomic.ListViewsResponse.$Shape} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ListViewsResponse & atomic.ListViewsResponse.$Shape; + + /** + * Verifies a ListViewsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListViewsResponse + */ + static fromObject(object: { [k: string]: any }): atomic.ListViewsResponse; + + /** + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * @param message ListViewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ListViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListViewsResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ListViewsResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ListViewsResponse { + + /** Properties of a ListViewsResponse. */ + interface $Properties { + + /** ListViewsResponse views */ + views?: (atomic.ViewInfo.$Properties[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ListViewsResponse. */ + type $Shape = atomic.ListViewsResponse.$Properties; + } + + /** + * Properties of a ViewInfo. + * @deprecated Use atomic.ViewInfo.$Properties instead. + */ + interface IViewInfo extends atomic.ViewInfo.$Properties { + } + + /** Represents a ViewInfo. */ + class ViewInfo { + + /** + * Constructs a new ViewInfo. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ViewInfo.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ViewInfo name. */ + name: string; + + /** ViewInfo scope. */ + scope: atomic.ViewScope; + + /** ViewInfo parent. */ + parent?: (string|null); + + /** ViewInfo head. */ + head?: (atomic.Hash.$Properties|null); + + /** ViewInfo changeCount. */ + changeCount: (number|Long); + + /** ViewInfo current. */ + current: boolean; + + /** ViewInfo ref. */ + ref?: (atomic.ViewRef.$Properties|null); + + /** ViewInfo snapshot. */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** ViewInfo ownChangeCount. */ + ownChangeCount?: (number|Long|null); + + /** ViewInfo inheritedChangeCount. */ + inheritedChangeCount?: (number|Long|null); + + /** + * Creates a new ViewInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ViewInfo instance + */ + static create(properties: atomic.ViewInfo.$Shape): atomic.ViewInfo & atomic.ViewInfo.$Shape; + static create(properties?: atomic.ViewInfo.$Properties): atomic.ViewInfo; + + /** + * Encodes the specified ViewInfo message. Does not implicitly {@link atomic.ViewInfo.verify|verify} messages. + * @param message ViewInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ViewInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ViewInfo message, length delimited. Does not implicitly {@link atomic.ViewInfo.verify|verify} messages. + * @param message ViewInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ViewInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ViewInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ViewInfo & atomic.ViewInfo.$Shape} ViewInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ViewInfo & atomic.ViewInfo.$Shape; + + /** + * Decodes a ViewInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ViewInfo & atomic.ViewInfo.$Shape} ViewInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ViewInfo & atomic.ViewInfo.$Shape; + + /** + * Verifies a ViewInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ViewInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ViewInfo + */ + static fromObject(object: { [k: string]: any }): atomic.ViewInfo; + + /** + * Creates a plain object from a ViewInfo message. Also converts values to other types if specified. + * @param message ViewInfo + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ViewInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ViewInfo to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ViewInfo + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ViewInfo { + + /** Properties of a ViewInfo. */ + interface $Properties { + + /** ViewInfo name */ + name?: (string|null); + + /** ViewInfo scope */ + scope?: (atomic.ViewScope|null); + + /** ViewInfo parent */ + parent?: (string|null); + + /** ViewInfo head */ + head?: (atomic.Hash.$Properties|null); + + /** ViewInfo changeCount */ + changeCount?: (number|Long|null); + + /** ViewInfo current */ + current?: (boolean|null); + + /** ViewInfo ref */ + ref?: (atomic.ViewRef.$Properties|null); + + /** ViewInfo snapshot */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** ViewInfo ownChangeCount */ + ownChangeCount?: (number|Long|null); + + /** ViewInfo inheritedChangeCount */ + inheritedChangeCount?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ViewInfo. */ + type $Shape = atomic.ViewInfo.$Properties; + } + + /** ViewScope enum. */ + enum ViewScope { + + /** VIEW_SCOPE_UNSPECIFIED value */ + VIEW_SCOPE_UNSPECIFIED = 0, + + /** VIEW_SCOPE_DRAFT value */ + VIEW_SCOPE_DRAFT = 1, + + /** VIEW_SCOPE_SHARED value */ + VIEW_SCOPE_SHARED = 2 + } + + /** + * Properties of a CreateViewRequest. + * @deprecated Use atomic.CreateViewRequest.$Properties instead. + */ + interface ICreateViewRequest extends atomic.CreateViewRequest.$Properties { + } + + /** Represents a CreateViewRequest. */ + class CreateViewRequest { + + /** + * Constructs a new CreateViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.CreateViewRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** CreateViewRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** CreateViewRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** CreateViewRequest name. */ + name: string; + + /** CreateViewRequest fromView. */ + fromView?: (string|null); + + /** CreateViewRequest empty. */ + empty?: (boolean|null); + + /** CreateViewRequest parent. */ + parent?: (string|null); + + /** CreateViewRequest scope. */ + scope: atomic.ViewScope; + + /** CreateViewRequest baseSnapshot. */ + baseSnapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** CreateViewRequest base. */ + base?: ("fromView"|"empty"|"parent"); + + /** + * Creates a new CreateViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateViewRequest instance + */ + static create(properties: atomic.CreateViewRequest.$Shape): atomic.CreateViewRequest & atomic.CreateViewRequest.$Shape; + static create(properties?: atomic.CreateViewRequest.$Properties): atomic.CreateViewRequest; + + /** + * Encodes the specified CreateViewRequest message. Does not implicitly {@link atomic.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.CreateViewRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link atomic.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.CreateViewRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.CreateViewRequest & atomic.CreateViewRequest.$Shape} CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.CreateViewRequest & atomic.CreateViewRequest.$Shape; + + /** + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.CreateViewRequest & atomic.CreateViewRequest.$Shape} CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.CreateViewRequest & atomic.CreateViewRequest.$Shape; + + /** + * Verifies a CreateViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateViewRequest + */ + static fromObject(object: { [k: string]: any }): atomic.CreateViewRequest; + + /** + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * @param message CreateViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.CreateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateViewRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for CreateViewRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace CreateViewRequest { + + /** Properties of a CreateViewRequest. */ + interface $Properties { + + /** CreateViewRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** CreateViewRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** CreateViewRequest name */ + name?: (string|null); + + /** CreateViewRequest fromView */ + fromView?: (string|null); + + /** CreateViewRequest empty */ + empty?: (boolean|null); + + /** CreateViewRequest parent */ + parent?: (string|null); + + /** CreateViewRequest scope */ + scope?: (atomic.ViewScope|null); + + /** CreateViewRequest baseSnapshot */ + baseSnapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** CreateViewRequest base */ + base?: ("fromView"|"empty"|"parent"); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Narrowed shape of a CreateViewRequest. */ + type $Shape = { + repository?: atomic.RepositoryRef.$Shape|null; + meta?: atomic.RequestMeta.$Shape|null; + name?: string|null; + fromView?: string|null; + empty?: boolean|null; + parent?: string|null; + scope?: atomic.ViewScope|null; + baseSnapshot?: atomic.ViewSnapshot.$Shape|null; + $unknowns?: Uint8Array[]; + } & ( + ({ base?: undefined; fromView?: null; empty?: null; parent?: null }|{ base?: "fromView"; fromView: string; empty?: null; parent?: null }|{ base?: "empty"; fromView?: null; empty: boolean; parent?: null }|{ base?: "parent"; fromView?: null; empty?: null; parent: string }) + ); + } + + /** + * Properties of a CreateViewResponse. + * @deprecated Use atomic.CreateViewResponse.$Properties instead. + */ + interface ICreateViewResponse extends atomic.CreateViewResponse.$Properties { + } + + /** Represents a CreateViewResponse. */ + class CreateViewResponse { + + /** + * Constructs a new CreateViewResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.CreateViewResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** CreateViewResponse view. */ + view?: (atomic.ViewInfo.$Properties|null); + + /** CreateViewResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** + * Creates a new CreateViewResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateViewResponse instance + */ + static create(properties: atomic.CreateViewResponse.$Shape): atomic.CreateViewResponse & atomic.CreateViewResponse.$Shape; + static create(properties?: atomic.CreateViewResponse.$Properties): atomic.CreateViewResponse; + + /** + * Encodes the specified CreateViewResponse message. Does not implicitly {@link atomic.CreateViewResponse.verify|verify} messages. + * @param message CreateViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.CreateViewResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateViewResponse message, length delimited. Does not implicitly {@link atomic.CreateViewResponse.verify|verify} messages. + * @param message CreateViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.CreateViewResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateViewResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.CreateViewResponse & atomic.CreateViewResponse.$Shape} CreateViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.CreateViewResponse & atomic.CreateViewResponse.$Shape; + + /** + * Decodes a CreateViewResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.CreateViewResponse & atomic.CreateViewResponse.$Shape} CreateViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.CreateViewResponse & atomic.CreateViewResponse.$Shape; + + /** + * Verifies a CreateViewResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateViewResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateViewResponse + */ + static fromObject(object: { [k: string]: any }): atomic.CreateViewResponse; + + /** + * Creates a plain object from a CreateViewResponse message. Also converts values to other types if specified. + * @param message CreateViewResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.CreateViewResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateViewResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for CreateViewResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace CreateViewResponse { + + /** Properties of a CreateViewResponse. */ + interface $Properties { + + /** CreateViewResponse view */ + view?: (atomic.ViewInfo.$Properties|null); + + /** CreateViewResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a CreateViewResponse. */ + type $Shape = atomic.CreateViewResponse.$Properties; + } + + /** + * Properties of a SwitchViewRequest. + * @deprecated Use atomic.SwitchViewRequest.$Properties instead. + */ + interface ISwitchViewRequest extends atomic.SwitchViewRequest.$Properties { + } + + /** Represents a SwitchViewRequest. */ + class SwitchViewRequest { + + /** + * Constructs a new SwitchViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.SwitchViewRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** SwitchViewRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** SwitchViewRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** SwitchViewRequest view. */ + view: string; + + /** SwitchViewRequest bypassDirtyCheck. */ + bypassDirtyCheck?: (boolean|null); + + /** + * Creates a new SwitchViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SwitchViewRequest instance + */ + static create(properties: atomic.SwitchViewRequest.$Shape): atomic.SwitchViewRequest & atomic.SwitchViewRequest.$Shape; + static create(properties?: atomic.SwitchViewRequest.$Properties): atomic.SwitchViewRequest; + + /** + * Encodes the specified SwitchViewRequest message. Does not implicitly {@link atomic.SwitchViewRequest.verify|verify} messages. + * @param message SwitchViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.SwitchViewRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SwitchViewRequest message, length delimited. Does not implicitly {@link atomic.SwitchViewRequest.verify|verify} messages. + * @param message SwitchViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.SwitchViewRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SwitchViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.SwitchViewRequest & atomic.SwitchViewRequest.$Shape} SwitchViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.SwitchViewRequest & atomic.SwitchViewRequest.$Shape; + + /** + * Decodes a SwitchViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.SwitchViewRequest & atomic.SwitchViewRequest.$Shape} SwitchViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.SwitchViewRequest & atomic.SwitchViewRequest.$Shape; + + /** + * Verifies a SwitchViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SwitchViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SwitchViewRequest + */ + static fromObject(object: { [k: string]: any }): atomic.SwitchViewRequest; + + /** + * Creates a plain object from a SwitchViewRequest message. Also converts values to other types if specified. + * @param message SwitchViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.SwitchViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SwitchViewRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for SwitchViewRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace SwitchViewRequest { + + /** Properties of a SwitchViewRequest. */ + interface $Properties { + + /** SwitchViewRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** SwitchViewRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** SwitchViewRequest view */ + view?: (string|null); + + /** SwitchViewRequest bypassDirtyCheck */ + bypassDirtyCheck?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a SwitchViewRequest. */ + type $Shape = atomic.SwitchViewRequest.$Properties; + } + + /** + * Properties of a SwitchViewResponse. + * @deprecated Use atomic.SwitchViewResponse.$Properties instead. + */ + interface ISwitchViewResponse extends atomic.SwitchViewResponse.$Properties { + } + + /** Represents a SwitchViewResponse. */ + class SwitchViewResponse { + + /** + * Constructs a new SwitchViewResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.SwitchViewResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** SwitchViewResponse filesWritten. */ + filesWritten: (number|Long); + + /** SwitchViewResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** + * Creates a new SwitchViewResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SwitchViewResponse instance + */ + static create(properties: atomic.SwitchViewResponse.$Shape): atomic.SwitchViewResponse & atomic.SwitchViewResponse.$Shape; + static create(properties?: atomic.SwitchViewResponse.$Properties): atomic.SwitchViewResponse; + + /** + * Encodes the specified SwitchViewResponse message. Does not implicitly {@link atomic.SwitchViewResponse.verify|verify} messages. + * @param message SwitchViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.SwitchViewResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SwitchViewResponse message, length delimited. Does not implicitly {@link atomic.SwitchViewResponse.verify|verify} messages. + * @param message SwitchViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.SwitchViewResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SwitchViewResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.SwitchViewResponse & atomic.SwitchViewResponse.$Shape} SwitchViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.SwitchViewResponse & atomic.SwitchViewResponse.$Shape; + + /** + * Decodes a SwitchViewResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.SwitchViewResponse & atomic.SwitchViewResponse.$Shape} SwitchViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.SwitchViewResponse & atomic.SwitchViewResponse.$Shape; + + /** + * Verifies a SwitchViewResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SwitchViewResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SwitchViewResponse + */ + static fromObject(object: { [k: string]: any }): atomic.SwitchViewResponse; + + /** + * Creates a plain object from a SwitchViewResponse message. Also converts values to other types if specified. + * @param message SwitchViewResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.SwitchViewResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SwitchViewResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for SwitchViewResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace SwitchViewResponse { + + /** Properties of a SwitchViewResponse. */ + interface $Properties { + + /** SwitchViewResponse filesWritten */ + filesWritten?: (number|Long|null); + + /** SwitchViewResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a SwitchViewResponse. */ + type $Shape = atomic.SwitchViewResponse.$Properties; + } + + /** + * Properties of a DeleteViewRequest. + * @deprecated Use atomic.DeleteViewRequest.$Properties instead. + */ + interface IDeleteViewRequest extends atomic.DeleteViewRequest.$Properties { + } + + /** Represents a DeleteViewRequest. */ + class DeleteViewRequest { + + /** + * Constructs a new DeleteViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.DeleteViewRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** DeleteViewRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** DeleteViewRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** DeleteViewRequest view. */ + view: string; + + /** DeleteViewRequest expected. */ + expected?: (atomic.ExpectedState.$Properties|null); + + /** + * Creates a new DeleteViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteViewRequest instance + */ + static create(properties: atomic.DeleteViewRequest.$Shape): atomic.DeleteViewRequest & atomic.DeleteViewRequest.$Shape; + static create(properties?: atomic.DeleteViewRequest.$Properties): atomic.DeleteViewRequest; + + /** + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link atomic.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.DeleteViewRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link atomic.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.DeleteViewRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.DeleteViewRequest & atomic.DeleteViewRequest.$Shape} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.DeleteViewRequest & atomic.DeleteViewRequest.$Shape; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.DeleteViewRequest & atomic.DeleteViewRequest.$Shape} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.DeleteViewRequest & atomic.DeleteViewRequest.$Shape; + + /** + * Verifies a DeleteViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteViewRequest + */ + static fromObject(object: { [k: string]: any }): atomic.DeleteViewRequest; + + /** + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * @param message DeleteViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.DeleteViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteViewRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for DeleteViewRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace DeleteViewRequest { + + /** Properties of a DeleteViewRequest. */ + interface $Properties { + + /** DeleteViewRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** DeleteViewRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** DeleteViewRequest view */ + view?: (string|null); + + /** DeleteViewRequest expected */ + expected?: (atomic.ExpectedState.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a DeleteViewRequest. */ + type $Shape = { + repository?: atomic.RepositoryRef.$Shape|null; + meta?: atomic.RequestMeta.$Shape|null; + view?: string|null; + expected?: atomic.ExpectedState.$Shape|null; + $unknowns?: Uint8Array[]; + }; + } + + /** + * Properties of a DeleteViewResponse. + * @deprecated Use atomic.DeleteViewResponse.$Properties instead. + */ + interface IDeleteViewResponse extends atomic.DeleteViewResponse.$Properties { + } + + /** Represents a DeleteViewResponse. */ + class DeleteViewResponse { + + /** + * Constructs a new DeleteViewResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.DeleteViewResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** DeleteViewResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** + * Creates a new DeleteViewResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteViewResponse instance + */ + static create(properties: atomic.DeleteViewResponse.$Shape): atomic.DeleteViewResponse & atomic.DeleteViewResponse.$Shape; + static create(properties?: atomic.DeleteViewResponse.$Properties): atomic.DeleteViewResponse; + + /** + * Encodes the specified DeleteViewResponse message. Does not implicitly {@link atomic.DeleteViewResponse.verify|verify} messages. + * @param message DeleteViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.DeleteViewResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteViewResponse message, length delimited. Does not implicitly {@link atomic.DeleteViewResponse.verify|verify} messages. + * @param message DeleteViewResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.DeleteViewResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteViewResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.DeleteViewResponse & atomic.DeleteViewResponse.$Shape} DeleteViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.DeleteViewResponse & atomic.DeleteViewResponse.$Shape; + + /** + * Decodes a DeleteViewResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.DeleteViewResponse & atomic.DeleteViewResponse.$Shape} DeleteViewResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.DeleteViewResponse & atomic.DeleteViewResponse.$Shape; + + /** + * Verifies a DeleteViewResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteViewResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteViewResponse + */ + static fromObject(object: { [k: string]: any }): atomic.DeleteViewResponse; + + /** + * Creates a plain object from a DeleteViewResponse message. Also converts values to other types if specified. + * @param message DeleteViewResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.DeleteViewResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteViewResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for DeleteViewResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace DeleteViewResponse { + + /** Properties of a DeleteViewResponse. */ + interface $Properties { + + /** DeleteViewResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a DeleteViewResponse. */ + type $Shape = atomic.DeleteViewResponse.$Properties; + } + + /** + * Properties of a GetVaultEntryRequest. + * @deprecated Use atomic.GetVaultEntryRequest.$Properties instead. + */ + interface IGetVaultEntryRequest extends atomic.GetVaultEntryRequest.$Properties { + } + + /** Represents a GetVaultEntryRequest. */ + class GetVaultEntryRequest { + + /** + * Constructs a new GetVaultEntryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetVaultEntryRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetVaultEntryRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** GetVaultEntryRequest kind. */ + kind: atomic.VaultEntityKind; + + /** GetVaultEntryRequest id. */ + id: string; + + /** GetVaultEntryRequest path. */ + path?: (string|null); + + /** GetVaultEntryRequest includeBundle. */ + includeBundle: boolean; + + /** GetVaultEntryRequest view. */ + view?: (atomic.ViewRef.$Properties|null); + + /** + * Creates a new GetVaultEntryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVaultEntryRequest instance + */ + static create(properties: atomic.GetVaultEntryRequest.$Shape): atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape; + static create(properties?: atomic.GetVaultEntryRequest.$Properties): atomic.GetVaultEntryRequest; + + /** + * Encodes the specified GetVaultEntryRequest message. Does not implicitly {@link atomic.GetVaultEntryRequest.verify|verify} messages. + * @param message GetVaultEntryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetVaultEntryRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVaultEntryRequest message, length delimited. Does not implicitly {@link atomic.GetVaultEntryRequest.verify|verify} messages. + * @param message GetVaultEntryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetVaultEntryRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVaultEntryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape} GetVaultEntryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape; + + /** + * Decodes a GetVaultEntryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape} GetVaultEntryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape; + + /** + * Verifies a GetVaultEntryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVaultEntryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVaultEntryRequest + */ + static fromObject(object: { [k: string]: any }): atomic.GetVaultEntryRequest; + + /** + * Creates a plain object from a GetVaultEntryRequest message. Also converts values to other types if specified. + * @param message GetVaultEntryRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetVaultEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVaultEntryRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetVaultEntryRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetVaultEntryRequest { + + /** Properties of a GetVaultEntryRequest. */ + interface $Properties { + + /** GetVaultEntryRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** GetVaultEntryRequest kind */ + kind?: (atomic.VaultEntityKind|null); + + /** GetVaultEntryRequest id */ + id?: (string|null); + + /** GetVaultEntryRequest path */ + path?: (string|null); + + /** GetVaultEntryRequest includeBundle */ + includeBundle?: (boolean|null); + + /** GetVaultEntryRequest view */ + view?: (atomic.ViewRef.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetVaultEntryRequest. */ + type $Shape = atomic.GetVaultEntryRequest.$Properties; + } + + /** VaultEntityKind enum. */ + enum VaultEntityKind { + + /** VAULT_ENTITY_KIND_UNSPECIFIED value */ + VAULT_ENTITY_KIND_UNSPECIFIED = 0, + + /** VAULT_ENTITY_KIND_INTENT value */ + VAULT_ENTITY_KIND_INTENT = 1, + + /** VAULT_ENTITY_KIND_MEMORY value */ + VAULT_ENTITY_KIND_MEMORY = 2, + + /** VAULT_ENTITY_KIND_GOAL value */ + VAULT_ENTITY_KIND_GOAL = 3 + } + + /** + * Properties of a GetVaultEntryResponse. + * @deprecated Use atomic.GetVaultEntryResponse.$Properties instead. + */ + interface IGetVaultEntryResponse extends atomic.GetVaultEntryResponse.$Properties { + } + + /** Represents a GetVaultEntryResponse. */ + class GetVaultEntryResponse { + + /** + * Constructs a new GetVaultEntryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetVaultEntryResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetVaultEntryResponse entry. */ + entry?: (atomic.VaultEntry.$Properties|null); + + /** GetVaultEntryResponse snapshot. */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** GetVaultEntryResponse entryBundle. */ + entryBundle?: (atomic.VersionedBytes.$Properties|null); + + /** + * Creates a new GetVaultEntryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVaultEntryResponse instance + */ + static create(properties: atomic.GetVaultEntryResponse.$Shape): atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape; + static create(properties?: atomic.GetVaultEntryResponse.$Properties): atomic.GetVaultEntryResponse; + + /** + * Encodes the specified GetVaultEntryResponse message. Does not implicitly {@link atomic.GetVaultEntryResponse.verify|verify} messages. + * @param message GetVaultEntryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetVaultEntryResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVaultEntryResponse message, length delimited. Does not implicitly {@link atomic.GetVaultEntryResponse.verify|verify} messages. + * @param message GetVaultEntryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetVaultEntryResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVaultEntryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape} GetVaultEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape; + + /** + * Decodes a GetVaultEntryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape} GetVaultEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape; + + /** + * Verifies a GetVaultEntryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVaultEntryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVaultEntryResponse + */ + static fromObject(object: { [k: string]: any }): atomic.GetVaultEntryResponse; + + /** + * Creates a plain object from a GetVaultEntryResponse message. Also converts values to other types if specified. + * @param message GetVaultEntryResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetVaultEntryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVaultEntryResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetVaultEntryResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetVaultEntryResponse { + + /** Properties of a GetVaultEntryResponse. */ + interface $Properties { + + /** GetVaultEntryResponse entry */ + entry?: (atomic.VaultEntry.$Properties|null); + + /** GetVaultEntryResponse snapshot */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** GetVaultEntryResponse entryBundle */ + entryBundle?: (atomic.VersionedBytes.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetVaultEntryResponse. */ + type $Shape = atomic.GetVaultEntryResponse.$Properties; + } + + /** + * Properties of a VaultEntry. + * @deprecated Use atomic.VaultEntry.$Properties instead. + */ + interface IVaultEntry extends atomic.VaultEntry.$Properties { + } + + /** Represents a VaultEntry. */ + class VaultEntry { + + /** + * Constructs a new VaultEntry. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.VaultEntry.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** VaultEntry kind. */ + kind: atomic.VaultEntityKind; + + /** VaultEntry id. */ + id: string; + + /** VaultEntry title. */ + title: string; + + /** VaultEntry status. */ + status?: (atomic.VaultEntityStatus|null); + + /** VaultEntry body. */ + body?: (string|null); + + /** VaultEntry createdAt. */ + createdAt?: (google.protobuf.Timestamp.$Properties|null); + + /** VaultEntry updatedAt. */ + updatedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** VaultEntry linked. */ + linked: string[]; + + /** VaultEntry vaultPath. */ + vaultPath?: (string|null); + + /** VaultEntry priority. */ + priority?: (string|null); + + /** VaultEntry manifestKind. */ + manifestKind?: (string|null); + + /** VaultEntry attested. */ + attested?: (string|null); + + /** VaultEntry verifies. */ + verifies?: (string|null); + + /** VaultEntry memoryKind. */ + memoryKind?: (string|null); + + /** VaultEntry memoryStatus. */ + memoryStatus?: (string|null); + + /** VaultEntry aboutCount. */ + aboutCount?: (number|null); + + /** VaultEntry contentSize. */ + contentSize?: (number|Long|null); + + /** VaultEntry updatedAtLabel. */ + updatedAtLabel?: (string|null); + + /** VaultEntry entryType. */ + entryType?: (string|null); + + /** VaultEntry startedAt. */ + startedAt?: (string|null); + + /** VaultEntry turns. */ + turns?: (number|null); + + /** VaultEntry assignee. */ + assignee?: (string|null); + + /** VaultEntry statusLabel. */ + statusLabel?: (string|null); + + /** VaultEntry developer. */ + developer?: (string|null); + + /** VaultEntry goalDir. */ + goalDir?: (string|null); + + /** VaultEntry goalFile. */ + goalFile?: (string|null); + + /** + * Creates a new VaultEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns VaultEntry instance + */ + static create(properties: atomic.VaultEntry.$Shape): atomic.VaultEntry & atomic.VaultEntry.$Shape; + static create(properties?: atomic.VaultEntry.$Properties): atomic.VaultEntry; + + /** + * Encodes the specified VaultEntry message. Does not implicitly {@link atomic.VaultEntry.verify|verify} messages. + * @param message VaultEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.VaultEntry.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VaultEntry message, length delimited. Does not implicitly {@link atomic.VaultEntry.verify|verify} messages. + * @param message VaultEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.VaultEntry.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VaultEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.VaultEntry & atomic.VaultEntry.$Shape} VaultEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.VaultEntry & atomic.VaultEntry.$Shape; + + /** + * Decodes a VaultEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.VaultEntry & atomic.VaultEntry.$Shape} VaultEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.VaultEntry & atomic.VaultEntry.$Shape; + + /** + * Verifies a VaultEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VaultEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VaultEntry + */ + static fromObject(object: { [k: string]: any }): atomic.VaultEntry; + + /** + * Creates a plain object from a VaultEntry message. Also converts values to other types if specified. + * @param message VaultEntry + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.VaultEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VaultEntry to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for VaultEntry + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace VaultEntry { + + /** Properties of a VaultEntry. */ + interface $Properties { + + /** VaultEntry kind */ + kind?: (atomic.VaultEntityKind|null); + + /** VaultEntry id */ + id?: (string|null); + + /** VaultEntry title */ + title?: (string|null); + + /** VaultEntry status */ + status?: (atomic.VaultEntityStatus|null); + + /** VaultEntry body */ + body?: (string|null); + + /** VaultEntry createdAt */ + createdAt?: (google.protobuf.Timestamp.$Properties|null); + + /** VaultEntry updatedAt */ + updatedAt?: (google.protobuf.Timestamp.$Properties|null); + + /** VaultEntry linked */ + linked?: (string[]|null); + + /** VaultEntry vaultPath */ + vaultPath?: (string|null); + + /** VaultEntry priority */ + priority?: (string|null); + + /** VaultEntry manifestKind */ + manifestKind?: (string|null); + + /** VaultEntry attested */ + attested?: (string|null); + + /** VaultEntry verifies */ + verifies?: (string|null); + + /** VaultEntry memoryKind */ + memoryKind?: (string|null); + + /** VaultEntry memoryStatus */ + memoryStatus?: (string|null); + + /** VaultEntry aboutCount */ + aboutCount?: (number|null); + + /** VaultEntry contentSize */ + contentSize?: (number|Long|null); + + /** VaultEntry updatedAtLabel */ + updatedAtLabel?: (string|null); + + /** VaultEntry entryType */ + entryType?: (string|null); + + /** VaultEntry startedAt */ + startedAt?: (string|null); + + /** VaultEntry turns */ + turns?: (number|null); + + /** VaultEntry assignee */ + assignee?: (string|null); + + /** VaultEntry statusLabel */ + statusLabel?: (string|null); + + /** VaultEntry developer */ + developer?: (string|null); + + /** VaultEntry goalDir */ + goalDir?: (string|null); + + /** VaultEntry goalFile */ + goalFile?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a VaultEntry. */ + type $Shape = atomic.VaultEntry.$Properties; + } + + /** VaultEntityStatus enum. */ + enum VaultEntityStatus { + + /** VAULT_ENTITY_STATUS_UNSPECIFIED value */ + VAULT_ENTITY_STATUS_UNSPECIFIED = 0, + + /** VAULT_ENTITY_STATUS_BACKLOG value */ + VAULT_ENTITY_STATUS_BACKLOG = 1, + + /** VAULT_ENTITY_STATUS_IN_PROGRESS value */ + VAULT_ENTITY_STATUS_IN_PROGRESS = 2, + + /** VAULT_ENTITY_STATUS_NEEDS_REVIEW value */ + VAULT_ENTITY_STATUS_NEEDS_REVIEW = 3, + + /** VAULT_ENTITY_STATUS_PLANNED value */ + VAULT_ENTITY_STATUS_PLANNED = 4, + + /** VAULT_ENTITY_STATUS_DONE value */ + VAULT_ENTITY_STATUS_DONE = 5, + + /** VAULT_ENTITY_STATUS_ACTIVE value */ + VAULT_ENTITY_STATUS_ACTIVE = 6, + + /** VAULT_ENTITY_STATUS_SUSPENDED value */ + VAULT_ENTITY_STATUS_SUSPENDED = 7, + + /** VAULT_ENTITY_STATUS_COMPLETED value */ + VAULT_ENTITY_STATUS_COMPLETED = 8, + + /** VAULT_ENTITY_STATUS_SUPERSEDED value */ + VAULT_ENTITY_STATUS_SUPERSEDED = 9, + + /** VAULT_ENTITY_STATUS_RETRACTED value */ + VAULT_ENTITY_STATUS_RETRACTED = 10 + } + + /** + * Properties of a ListVaultEntriesRequest. + * @deprecated Use atomic.ListVaultEntriesRequest.$Properties instead. + */ + interface IListVaultEntriesRequest extends atomic.ListVaultEntriesRequest.$Properties { + } + + /** Represents a ListVaultEntriesRequest. */ + class ListVaultEntriesRequest { + + /** + * Constructs a new ListVaultEntriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ListVaultEntriesRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ListVaultEntriesRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** ListVaultEntriesRequest kind. */ + kind?: (atomic.VaultEntityKind|null); + + /** ListVaultEntriesRequest status. */ + status?: (atomic.VaultEntityStatus|null); + + /** ListVaultEntriesRequest summariesOnly. */ + summariesOnly: boolean; + + /** ListVaultEntriesRequest cursor. */ + cursor?: (atomic.PageCursor.$Properties|null); + + /** ListVaultEntriesRequest budget. */ + budget?: (atomic.PageBudget.$Properties|null); + + /** ListVaultEntriesRequest identity. */ + identity?: (string|null); + + /** ListVaultEntriesRequest pathPrefix. */ + pathPrefix?: (string|null); + + /** ListVaultEntriesRequest entryType. */ + entryType?: (string|null); + + /** ListVaultEntriesRequest statusFilter. */ + statusFilter?: (string|null); + + /** ListVaultEntriesRequest toolResultPreviews. */ + toolResultPreviews: boolean; + + /** ListVaultEntriesRequest view. */ + view?: (atomic.ViewRef.$Properties|null); + + /** + * Creates a new ListVaultEntriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVaultEntriesRequest instance + */ + static create(properties: atomic.ListVaultEntriesRequest.$Shape): atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape; + static create(properties?: atomic.ListVaultEntriesRequest.$Properties): atomic.ListVaultEntriesRequest; + + /** + * Encodes the specified ListVaultEntriesRequest message. Does not implicitly {@link atomic.ListVaultEntriesRequest.verify|verify} messages. + * @param message ListVaultEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ListVaultEntriesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVaultEntriesRequest message, length delimited. Does not implicitly {@link atomic.ListVaultEntriesRequest.verify|verify} messages. + * @param message ListVaultEntriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ListVaultEntriesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVaultEntriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape} ListVaultEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape; + + /** + * Decodes a ListVaultEntriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape} ListVaultEntriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape; + + /** + * Verifies a ListVaultEntriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVaultEntriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVaultEntriesRequest + */ + static fromObject(object: { [k: string]: any }): atomic.ListVaultEntriesRequest; + + /** + * Creates a plain object from a ListVaultEntriesRequest message. Also converts values to other types if specified. + * @param message ListVaultEntriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ListVaultEntriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVaultEntriesRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ListVaultEntriesRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ListVaultEntriesRequest { + + /** Properties of a ListVaultEntriesRequest. */ + interface $Properties { + + /** ListVaultEntriesRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** ListVaultEntriesRequest kind */ + kind?: (atomic.VaultEntityKind|null); + + /** ListVaultEntriesRequest status */ + status?: (atomic.VaultEntityStatus|null); + + /** ListVaultEntriesRequest summariesOnly */ + summariesOnly?: (boolean|null); + + /** ListVaultEntriesRequest cursor */ + cursor?: (atomic.PageCursor.$Properties|null); + + /** ListVaultEntriesRequest budget */ + budget?: (atomic.PageBudget.$Properties|null); + + /** ListVaultEntriesRequest identity */ + identity?: (string|null); + + /** ListVaultEntriesRequest pathPrefix */ + pathPrefix?: (string|null); + + /** ListVaultEntriesRequest entryType */ + entryType?: (string|null); + + /** ListVaultEntriesRequest statusFilter */ + statusFilter?: (string|null); + + /** ListVaultEntriesRequest toolResultPreviews */ + toolResultPreviews?: (boolean|null); + + /** ListVaultEntriesRequest view */ + view?: (atomic.ViewRef.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ListVaultEntriesRequest. */ + type $Shape = atomic.ListVaultEntriesRequest.$Properties; + } + + /** + * Properties of a ListVaultEntriesResponse. + * @deprecated Use atomic.ListVaultEntriesResponse.$Properties instead. + */ + interface IListVaultEntriesResponse extends atomic.ListVaultEntriesResponse.$Properties { + } + + /** Represents a ListVaultEntriesResponse. */ + class ListVaultEntriesResponse { + + /** + * Constructs a new ListVaultEntriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ListVaultEntriesResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ListVaultEntriesResponse entries. */ + entries: atomic.VaultEntry.$Properties[]; + + /** ListVaultEntriesResponse nextCursor. */ + nextCursor?: (atomic.PageCursor.$Properties|null); + + /** ListVaultEntriesResponse snapshot. */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** + * Creates a new ListVaultEntriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVaultEntriesResponse instance + */ + static create(properties: atomic.ListVaultEntriesResponse.$Shape): atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape; + static create(properties?: atomic.ListVaultEntriesResponse.$Properties): atomic.ListVaultEntriesResponse; + + /** + * Encodes the specified ListVaultEntriesResponse message. Does not implicitly {@link atomic.ListVaultEntriesResponse.verify|verify} messages. + * @param message ListVaultEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ListVaultEntriesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVaultEntriesResponse message, length delimited. Does not implicitly {@link atomic.ListVaultEntriesResponse.verify|verify} messages. + * @param message ListVaultEntriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ListVaultEntriesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVaultEntriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape} ListVaultEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape; + + /** + * Decodes a ListVaultEntriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape} ListVaultEntriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape; + + /** + * Verifies a ListVaultEntriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVaultEntriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVaultEntriesResponse + */ + static fromObject(object: { [k: string]: any }): atomic.ListVaultEntriesResponse; + + /** + * Creates a plain object from a ListVaultEntriesResponse message. Also converts values to other types if specified. + * @param message ListVaultEntriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ListVaultEntriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVaultEntriesResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ListVaultEntriesResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ListVaultEntriesResponse { + + /** Properties of a ListVaultEntriesResponse. */ + interface $Properties { + + /** ListVaultEntriesResponse entries */ + entries?: (atomic.VaultEntry.$Properties[]|null); + + /** ListVaultEntriesResponse nextCursor */ + nextCursor?: (atomic.PageCursor.$Properties|null); + + /** ListVaultEntriesResponse snapshot */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ListVaultEntriesResponse. */ + type $Shape = atomic.ListVaultEntriesResponse.$Properties; + } + + /** + * Properties of a GetVaultContextRequest. + * @deprecated Use atomic.GetVaultContextRequest.$Properties instead. + */ + interface IGetVaultContextRequest extends atomic.GetVaultContextRequest.$Properties { + } + + /** Represents a GetVaultContextRequest. */ + class GetVaultContextRequest { + + /** + * Constructs a new GetVaultContextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetVaultContextRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetVaultContextRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** GetVaultContextRequest maxEntries. */ + maxEntries?: (number|null); + + /** GetVaultContextRequest kinds. */ + kinds: atomic.VaultEntityKind[]; + + /** GetVaultContextRequest query. */ + query: string[]; + + /** GetVaultContextRequest intent. */ + intent?: (string|null); + + /** GetVaultContextRequest files. */ + files: string[]; + + /** GetVaultContextRequest budgetChars. */ + budgetChars?: (number|null); + + /** GetVaultContextRequest includeBody. */ + includeBody?: (boolean|null); + + /** GetVaultContextRequest view. */ + view?: (atomic.ViewRef.$Properties|null); + + /** + * Creates a new GetVaultContextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVaultContextRequest instance + */ + static create(properties: atomic.GetVaultContextRequest.$Shape): atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape; + static create(properties?: atomic.GetVaultContextRequest.$Properties): atomic.GetVaultContextRequest; + + /** + * Encodes the specified GetVaultContextRequest message. Does not implicitly {@link atomic.GetVaultContextRequest.verify|verify} messages. + * @param message GetVaultContextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetVaultContextRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVaultContextRequest message, length delimited. Does not implicitly {@link atomic.GetVaultContextRequest.verify|verify} messages. + * @param message GetVaultContextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetVaultContextRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVaultContextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape} GetVaultContextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape; + + /** + * Decodes a GetVaultContextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape} GetVaultContextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape; + + /** + * Verifies a GetVaultContextRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVaultContextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVaultContextRequest + */ + static fromObject(object: { [k: string]: any }): atomic.GetVaultContextRequest; + + /** + * Creates a plain object from a GetVaultContextRequest message. Also converts values to other types if specified. + * @param message GetVaultContextRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetVaultContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVaultContextRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetVaultContextRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetVaultContextRequest { + + /** Properties of a GetVaultContextRequest. */ + interface $Properties { + + /** GetVaultContextRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** GetVaultContextRequest maxEntries */ + maxEntries?: (number|null); + + /** GetVaultContextRequest kinds */ + kinds?: (atomic.VaultEntityKind[]|null); + + /** GetVaultContextRequest query */ + query?: (string[]|null); + + /** GetVaultContextRequest intent */ + intent?: (string|null); + + /** GetVaultContextRequest files */ + files?: (string[]|null); + + /** GetVaultContextRequest budgetChars */ + budgetChars?: (number|null); + + /** GetVaultContextRequest includeBody */ + includeBody?: (boolean|null); + + /** GetVaultContextRequest view */ + view?: (atomic.ViewRef.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetVaultContextRequest. */ + type $Shape = atomic.GetVaultContextRequest.$Properties; + } + + /** + * Properties of a GetVaultContextResponse. + * @deprecated Use atomic.GetVaultContextResponse.$Properties instead. + */ + interface IGetVaultContextResponse extends atomic.GetVaultContextResponse.$Properties { + } + + /** Represents a GetVaultContextResponse. */ + class GetVaultContextResponse { + + /** + * Constructs a new GetVaultContextResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetVaultContextResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetVaultContextResponse entries. */ + entries: atomic.VaultEntry.$Properties[]; + + /** GetVaultContextResponse context. */ + context: atomic.ContextItem.$Properties[]; + + /** GetVaultContextResponse snapshot. */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** + * Creates a new GetVaultContextResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVaultContextResponse instance + */ + static create(properties: atomic.GetVaultContextResponse.$Shape): atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape; + static create(properties?: atomic.GetVaultContextResponse.$Properties): atomic.GetVaultContextResponse; + + /** + * Encodes the specified GetVaultContextResponse message. Does not implicitly {@link atomic.GetVaultContextResponse.verify|verify} messages. + * @param message GetVaultContextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetVaultContextResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVaultContextResponse message, length delimited. Does not implicitly {@link atomic.GetVaultContextResponse.verify|verify} messages. + * @param message GetVaultContextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetVaultContextResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVaultContextResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape} GetVaultContextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape; + + /** + * Decodes a GetVaultContextResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape} GetVaultContextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape; + + /** + * Verifies a GetVaultContextResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVaultContextResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVaultContextResponse + */ + static fromObject(object: { [k: string]: any }): atomic.GetVaultContextResponse; + + /** + * Creates a plain object from a GetVaultContextResponse message. Also converts values to other types if specified. + * @param message GetVaultContextResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetVaultContextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVaultContextResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetVaultContextResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetVaultContextResponse { + + /** Properties of a GetVaultContextResponse. */ + interface $Properties { + + /** GetVaultContextResponse entries */ + entries?: (atomic.VaultEntry.$Properties[]|null); + + /** GetVaultContextResponse context */ + context?: (atomic.ContextItem.$Properties[]|null); + + /** GetVaultContextResponse snapshot */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetVaultContextResponse. */ + type $Shape = atomic.GetVaultContextResponse.$Properties; + } + + /** + * Properties of a ContextItem. + * @deprecated Use atomic.ContextItem.$Properties instead. + */ + interface IContextItem extends atomic.ContextItem.$Properties { + } + + /** Represents a ContextItem. */ + class ContextItem { + + /** + * Constructs a new ContextItem. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ContextItem.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ContextItem memoryId. */ + memoryId: string; + + /** ContextItem kgNodeId. */ + kgNodeId: string; + + /** ContextItem revisionHash. */ + revisionHash: string; + + /** ContextItem contentHash. */ + contentHash: string; + + /** ContextItem path. */ + path: string; + + /** ContextItem name. */ + name: string; + + /** ContextItem kind. */ + kind: string; + + /** ContextItem status. */ + status: string; + + /** ContextItem score. */ + score: number; + + /** ContextItem whyMatched. */ + whyMatched: string; + + /** ContextItem body. */ + body?: (string|null); + + /** ContextItem preview. */ + preview?: (string|null); + + /** ContextItem updatedAt. */ + updatedAt: string; + + /** ContextItem introducedBy. */ + introducedBy: (number|Long); + + /** ContextItem recorded. */ + recorded: boolean; + + /** ContextItem truncated. */ + truncated: boolean; + + /** + * Creates a new ContextItem instance using the specified properties. + * @param [properties] Properties to set + * @returns ContextItem instance + */ + static create(properties: atomic.ContextItem.$Shape): atomic.ContextItem & atomic.ContextItem.$Shape; + static create(properties?: atomic.ContextItem.$Properties): atomic.ContextItem; + + /** + * Encodes the specified ContextItem message. Does not implicitly {@link atomic.ContextItem.verify|verify} messages. + * @param message ContextItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ContextItem.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContextItem message, length delimited. Does not implicitly {@link atomic.ContextItem.verify|verify} messages. + * @param message ContextItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ContextItem.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContextItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ContextItem & atomic.ContextItem.$Shape} ContextItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ContextItem & atomic.ContextItem.$Shape; + + /** + * Decodes a ContextItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ContextItem & atomic.ContextItem.$Shape} ContextItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ContextItem & atomic.ContextItem.$Shape; + + /** + * Verifies a ContextItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContextItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContextItem + */ + static fromObject(object: { [k: string]: any }): atomic.ContextItem; + + /** + * Creates a plain object from a ContextItem message. Also converts values to other types if specified. + * @param message ContextItem + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ContextItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContextItem to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ContextItem + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ContextItem { + + /** Properties of a ContextItem. */ + interface $Properties { + + /** ContextItem memoryId */ + memoryId?: (string|null); + + /** ContextItem kgNodeId */ + kgNodeId?: (string|null); + + /** ContextItem revisionHash */ + revisionHash?: (string|null); + + /** ContextItem contentHash */ + contentHash?: (string|null); + + /** ContextItem path */ + path?: (string|null); + + /** ContextItem name */ + name?: (string|null); + + /** ContextItem kind */ + kind?: (string|null); + + /** ContextItem status */ + status?: (string|null); + + /** ContextItem score */ + score?: (number|null); + + /** ContextItem whyMatched */ + whyMatched?: (string|null); + + /** ContextItem body */ + body?: (string|null); + + /** ContextItem preview */ + preview?: (string|null); + + /** ContextItem updatedAt */ + updatedAt?: (string|null); + + /** ContextItem introducedBy */ + introducedBy?: (number|Long|null); + + /** ContextItem recorded */ + recorded?: (boolean|null); + + /** ContextItem truncated */ + truncated?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ContextItem. */ + type $Shape = atomic.ContextItem.$Properties; + } + + /** + * Properties of a VerifyAttestationRequest. + * @deprecated Use atomic.VerifyAttestationRequest.$Properties instead. + */ + interface IVerifyAttestationRequest extends atomic.VerifyAttestationRequest.$Properties { + } + + /** Represents a VerifyAttestationRequest. */ + class VerifyAttestationRequest { + + /** + * Constructs a new VerifyAttestationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.VerifyAttestationRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** VerifyAttestationRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** VerifyAttestationRequest attestationId. */ + attestationId?: (string|null); + + /** VerifyAttestationRequest subject. */ + subject?: (atomic.AttestationTarget.$Properties|null); + + /** VerifyAttestationRequest view. */ + view?: (atomic.ViewRef.$Properties|null); + + /** VerifyAttestationRequest identityName. */ + identityName?: (string|null); + + /** VerifyAttestationRequest publicKey. */ + publicKey?: (Uint8Array|null); + + /** VerifyAttestationRequest target. */ + target?: ("attestationId"|"subject"); + + /** + * Creates a new VerifyAttestationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyAttestationRequest instance + */ + static create(properties: atomic.VerifyAttestationRequest.$Shape): atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape; + static create(properties?: atomic.VerifyAttestationRequest.$Properties): atomic.VerifyAttestationRequest; + + /** + * Encodes the specified VerifyAttestationRequest message. Does not implicitly {@link atomic.VerifyAttestationRequest.verify|verify} messages. + * @param message VerifyAttestationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.VerifyAttestationRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyAttestationRequest message, length delimited. Does not implicitly {@link atomic.VerifyAttestationRequest.verify|verify} messages. + * @param message VerifyAttestationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.VerifyAttestationRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape} VerifyAttestationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape} VerifyAttestationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape; + + /** + * Verifies a VerifyAttestationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyAttestationRequest + */ + static fromObject(object: { [k: string]: any }): atomic.VerifyAttestationRequest; + + /** + * Creates a plain object from a VerifyAttestationRequest message. Also converts values to other types if specified. + * @param message VerifyAttestationRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.VerifyAttestationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyAttestationRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for VerifyAttestationRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace VerifyAttestationRequest { + + /** Properties of a VerifyAttestationRequest. */ + interface $Properties { + + /** VerifyAttestationRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** VerifyAttestationRequest attestationId */ + attestationId?: (string|null); + + /** VerifyAttestationRequest subject */ + subject?: (atomic.AttestationTarget.$Properties|null); + + /** VerifyAttestationRequest view */ + view?: (atomic.ViewRef.$Properties|null); + + /** VerifyAttestationRequest identityName */ + identityName?: (string|null); + + /** VerifyAttestationRequest publicKey */ + publicKey?: (Uint8Array|null); + + /** VerifyAttestationRequest target */ + target?: ("attestationId"|"subject"); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Narrowed shape of a VerifyAttestationRequest. */ + type $Shape = { + repository?: atomic.RepositoryRef.$Shape|null; + attestationId?: string|null; + subject?: atomic.AttestationTarget.$Shape|null; + view?: atomic.ViewRef.$Shape|null; + identityName?: string|null; + publicKey?: Uint8Array|null; + $unknowns?: Uint8Array[]; + } & ( + ({ target?: undefined; attestationId?: null; subject?: null }|{ target?: "attestationId"; attestationId: string; subject?: null }|{ target?: "subject"; attestationId?: null; subject: atomic.AttestationTarget.$Shape }) + ); + } + + /** + * Properties of an AttestationTarget. + * @deprecated Use atomic.AttestationTarget.$Properties instead. + */ + interface IAttestationTarget extends atomic.AttestationTarget.$Properties { + } + + /** Represents an AttestationTarget. */ + class AttestationTarget { + + /** + * Constructs a new AttestationTarget. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.AttestationTarget.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** AttestationTarget intentId. */ + intentId?: (string|null); + + /** AttestationTarget memoryId. */ + memoryId?: (string|null); + + /** AttestationTarget changeHash. */ + changeHash?: (atomic.Hash.$Properties|null); + + /** AttestationTarget graphStats. */ + graphStats?: (atomic.GraphStatsRef.$Properties|null); + + /** AttestationTarget kind. */ + kind?: ("intentId"|"memoryId"|"changeHash"|"graphStats"); + + /** + * Creates a new AttestationTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns AttestationTarget instance + */ + static create(properties: atomic.AttestationTarget.$Shape): atomic.AttestationTarget & atomic.AttestationTarget.$Shape; + static create(properties?: atomic.AttestationTarget.$Properties): atomic.AttestationTarget; + + /** + * Encodes the specified AttestationTarget message. Does not implicitly {@link atomic.AttestationTarget.verify|verify} messages. + * @param message AttestationTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.AttestationTarget.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttestationTarget message, length delimited. Does not implicitly {@link atomic.AttestationTarget.verify|verify} messages. + * @param message AttestationTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.AttestationTarget.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttestationTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.AttestationTarget & atomic.AttestationTarget.$Shape} AttestationTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.AttestationTarget & atomic.AttestationTarget.$Shape; + + /** + * Decodes an AttestationTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.AttestationTarget & atomic.AttestationTarget.$Shape} AttestationTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.AttestationTarget & atomic.AttestationTarget.$Shape; + + /** + * Verifies an AttestationTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AttestationTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttestationTarget + */ + static fromObject(object: { [k: string]: any }): atomic.AttestationTarget; + + /** + * Creates a plain object from an AttestationTarget message. Also converts values to other types if specified. + * @param message AttestationTarget + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.AttestationTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttestationTarget to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for AttestationTarget + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace AttestationTarget { + + /** Properties of an AttestationTarget. */ + interface $Properties { + + /** AttestationTarget intentId */ + intentId?: (string|null); + + /** AttestationTarget memoryId */ + memoryId?: (string|null); + + /** AttestationTarget changeHash */ + changeHash?: (atomic.Hash.$Properties|null); + + /** AttestationTarget graphStats */ + graphStats?: (atomic.GraphStatsRef.$Properties|null); + + /** AttestationTarget kind */ + kind?: ("intentId"|"memoryId"|"changeHash"|"graphStats"); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Narrowed shape of an AttestationTarget. */ + type $Shape = { + intentId?: string|null; + memoryId?: string|null; + changeHash?: atomic.Hash.$Shape|null; + graphStats?: atomic.GraphStatsRef.$Shape|null; + $unknowns?: Uint8Array[]; + } & ( + ({ kind?: undefined; intentId?: null; memoryId?: null; changeHash?: null; graphStats?: null }|{ kind?: "intentId"; intentId: string; memoryId?: null; changeHash?: null; graphStats?: null }|{ kind?: "memoryId"; intentId?: null; memoryId: string; changeHash?: null; graphStats?: null }|{ kind?: "changeHash"; intentId?: null; memoryId?: null; changeHash: atomic.Hash.$Shape; graphStats?: null }|{ kind?: "graphStats"; intentId?: null; memoryId?: null; changeHash?: null; graphStats: atomic.GraphStatsRef.$Shape }) + ); + } + + /** + * Properties of a GraphStatsRef. + * @deprecated Use atomic.GraphStatsRef.$Properties instead. + */ + interface IGraphStatsRef extends atomic.GraphStatsRef.$Properties { + } + + /** Represents a GraphStatsRef. */ + class GraphStatsRef { + + /** + * Constructs a new GraphStatsRef. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GraphStatsRef.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GraphStatsRef sessionId. */ + sessionId?: (string|null); + + /** GraphStatsRef turnNumber. */ + turnNumber?: (number|null); + + /** GraphStatsRef changeHash. */ + changeHash?: (atomic.Hash.$Properties|null); + + /** + * Creates a new GraphStatsRef instance using the specified properties. + * @param [properties] Properties to set + * @returns GraphStatsRef instance + */ + static create(properties: atomic.GraphStatsRef.$Shape): atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape; + static create(properties?: atomic.GraphStatsRef.$Properties): atomic.GraphStatsRef; + + /** + * Encodes the specified GraphStatsRef message. Does not implicitly {@link atomic.GraphStatsRef.verify|verify} messages. + * @param message GraphStatsRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GraphStatsRef.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GraphStatsRef message, length delimited. Does not implicitly {@link atomic.GraphStatsRef.verify|verify} messages. + * @param message GraphStatsRef message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GraphStatsRef.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GraphStatsRef message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape} GraphStatsRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape; + + /** + * Decodes a GraphStatsRef message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape} GraphStatsRef + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape; + + /** + * Verifies a GraphStatsRef message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GraphStatsRef message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GraphStatsRef + */ + static fromObject(object: { [k: string]: any }): atomic.GraphStatsRef; + + /** + * Creates a plain object from a GraphStatsRef message. Also converts values to other types if specified. + * @param message GraphStatsRef + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GraphStatsRef, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GraphStatsRef to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GraphStatsRef + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GraphStatsRef { + + /** Properties of a GraphStatsRef. */ + interface $Properties { + + /** GraphStatsRef sessionId */ + sessionId?: (string|null); + + /** GraphStatsRef turnNumber */ + turnNumber?: (number|null); + + /** GraphStatsRef changeHash */ + changeHash?: (atomic.Hash.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GraphStatsRef. */ + type $Shape = atomic.GraphStatsRef.$Properties; + } + + /** + * Properties of a VerifyAttestationResponse. + * @deprecated Use atomic.VerifyAttestationResponse.$Properties instead. + */ + interface IVerifyAttestationResponse extends atomic.VerifyAttestationResponse.$Properties { + } + + /** Represents a VerifyAttestationResponse. */ + class VerifyAttestationResponse { + + /** + * Constructs a new VerifyAttestationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.VerifyAttestationResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** VerifyAttestationResponse valid. */ + valid: boolean; + + /** VerifyAttestationResponse reason. */ + reason?: (string|null); + + /** VerifyAttestationResponse signatureValid. */ + signatureValid?: (boolean|null); + + /** VerifyAttestationResponse sourceFresh. */ + sourceFresh?: (boolean|null); + + /** VerifyAttestationResponse signedDocument. */ + signedDocument?: (string|null); + + /** VerifyAttestationResponse signerDid. */ + signerDid?: (string|null); + + /** VerifyAttestationResponse currentSourceHash. */ + currentSourceHash?: (string|null); + + /** VerifyAttestationResponse signedSourceHash. */ + signedSourceHash?: (string|null); + + /** VerifyAttestationResponse signedRevision. */ + signedRevision?: (atomic.Hash.$Properties|null); + + /** + * Creates a new VerifyAttestationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyAttestationResponse instance + */ + static create(properties: atomic.VerifyAttestationResponse.$Shape): atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape; + static create(properties?: atomic.VerifyAttestationResponse.$Properties): atomic.VerifyAttestationResponse; + + /** + * Encodes the specified VerifyAttestationResponse message. Does not implicitly {@link atomic.VerifyAttestationResponse.verify|verify} messages. + * @param message VerifyAttestationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.VerifyAttestationResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyAttestationResponse message, length delimited. Does not implicitly {@link atomic.VerifyAttestationResponse.verify|verify} messages. + * @param message VerifyAttestationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.VerifyAttestationResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape} VerifyAttestationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape} VerifyAttestationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape; + + /** + * Verifies a VerifyAttestationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VerifyAttestationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyAttestationResponse + */ + static fromObject(object: { [k: string]: any }): atomic.VerifyAttestationResponse; + + /** + * Creates a plain object from a VerifyAttestationResponse message. Also converts values to other types if specified. + * @param message VerifyAttestationResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.VerifyAttestationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyAttestationResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for VerifyAttestationResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace VerifyAttestationResponse { + + /** Properties of a VerifyAttestationResponse. */ + interface $Properties { + + /** VerifyAttestationResponse valid */ + valid?: (boolean|null); + + /** VerifyAttestationResponse reason */ + reason?: (string|null); + + /** VerifyAttestationResponse signatureValid */ + signatureValid?: (boolean|null); + + /** VerifyAttestationResponse sourceFresh */ + sourceFresh?: (boolean|null); + + /** VerifyAttestationResponse signedDocument */ + signedDocument?: (string|null); + + /** VerifyAttestationResponse signerDid */ + signerDid?: (string|null); + + /** VerifyAttestationResponse currentSourceHash */ + currentSourceHash?: (string|null); + + /** VerifyAttestationResponse signedSourceHash */ + signedSourceHash?: (string|null); + + /** VerifyAttestationResponse signedRevision */ + signedRevision?: (atomic.Hash.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a VerifyAttestationResponse. */ + type $Shape = atomic.VerifyAttestationResponse.$Properties; + } + + /** + * Properties of a QueryGraphRequest. + * @deprecated Use atomic.QueryGraphRequest.$Properties instead. + */ + interface IQueryGraphRequest extends atomic.QueryGraphRequest.$Properties { + } + + /** Represents a QueryGraphRequest. */ + class QueryGraphRequest { + + /** + * Constructs a new QueryGraphRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.QueryGraphRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** QueryGraphRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** QueryGraphRequest limit. */ + limit: number; + + /** QueryGraphRequest contentSearch. */ + contentSearch?: (atomic.ContentSearchQuery.$Properties|null); + + /** QueryGraphRequest kgSearch. */ + kgSearch?: (atomic.KgSearchQuery.$Properties|null); + + /** QueryGraphRequest entity. */ + entity?: (atomic.EntityQuery.$Properties|null); + + /** QueryGraphRequest neighbors. */ + neighbors?: (atomic.NeighborsQuery.$Properties|null); + + /** QueryGraphRequest callers. */ + callers?: (atomic.CallersQuery.$Properties|null); + + /** QueryGraphRequest graphSlice. */ + graphSlice?: (atomic.GraphSliceQuery.$Properties|null); + + /** QueryGraphRequest plan. */ + plan?: (atomic.PlanExecutionQuery.$Properties|null); + + /** QueryGraphRequest ragAsk. */ + ragAsk?: (atomic.RagAskQuery.$Properties|null); + + /** QueryGraphRequest view. */ + view?: (atomic.ViewRef.$Properties|null); + + /** QueryGraphRequest query. */ + query?: ("contentSearch"|"kgSearch"|"entity"|"neighbors"|"callers"|"graphSlice"|"plan"|"ragAsk"); + + /** + * Creates a new QueryGraphRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryGraphRequest instance + */ + static create(properties: atomic.QueryGraphRequest.$Shape): atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape; + static create(properties?: atomic.QueryGraphRequest.$Properties): atomic.QueryGraphRequest; + + /** + * Encodes the specified QueryGraphRequest message. Does not implicitly {@link atomic.QueryGraphRequest.verify|verify} messages. + * @param message QueryGraphRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.QueryGraphRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryGraphRequest message, length delimited. Does not implicitly {@link atomic.QueryGraphRequest.verify|verify} messages. + * @param message QueryGraphRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.QueryGraphRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryGraphRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape} QueryGraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape; + + /** + * Decodes a QueryGraphRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape} QueryGraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape; + + /** + * Verifies a QueryGraphRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryGraphRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryGraphRequest + */ + static fromObject(object: { [k: string]: any }): atomic.QueryGraphRequest; + + /** + * Creates a plain object from a QueryGraphRequest message. Also converts values to other types if specified. + * @param message QueryGraphRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.QueryGraphRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryGraphRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for QueryGraphRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace QueryGraphRequest { + + /** Properties of a QueryGraphRequest. */ + interface $Properties { + + /** QueryGraphRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** QueryGraphRequest limit */ + limit?: (number|null); + + /** QueryGraphRequest contentSearch */ + contentSearch?: (atomic.ContentSearchQuery.$Properties|null); + + /** QueryGraphRequest kgSearch */ + kgSearch?: (atomic.KgSearchQuery.$Properties|null); + + /** QueryGraphRequest entity */ + entity?: (atomic.EntityQuery.$Properties|null); + + /** QueryGraphRequest neighbors */ + neighbors?: (atomic.NeighborsQuery.$Properties|null); + + /** QueryGraphRequest callers */ + callers?: (atomic.CallersQuery.$Properties|null); + + /** QueryGraphRequest graphSlice */ + graphSlice?: (atomic.GraphSliceQuery.$Properties|null); + + /** QueryGraphRequest plan */ + plan?: (atomic.PlanExecutionQuery.$Properties|null); + + /** QueryGraphRequest ragAsk */ + ragAsk?: (atomic.RagAskQuery.$Properties|null); + + /** QueryGraphRequest view */ + view?: (atomic.ViewRef.$Properties|null); + + /** QueryGraphRequest query */ + query?: ("contentSearch"|"kgSearch"|"entity"|"neighbors"|"callers"|"graphSlice"|"plan"|"ragAsk"); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Narrowed shape of a QueryGraphRequest. */ + type $Shape = { + repository?: atomic.RepositoryRef.$Shape|null; + limit?: number|null; + contentSearch?: atomic.ContentSearchQuery.$Shape|null; + kgSearch?: atomic.KgSearchQuery.$Shape|null; + entity?: atomic.EntityQuery.$Shape|null; + neighbors?: atomic.NeighborsQuery.$Shape|null; + callers?: atomic.CallersQuery.$Shape|null; + graphSlice?: atomic.GraphSliceQuery.$Shape|null; + plan?: atomic.PlanExecutionQuery.$Shape|null; + ragAsk?: atomic.RagAskQuery.$Shape|null; + view?: atomic.ViewRef.$Shape|null; + $unknowns?: Uint8Array[]; + } & ( + ({ query?: undefined; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "contentSearch"; contentSearch: atomic.ContentSearchQuery.$Shape; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "kgSearch"; contentSearch?: null; kgSearch: atomic.KgSearchQuery.$Shape; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "entity"; contentSearch?: null; kgSearch?: null; entity: atomic.EntityQuery.$Shape; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "neighbors"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors: atomic.NeighborsQuery.$Shape; callers?: null; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "callers"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers: atomic.CallersQuery.$Shape; graphSlice?: null; plan?: null; ragAsk?: null }|{ query?: "graphSlice"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice: atomic.GraphSliceQuery.$Shape; plan?: null; ragAsk?: null }|{ query?: "plan"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan: atomic.PlanExecutionQuery.$Shape; ragAsk?: null }|{ query?: "ragAsk"; contentSearch?: null; kgSearch?: null; entity?: null; neighbors?: null; callers?: null; graphSlice?: null; plan?: null; ragAsk: atomic.RagAskQuery.$Shape }) + ); + } + + /** + * Properties of a ContentSearchQuery. + * @deprecated Use atomic.ContentSearchQuery.$Properties instead. + */ + interface IContentSearchQuery extends atomic.ContentSearchQuery.$Properties { + } + + /** Represents a ContentSearchQuery. */ + class ContentSearchQuery { + + /** + * Constructs a new ContentSearchQuery. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ContentSearchQuery.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ContentSearchQuery query. */ + query: string; + + /** ContentSearchQuery paths. */ + paths: string[]; + + /** + * Creates a new ContentSearchQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentSearchQuery instance + */ + static create(properties: atomic.ContentSearchQuery.$Shape): atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape; + static create(properties?: atomic.ContentSearchQuery.$Properties): atomic.ContentSearchQuery; + + /** + * Encodes the specified ContentSearchQuery message. Does not implicitly {@link atomic.ContentSearchQuery.verify|verify} messages. + * @param message ContentSearchQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ContentSearchQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentSearchQuery message, length delimited. Does not implicitly {@link atomic.ContentSearchQuery.verify|verify} messages. + * @param message ContentSearchQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ContentSearchQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentSearchQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape} ContentSearchQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape; + + /** + * Decodes a ContentSearchQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape} ContentSearchQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape; + + /** + * Verifies a ContentSearchQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContentSearchQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentSearchQuery + */ + static fromObject(object: { [k: string]: any }): atomic.ContentSearchQuery; + + /** + * Creates a plain object from a ContentSearchQuery message. Also converts values to other types if specified. + * @param message ContentSearchQuery + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ContentSearchQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentSearchQuery to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ContentSearchQuery + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ContentSearchQuery { + + /** Properties of a ContentSearchQuery. */ + interface $Properties { + + /** ContentSearchQuery query */ + query?: (string|null); + + /** ContentSearchQuery paths */ + paths?: (string[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ContentSearchQuery. */ + type $Shape = atomic.ContentSearchQuery.$Properties; + } + + /** + * Properties of a KgSearchQuery. + * @deprecated Use atomic.KgSearchQuery.$Properties instead. + */ + interface IKgSearchQuery extends atomic.KgSearchQuery.$Properties { + } + + /** Represents a KgSearchQuery. */ + class KgSearchQuery { + + /** + * Constructs a new KgSearchQuery. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.KgSearchQuery.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** KgSearchQuery query. */ + query: string; + + /** KgSearchQuery kind. */ + kind?: (string|null); + + /** KgSearchQuery pool. */ + pool?: (number|null); + + /** + * Creates a new KgSearchQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns KgSearchQuery instance + */ + static create(properties: atomic.KgSearchQuery.$Shape): atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape; + static create(properties?: atomic.KgSearchQuery.$Properties): atomic.KgSearchQuery; + + /** + * Encodes the specified KgSearchQuery message. Does not implicitly {@link atomic.KgSearchQuery.verify|verify} messages. + * @param message KgSearchQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.KgSearchQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KgSearchQuery message, length delimited. Does not implicitly {@link atomic.KgSearchQuery.verify|verify} messages. + * @param message KgSearchQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.KgSearchQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KgSearchQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape} KgSearchQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape; + + /** + * Decodes a KgSearchQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape} KgSearchQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape; + + /** + * Verifies a KgSearchQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KgSearchQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KgSearchQuery + */ + static fromObject(object: { [k: string]: any }): atomic.KgSearchQuery; + + /** + * Creates a plain object from a KgSearchQuery message. Also converts values to other types if specified. + * @param message KgSearchQuery + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.KgSearchQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KgSearchQuery to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for KgSearchQuery + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace KgSearchQuery { + + /** Properties of a KgSearchQuery. */ + interface $Properties { + + /** KgSearchQuery query */ + query?: (string|null); + + /** KgSearchQuery kind */ + kind?: (string|null); + + /** KgSearchQuery pool */ + pool?: (number|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a KgSearchQuery. */ + type $Shape = atomic.KgSearchQuery.$Properties; + } + + /** + * Properties of an EntityQuery. + * @deprecated Use atomic.EntityQuery.$Properties instead. + */ + interface IEntityQuery extends atomic.EntityQuery.$Properties { + } + + /** Represents an EntityQuery. */ + class EntityQuery { + + /** + * Constructs a new EntityQuery. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.EntityQuery.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** EntityQuery nodeId. */ + nodeId: string; + + /** + * Creates a new EntityQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityQuery instance + */ + static create(properties: atomic.EntityQuery.$Shape): atomic.EntityQuery & atomic.EntityQuery.$Shape; + static create(properties?: atomic.EntityQuery.$Properties): atomic.EntityQuery; + + /** + * Encodes the specified EntityQuery message. Does not implicitly {@link atomic.EntityQuery.verify|verify} messages. + * @param message EntityQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.EntityQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityQuery message, length delimited. Does not implicitly {@link atomic.EntityQuery.verify|verify} messages. + * @param message EntityQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.EntityQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.EntityQuery & atomic.EntityQuery.$Shape} EntityQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.EntityQuery & atomic.EntityQuery.$Shape; + + /** + * Decodes an EntityQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.EntityQuery & atomic.EntityQuery.$Shape} EntityQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.EntityQuery & atomic.EntityQuery.$Shape; + + /** + * Verifies an EntityQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EntityQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityQuery + */ + static fromObject(object: { [k: string]: any }): atomic.EntityQuery; + + /** + * Creates a plain object from an EntityQuery message. Also converts values to other types if specified. + * @param message EntityQuery + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.EntityQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityQuery to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for EntityQuery + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace EntityQuery { + + /** Properties of an EntityQuery. */ + interface $Properties { + + /** EntityQuery nodeId */ + nodeId?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of an EntityQuery. */ + type $Shape = atomic.EntityQuery.$Properties; + } + + /** + * Properties of a NeighborsQuery. + * @deprecated Use atomic.NeighborsQuery.$Properties instead. + */ + interface INeighborsQuery extends atomic.NeighborsQuery.$Properties { + } + + /** Represents a NeighborsQuery. */ + class NeighborsQuery { + + /** + * Constructs a new NeighborsQuery. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.NeighborsQuery.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** NeighborsQuery nodeId. */ + nodeId: string; + + /** NeighborsQuery incoming. */ + incoming?: (boolean|null); + + /** NeighborsQuery depth. */ + depth?: (number|null); + + /** + * Creates a new NeighborsQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns NeighborsQuery instance + */ + static create(properties: atomic.NeighborsQuery.$Shape): atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape; + static create(properties?: atomic.NeighborsQuery.$Properties): atomic.NeighborsQuery; + + /** + * Encodes the specified NeighborsQuery message. Does not implicitly {@link atomic.NeighborsQuery.verify|verify} messages. + * @param message NeighborsQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.NeighborsQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NeighborsQuery message, length delimited. Does not implicitly {@link atomic.NeighborsQuery.verify|verify} messages. + * @param message NeighborsQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.NeighborsQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NeighborsQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape} NeighborsQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape; + + /** + * Decodes a NeighborsQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape} NeighborsQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape; + + /** + * Verifies a NeighborsQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NeighborsQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NeighborsQuery + */ + static fromObject(object: { [k: string]: any }): atomic.NeighborsQuery; + + /** + * Creates a plain object from a NeighborsQuery message. Also converts values to other types if specified. + * @param message NeighborsQuery + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.NeighborsQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NeighborsQuery to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for NeighborsQuery + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace NeighborsQuery { + + /** Properties of a NeighborsQuery. */ + interface $Properties { + + /** NeighborsQuery nodeId */ + nodeId?: (string|null); + + /** NeighborsQuery incoming */ + incoming?: (boolean|null); + + /** NeighborsQuery depth */ + depth?: (number|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a NeighborsQuery. */ + type $Shape = atomic.NeighborsQuery.$Properties; + } + + /** + * Properties of a CallersQuery. + * @deprecated Use atomic.CallersQuery.$Properties instead. + */ + interface ICallersQuery extends atomic.CallersQuery.$Properties { + } + + /** Represents a CallersQuery. */ + class CallersQuery { + + /** + * Constructs a new CallersQuery. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.CallersQuery.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** CallersQuery nodeId. */ + nodeId: string; + + /** + * Creates a new CallersQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns CallersQuery instance + */ + static create(properties: atomic.CallersQuery.$Shape): atomic.CallersQuery & atomic.CallersQuery.$Shape; + static create(properties?: atomic.CallersQuery.$Properties): atomic.CallersQuery; + + /** + * Encodes the specified CallersQuery message. Does not implicitly {@link atomic.CallersQuery.verify|verify} messages. + * @param message CallersQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.CallersQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallersQuery message, length delimited. Does not implicitly {@link atomic.CallersQuery.verify|verify} messages. + * @param message CallersQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.CallersQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallersQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.CallersQuery & atomic.CallersQuery.$Shape} CallersQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.CallersQuery & atomic.CallersQuery.$Shape; + + /** + * Decodes a CallersQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.CallersQuery & atomic.CallersQuery.$Shape} CallersQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.CallersQuery & atomic.CallersQuery.$Shape; + + /** + * Verifies a CallersQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CallersQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallersQuery + */ + static fromObject(object: { [k: string]: any }): atomic.CallersQuery; + + /** + * Creates a plain object from a CallersQuery message. Also converts values to other types if specified. + * @param message CallersQuery + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.CallersQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallersQuery to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for CallersQuery + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace CallersQuery { + + /** Properties of a CallersQuery. */ + interface $Properties { + + /** CallersQuery nodeId */ + nodeId?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a CallersQuery. */ + type $Shape = atomic.CallersQuery.$Properties; + } + + /** + * Properties of a GraphSliceQuery. + * @deprecated Use atomic.GraphSliceQuery.$Properties instead. + */ + interface IGraphSliceQuery extends atomic.GraphSliceQuery.$Properties { + } + + /** Represents a GraphSliceQuery. */ + class GraphSliceQuery { + + /** + * Constructs a new GraphSliceQuery. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GraphSliceQuery.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GraphSliceQuery nodeIds. */ + nodeIds: string[]; + + /** GraphSliceQuery maxDepth. */ + maxDepth?: (number|null); + + /** GraphSliceQuery query. */ + query?: (string|null); + + /** GraphSliceQuery seedLimit. */ + seedLimit?: (number|null); + + /** GraphSliceQuery depth. */ + depth?: (number|null); + + /** GraphSliceQuery kinds. */ + kinds?: (string|null); + + /** GraphSliceQuery changesPerSeed. */ + changesPerSeed?: (number|null); + + /** GraphSliceQuery maxNodes. */ + maxNodes?: (number|null); + + /** + * Creates a new GraphSliceQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns GraphSliceQuery instance + */ + static create(properties: atomic.GraphSliceQuery.$Shape): atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape; + static create(properties?: atomic.GraphSliceQuery.$Properties): atomic.GraphSliceQuery; + + /** + * Encodes the specified GraphSliceQuery message. Does not implicitly {@link atomic.GraphSliceQuery.verify|verify} messages. + * @param message GraphSliceQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GraphSliceQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GraphSliceQuery message, length delimited. Does not implicitly {@link atomic.GraphSliceQuery.verify|verify} messages. + * @param message GraphSliceQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GraphSliceQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GraphSliceQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape} GraphSliceQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape; + + /** + * Decodes a GraphSliceQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape} GraphSliceQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape; + + /** + * Verifies a GraphSliceQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GraphSliceQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GraphSliceQuery + */ + static fromObject(object: { [k: string]: any }): atomic.GraphSliceQuery; + + /** + * Creates a plain object from a GraphSliceQuery message. Also converts values to other types if specified. + * @param message GraphSliceQuery + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GraphSliceQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GraphSliceQuery to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GraphSliceQuery + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GraphSliceQuery { + + /** Properties of a GraphSliceQuery. */ + interface $Properties { + + /** GraphSliceQuery nodeIds */ + nodeIds?: (string[]|null); + + /** GraphSliceQuery maxDepth */ + maxDepth?: (number|null); + + /** GraphSliceQuery query */ + query?: (string|null); + + /** GraphSliceQuery seedLimit */ + seedLimit?: (number|null); + + /** GraphSliceQuery depth */ + depth?: (number|null); + + /** GraphSliceQuery kinds */ + kinds?: (string|null); + + /** GraphSliceQuery changesPerSeed */ + changesPerSeed?: (number|null); + + /** GraphSliceQuery maxNodes */ + maxNodes?: (number|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GraphSliceQuery. */ + type $Shape = atomic.GraphSliceQuery.$Properties; + } + + /** + * Properties of a PlanExecutionQuery. + * @deprecated Use atomic.PlanExecutionQuery.$Properties instead. + */ + interface IPlanExecutionQuery extends atomic.PlanExecutionQuery.$Properties { + } + + /** Represents a PlanExecutionQuery. */ + class PlanExecutionQuery { + + /** + * Constructs a new PlanExecutionQuery. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PlanExecutionQuery.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PlanExecutionQuery planJson. */ + planJson: Uint8Array; + + /** + * Creates a new PlanExecutionQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns PlanExecutionQuery instance + */ + static create(properties: atomic.PlanExecutionQuery.$Shape): atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape; + static create(properties?: atomic.PlanExecutionQuery.$Properties): atomic.PlanExecutionQuery; + + /** + * Encodes the specified PlanExecutionQuery message. Does not implicitly {@link atomic.PlanExecutionQuery.verify|verify} messages. + * @param message PlanExecutionQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PlanExecutionQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlanExecutionQuery message, length delimited. Does not implicitly {@link atomic.PlanExecutionQuery.verify|verify} messages. + * @param message PlanExecutionQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PlanExecutionQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlanExecutionQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape} PlanExecutionQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape; + + /** + * Decodes a PlanExecutionQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape} PlanExecutionQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape; + + /** + * Verifies a PlanExecutionQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlanExecutionQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlanExecutionQuery + */ + static fromObject(object: { [k: string]: any }): atomic.PlanExecutionQuery; + + /** + * Creates a plain object from a PlanExecutionQuery message. Also converts values to other types if specified. + * @param message PlanExecutionQuery + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PlanExecutionQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlanExecutionQuery to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PlanExecutionQuery + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PlanExecutionQuery { + + /** Properties of a PlanExecutionQuery. */ + interface $Properties { + + /** PlanExecutionQuery planJson */ + planJson?: (Uint8Array|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PlanExecutionQuery. */ + type $Shape = atomic.PlanExecutionQuery.$Properties; + } + + /** + * Properties of a RagAskQuery. + * @deprecated Use atomic.RagAskQuery.$Properties instead. + */ + interface IRagAskQuery extends atomic.RagAskQuery.$Properties { + } + + /** Represents a RagAskQuery. */ + class RagAskQuery { + + /** + * Constructs a new RagAskQuery. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.RagAskQuery.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** RagAskQuery question. */ + question: string; + + /** RagAskQuery topK. */ + topK: number; + + /** RagAskQuery maxTurns. */ + maxTurns?: (number|null); + + /** RagAskQuery verbose. */ + verbose?: (boolean|null); + + /** + * Creates a new RagAskQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns RagAskQuery instance + */ + static create(properties: atomic.RagAskQuery.$Shape): atomic.RagAskQuery & atomic.RagAskQuery.$Shape; + static create(properties?: atomic.RagAskQuery.$Properties): atomic.RagAskQuery; + + /** + * Encodes the specified RagAskQuery message. Does not implicitly {@link atomic.RagAskQuery.verify|verify} messages. + * @param message RagAskQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.RagAskQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RagAskQuery message, length delimited. Does not implicitly {@link atomic.RagAskQuery.verify|verify} messages. + * @param message RagAskQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.RagAskQuery.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RagAskQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.RagAskQuery & atomic.RagAskQuery.$Shape} RagAskQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.RagAskQuery & atomic.RagAskQuery.$Shape; + + /** + * Decodes a RagAskQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.RagAskQuery & atomic.RagAskQuery.$Shape} RagAskQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.RagAskQuery & atomic.RagAskQuery.$Shape; + + /** + * Verifies a RagAskQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RagAskQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RagAskQuery + */ + static fromObject(object: { [k: string]: any }): atomic.RagAskQuery; + + /** + * Creates a plain object from a RagAskQuery message. Also converts values to other types if specified. + * @param message RagAskQuery + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.RagAskQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RagAskQuery to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for RagAskQuery + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace RagAskQuery { + + /** Properties of a RagAskQuery. */ + interface $Properties { + + /** RagAskQuery question */ + question?: (string|null); + + /** RagAskQuery topK */ + topK?: (number|null); + + /** RagAskQuery maxTurns */ + maxTurns?: (number|null); + + /** RagAskQuery verbose */ + verbose?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a RagAskQuery. */ + type $Shape = atomic.RagAskQuery.$Properties; + } + + /** + * Properties of a QueryGraphResponse. + * @deprecated Use atomic.QueryGraphResponse.$Properties instead. + */ + interface IQueryGraphResponse extends atomic.QueryGraphResponse.$Properties { + } + + /** Represents a QueryGraphResponse. */ + class QueryGraphResponse { + + /** + * Constructs a new QueryGraphResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.QueryGraphResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** QueryGraphResponse nodes. */ + nodes: atomic.KGNode.$Properties[]; + + /** QueryGraphResponse edges. */ + edges: atomic.KGEdge.$Properties[]; + + /** QueryGraphResponse hits. */ + hits: atomic.ContentHit.$Properties[]; + + /** QueryGraphResponse answer. */ + answer?: (string|null); + + /** QueryGraphResponse planResult. */ + planResult?: (Uint8Array|null); + + /** QueryGraphResponse snapshot. */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** QueryGraphResponse graphCollected. */ + graphCollected?: (number|null); + + /** QueryGraphResponse callsPresent. */ + callsPresent: boolean; + + /** QueryGraphResponse askResult. */ + askResult?: (atomic.VersionedBytes.$Properties|null); + + /** QueryGraphResponse askElapsedMs. */ + askElapsedMs?: (number|Long|null); + + /** QueryGraphResponse apiVersion. */ + apiVersion: number; + + /** QueryGraphResponse callers. */ + callers: atomic.CodeCaller.$Properties[]; + + /** + * Creates a new QueryGraphResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryGraphResponse instance + */ + static create(properties: atomic.QueryGraphResponse.$Shape): atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape; + static create(properties?: atomic.QueryGraphResponse.$Properties): atomic.QueryGraphResponse; + + /** + * Encodes the specified QueryGraphResponse message. Does not implicitly {@link atomic.QueryGraphResponse.verify|verify} messages. + * @param message QueryGraphResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.QueryGraphResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryGraphResponse message, length delimited. Does not implicitly {@link atomic.QueryGraphResponse.verify|verify} messages. + * @param message QueryGraphResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.QueryGraphResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryGraphResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape} QueryGraphResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape; + + /** + * Decodes a QueryGraphResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape} QueryGraphResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape; + + /** + * Verifies a QueryGraphResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryGraphResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryGraphResponse + */ + static fromObject(object: { [k: string]: any }): atomic.QueryGraphResponse; + + /** + * Creates a plain object from a QueryGraphResponse message. Also converts values to other types if specified. + * @param message QueryGraphResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.QueryGraphResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryGraphResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for QueryGraphResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace QueryGraphResponse { + + /** Properties of a QueryGraphResponse. */ + interface $Properties { + + /** QueryGraphResponse nodes */ + nodes?: (atomic.KGNode.$Properties[]|null); + + /** QueryGraphResponse edges */ + edges?: (atomic.KGEdge.$Properties[]|null); + + /** QueryGraphResponse hits */ + hits?: (atomic.ContentHit.$Properties[]|null); + + /** QueryGraphResponse answer */ + answer?: (string|null); + + /** QueryGraphResponse planResult */ + planResult?: (Uint8Array|null); + + /** QueryGraphResponse snapshot */ + snapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** QueryGraphResponse graphCollected */ + graphCollected?: (number|null); + + /** QueryGraphResponse callsPresent */ + callsPresent?: (boolean|null); + + /** QueryGraphResponse askResult */ + askResult?: (atomic.VersionedBytes.$Properties|null); + + /** QueryGraphResponse askElapsedMs */ + askElapsedMs?: (number|Long|null); + + /** QueryGraphResponse apiVersion */ + apiVersion?: (number|null); + + /** QueryGraphResponse callers */ + callers?: (atomic.CodeCaller.$Properties[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a QueryGraphResponse. */ + type $Shape = atomic.QueryGraphResponse.$Properties; + } + + /** + * Properties of a KGNode. + * @deprecated Use atomic.KGNode.$Properties instead. + */ + interface IKGNode extends atomic.KGNode.$Properties { + } + + /** Represents a KGNode. */ + class KGNode { + + /** + * Constructs a new KGNode. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.KGNode.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** KGNode id. */ + id: string; + + /** KGNode types. */ + types: string[]; + + /** KGNode name. */ + name?: (string|null); + + /** KGNode data. */ + data?: (Uint8Array|null); + + /** KGNode score. */ + score?: (number|null); + + /** KGNode source. */ + source?: (string|null); + + /** KGNode metadata. */ + metadata?: (Uint8Array|null); + + /** + * Creates a new KGNode instance using the specified properties. + * @param [properties] Properties to set + * @returns KGNode instance + */ + static create(properties: atomic.KGNode.$Shape): atomic.KGNode & atomic.KGNode.$Shape; + static create(properties?: atomic.KGNode.$Properties): atomic.KGNode; + + /** + * Encodes the specified KGNode message. Does not implicitly {@link atomic.KGNode.verify|verify} messages. + * @param message KGNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.KGNode.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KGNode message, length delimited. Does not implicitly {@link atomic.KGNode.verify|verify} messages. + * @param message KGNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.KGNode.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KGNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.KGNode & atomic.KGNode.$Shape} KGNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.KGNode & atomic.KGNode.$Shape; + + /** + * Decodes a KGNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.KGNode & atomic.KGNode.$Shape} KGNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.KGNode & atomic.KGNode.$Shape; + + /** + * Verifies a KGNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KGNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KGNode + */ + static fromObject(object: { [k: string]: any }): atomic.KGNode; + + /** + * Creates a plain object from a KGNode message. Also converts values to other types if specified. + * @param message KGNode + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.KGNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KGNode to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for KGNode + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace KGNode { + + /** Properties of a KGNode. */ + interface $Properties { + + /** KGNode id */ + id?: (string|null); + + /** KGNode types */ + types?: (string[]|null); + + /** KGNode name */ + name?: (string|null); + + /** KGNode data */ + data?: (Uint8Array|null); + + /** KGNode score */ + score?: (number|null); + + /** KGNode source */ + source?: (string|null); + + /** KGNode metadata */ + metadata?: (Uint8Array|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a KGNode. */ + type $Shape = atomic.KGNode.$Properties; + } + + /** + * Properties of a KGEdge. + * @deprecated Use atomic.KGEdge.$Properties instead. + */ + interface IKGEdge extends atomic.KGEdge.$Properties { + } + + /** Represents a KGEdge. */ + class KGEdge { + + /** + * Constructs a new KGEdge. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.KGEdge.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** KGEdge source. */ + source: string; + + /** KGEdge target. */ + target: string; + + /** KGEdge relation. */ + relation: string; + + /** KGEdge metadata. */ + metadata?: (Uint8Array|null); + + /** + * Creates a new KGEdge instance using the specified properties. + * @param [properties] Properties to set + * @returns KGEdge instance + */ + static create(properties: atomic.KGEdge.$Shape): atomic.KGEdge & atomic.KGEdge.$Shape; + static create(properties?: atomic.KGEdge.$Properties): atomic.KGEdge; + + /** + * Encodes the specified KGEdge message. Does not implicitly {@link atomic.KGEdge.verify|verify} messages. + * @param message KGEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.KGEdge.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KGEdge message, length delimited. Does not implicitly {@link atomic.KGEdge.verify|verify} messages. + * @param message KGEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.KGEdge.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KGEdge message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.KGEdge & atomic.KGEdge.$Shape} KGEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.KGEdge & atomic.KGEdge.$Shape; + + /** + * Decodes a KGEdge message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.KGEdge & atomic.KGEdge.$Shape} KGEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.KGEdge & atomic.KGEdge.$Shape; + + /** + * Verifies a KGEdge message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KGEdge message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KGEdge + */ + static fromObject(object: { [k: string]: any }): atomic.KGEdge; + + /** + * Creates a plain object from a KGEdge message. Also converts values to other types if specified. + * @param message KGEdge + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.KGEdge, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KGEdge to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for KGEdge + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace KGEdge { + + /** Properties of a KGEdge. */ + interface $Properties { + + /** KGEdge source */ + source?: (string|null); + + /** KGEdge target */ + target?: (string|null); + + /** KGEdge relation */ + relation?: (string|null); + + /** KGEdge metadata */ + metadata?: (Uint8Array|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a KGEdge. */ + type $Shape = atomic.KGEdge.$Properties; + } + + /** + * Properties of a ContentHit. + * @deprecated Use atomic.ContentHit.$Properties instead. + */ + interface IContentHit extends atomic.ContentHit.$Properties { + } + + /** Represents a ContentHit. */ + class ContentHit { + + /** + * Constructs a new ContentHit. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ContentHit.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ContentHit path. */ + path: string; + + /** ContentHit snippet. */ + snippet: string; + + /** ContentHit line. */ + line?: (number|Long|null); + + /** ContentHit score. */ + score?: (number|null); + + /** + * Creates a new ContentHit instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentHit instance + */ + static create(properties: atomic.ContentHit.$Shape): atomic.ContentHit & atomic.ContentHit.$Shape; + static create(properties?: atomic.ContentHit.$Properties): atomic.ContentHit; + + /** + * Encodes the specified ContentHit message. Does not implicitly {@link atomic.ContentHit.verify|verify} messages. + * @param message ContentHit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ContentHit.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentHit message, length delimited. Does not implicitly {@link atomic.ContentHit.verify|verify} messages. + * @param message ContentHit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ContentHit.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentHit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ContentHit & atomic.ContentHit.$Shape} ContentHit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.ContentHit & atomic.ContentHit.$Shape; + + /** + * Decodes a ContentHit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ContentHit & atomic.ContentHit.$Shape} ContentHit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.ContentHit & atomic.ContentHit.$Shape; + + /** + * Verifies a ContentHit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContentHit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentHit + */ + static fromObject(object: { [k: string]: any }): atomic.ContentHit; + + /** + * Creates a plain object from a ContentHit message. Also converts values to other types if specified. + * @param message ContentHit + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ContentHit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentHit to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ContentHit + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ContentHit { + + /** Properties of a ContentHit. */ + interface $Properties { + + /** ContentHit path */ + path?: (string|null); + + /** ContentHit snippet */ + snippet?: (string|null); + + /** ContentHit line */ + line?: (number|Long|null); + + /** ContentHit score */ + score?: (number|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ContentHit. */ + type $Shape = atomic.ContentHit.$Properties; + } + + /** + * Properties of a CodeCaller. + * @deprecated Use atomic.CodeCaller.$Properties instead. + */ + interface ICodeCaller extends atomic.CodeCaller.$Properties { + } + + /** Represents a CodeCaller. */ + class CodeCaller { + + /** + * Constructs a new CodeCaller. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.CodeCaller.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** CodeCaller path. */ + path: string; + + /** CodeCaller name. */ + name: string; + + /** CodeCaller line. */ + line: number; + + /** CodeCaller summary. */ + summary?: (string|null); + + /** + * Creates a new CodeCaller instance using the specified properties. + * @param [properties] Properties to set + * @returns CodeCaller instance + */ + static create(properties: atomic.CodeCaller.$Shape): atomic.CodeCaller & atomic.CodeCaller.$Shape; + static create(properties?: atomic.CodeCaller.$Properties): atomic.CodeCaller; + + /** + * Encodes the specified CodeCaller message. Does not implicitly {@link atomic.CodeCaller.verify|verify} messages. + * @param message CodeCaller message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.CodeCaller.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CodeCaller message, length delimited. Does not implicitly {@link atomic.CodeCaller.verify|verify} messages. + * @param message CodeCaller message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.CodeCaller.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CodeCaller message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.CodeCaller & atomic.CodeCaller.$Shape} CodeCaller + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.CodeCaller & atomic.CodeCaller.$Shape; + + /** + * Decodes a CodeCaller message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.CodeCaller & atomic.CodeCaller.$Shape} CodeCaller + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.CodeCaller & atomic.CodeCaller.$Shape; + + /** + * Verifies a CodeCaller message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CodeCaller message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CodeCaller + */ + static fromObject(object: { [k: string]: any }): atomic.CodeCaller; + + /** + * Creates a plain object from a CodeCaller message. Also converts values to other types if specified. + * @param message CodeCaller + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.CodeCaller, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CodeCaller to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for CodeCaller + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace CodeCaller { + + /** Properties of a CodeCaller. */ + interface $Properties { + + /** CodeCaller path */ + path?: (string|null); + + /** CodeCaller name */ + name?: (string|null); + + /** CodeCaller line */ + line?: (number|null); + + /** CodeCaller summary */ + summary?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a CodeCaller. */ + type $Shape = atomic.CodeCaller.$Properties; + } + + /** + * Properties of a GetProjectIdentityRequest. + * @deprecated Use atomic.GetProjectIdentityRequest.$Properties instead. + */ + interface IGetProjectIdentityRequest extends atomic.GetProjectIdentityRequest.$Properties { + } + + /** Represents a GetProjectIdentityRequest. */ + class GetProjectIdentityRequest { + + /** + * Constructs a new GetProjectIdentityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetProjectIdentityRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetProjectIdentityRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** + * Creates a new GetProjectIdentityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetProjectIdentityRequest instance + */ + static create(properties: atomic.GetProjectIdentityRequest.$Shape): atomic.GetProjectIdentityRequest & atomic.GetProjectIdentityRequest.$Shape; + static create(properties?: atomic.GetProjectIdentityRequest.$Properties): atomic.GetProjectIdentityRequest; + + /** + * Encodes the specified GetProjectIdentityRequest message. Does not implicitly {@link atomic.GetProjectIdentityRequest.verify|verify} messages. + * @param message GetProjectIdentityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetProjectIdentityRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProjectIdentityRequest message, length delimited. Does not implicitly {@link atomic.GetProjectIdentityRequest.verify|verify} messages. + * @param message GetProjectIdentityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetProjectIdentityRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetProjectIdentityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetProjectIdentityRequest & atomic.GetProjectIdentityRequest.$Shape} GetProjectIdentityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetProjectIdentityRequest & atomic.GetProjectIdentityRequest.$Shape; + + /** + * Decodes a GetProjectIdentityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetProjectIdentityRequest & atomic.GetProjectIdentityRequest.$Shape} GetProjectIdentityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetProjectIdentityRequest & atomic.GetProjectIdentityRequest.$Shape; + + /** + * Verifies a GetProjectIdentityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetProjectIdentityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetProjectIdentityRequest + */ + static fromObject(object: { [k: string]: any }): atomic.GetProjectIdentityRequest; + + /** + * Creates a plain object from a GetProjectIdentityRequest message. Also converts values to other types if specified. + * @param message GetProjectIdentityRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetProjectIdentityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetProjectIdentityRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetProjectIdentityRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetProjectIdentityRequest { + + /** Properties of a GetProjectIdentityRequest. */ + interface $Properties { + + /** GetProjectIdentityRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetProjectIdentityRequest. */ + type $Shape = atomic.GetProjectIdentityRequest.$Properties; + } + + /** + * Properties of a GetProjectIdentityResponse. + * @deprecated Use atomic.GetProjectIdentityResponse.$Properties instead. + */ + interface IGetProjectIdentityResponse extends atomic.GetProjectIdentityResponse.$Properties { + } + + /** Represents a GetProjectIdentityResponse. */ + class GetProjectIdentityResponse { + + /** + * Constructs a new GetProjectIdentityResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetProjectIdentityResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetProjectIdentityResponse project. */ + project: string; + + /** GetProjectIdentityResponse urn. */ + urn: string; + + /** GetProjectIdentityResponse created. */ + created: string; + + /** GetProjectIdentityResponse minted. */ + minted: string; + + /** GetProjectIdentityResponse signedBy. */ + signedBy?: (string|null); + + /** GetProjectIdentityResponse hash. */ + hash: string; + + /** + * Creates a new GetProjectIdentityResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetProjectIdentityResponse instance + */ + static create(properties: atomic.GetProjectIdentityResponse.$Shape): atomic.GetProjectIdentityResponse & atomic.GetProjectIdentityResponse.$Shape; + static create(properties?: atomic.GetProjectIdentityResponse.$Properties): atomic.GetProjectIdentityResponse; + + /** + * Encodes the specified GetProjectIdentityResponse message. Does not implicitly {@link atomic.GetProjectIdentityResponse.verify|verify} messages. + * @param message GetProjectIdentityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetProjectIdentityResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProjectIdentityResponse message, length delimited. Does not implicitly {@link atomic.GetProjectIdentityResponse.verify|verify} messages. + * @param message GetProjectIdentityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetProjectIdentityResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetProjectIdentityResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetProjectIdentityResponse & atomic.GetProjectIdentityResponse.$Shape} GetProjectIdentityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetProjectIdentityResponse & atomic.GetProjectIdentityResponse.$Shape; + + /** + * Decodes a GetProjectIdentityResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetProjectIdentityResponse & atomic.GetProjectIdentityResponse.$Shape} GetProjectIdentityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetProjectIdentityResponse & atomic.GetProjectIdentityResponse.$Shape; + + /** + * Verifies a GetProjectIdentityResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetProjectIdentityResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetProjectIdentityResponse + */ + static fromObject(object: { [k: string]: any }): atomic.GetProjectIdentityResponse; + + /** + * Creates a plain object from a GetProjectIdentityResponse message. Also converts values to other types if specified. + * @param message GetProjectIdentityResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetProjectIdentityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetProjectIdentityResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetProjectIdentityResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetProjectIdentityResponse { + + /** Properties of a GetProjectIdentityResponse. */ + interface $Properties { + + /** GetProjectIdentityResponse project */ + project?: (string|null); + + /** GetProjectIdentityResponse urn */ + urn?: (string|null); + + /** GetProjectIdentityResponse created */ + created?: (string|null); + + /** GetProjectIdentityResponse minted */ + minted?: (string|null); + + /** GetProjectIdentityResponse signedBy */ + signedBy?: (string|null); + + /** GetProjectIdentityResponse hash */ + hash?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetProjectIdentityResponse. */ + type $Shape = atomic.GetProjectIdentityResponse.$Properties; + } + + /** + * Properties of a GetWorkflowSnapshotRequest. + * @deprecated Use atomic.GetWorkflowSnapshotRequest.$Properties instead. + */ + interface IGetWorkflowSnapshotRequest extends atomic.GetWorkflowSnapshotRequest.$Properties { + } + + /** Represents a GetWorkflowSnapshotRequest. */ + class GetWorkflowSnapshotRequest { + + /** + * Constructs a new GetWorkflowSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetWorkflowSnapshotRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetWorkflowSnapshotRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** + * Creates a new GetWorkflowSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkflowSnapshotRequest instance + */ + static create(properties: atomic.GetWorkflowSnapshotRequest.$Shape): atomic.GetWorkflowSnapshotRequest & atomic.GetWorkflowSnapshotRequest.$Shape; + static create(properties?: atomic.GetWorkflowSnapshotRequest.$Properties): atomic.GetWorkflowSnapshotRequest; + + /** + * Encodes the specified GetWorkflowSnapshotRequest message. Does not implicitly {@link atomic.GetWorkflowSnapshotRequest.verify|verify} messages. + * @param message GetWorkflowSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetWorkflowSnapshotRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkflowSnapshotRequest message, length delimited. Does not implicitly {@link atomic.GetWorkflowSnapshotRequest.verify|verify} messages. + * @param message GetWorkflowSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetWorkflowSnapshotRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkflowSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetWorkflowSnapshotRequest & atomic.GetWorkflowSnapshotRequest.$Shape} GetWorkflowSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetWorkflowSnapshotRequest & atomic.GetWorkflowSnapshotRequest.$Shape; + + /** + * Decodes a GetWorkflowSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetWorkflowSnapshotRequest & atomic.GetWorkflowSnapshotRequest.$Shape} GetWorkflowSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetWorkflowSnapshotRequest & atomic.GetWorkflowSnapshotRequest.$Shape; + + /** + * Verifies a GetWorkflowSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkflowSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkflowSnapshotRequest + */ + static fromObject(object: { [k: string]: any }): atomic.GetWorkflowSnapshotRequest; + + /** + * Creates a plain object from a GetWorkflowSnapshotRequest message. Also converts values to other types if specified. + * @param message GetWorkflowSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetWorkflowSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkflowSnapshotRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetWorkflowSnapshotRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetWorkflowSnapshotRequest { + + /** Properties of a GetWorkflowSnapshotRequest. */ + interface $Properties { + + /** GetWorkflowSnapshotRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetWorkflowSnapshotRequest. */ + type $Shape = atomic.GetWorkflowSnapshotRequest.$Properties; + } + + /** + * Properties of a GetWorkflowSnapshotResponse. + * @deprecated Use atomic.GetWorkflowSnapshotResponse.$Properties instead. + */ + interface IGetWorkflowSnapshotResponse extends atomic.GetWorkflowSnapshotResponse.$Properties { + } + + /** Represents a GetWorkflowSnapshotResponse. */ + class GetWorkflowSnapshotResponse { + + /** + * Constructs a new GetWorkflowSnapshotResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.GetWorkflowSnapshotResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** GetWorkflowSnapshotResponse apiVersion. */ + apiVersion: number; + + /** GetWorkflowSnapshotResponse generation. */ + generation: number; + + /** GetWorkflowSnapshotResponse ontologyVersion. */ + ontologyVersion: string; + + /** GetWorkflowSnapshotResponse identity. */ + identity: string; + + /** GetWorkflowSnapshotResponse nodes. */ + nodes: atomic.KGNode.$Properties[]; + + /** GetWorkflowSnapshotResponse edges. */ + edges: atomic.KGEdge.$Properties[]; + + /** + * Creates a new GetWorkflowSnapshotResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkflowSnapshotResponse instance + */ + static create(properties: atomic.GetWorkflowSnapshotResponse.$Shape): atomic.GetWorkflowSnapshotResponse & atomic.GetWorkflowSnapshotResponse.$Shape; + static create(properties?: atomic.GetWorkflowSnapshotResponse.$Properties): atomic.GetWorkflowSnapshotResponse; + + /** + * Encodes the specified GetWorkflowSnapshotResponse message. Does not implicitly {@link atomic.GetWorkflowSnapshotResponse.verify|verify} messages. + * @param message GetWorkflowSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.GetWorkflowSnapshotResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkflowSnapshotResponse message, length delimited. Does not implicitly {@link atomic.GetWorkflowSnapshotResponse.verify|verify} messages. + * @param message GetWorkflowSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.GetWorkflowSnapshotResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkflowSnapshotResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.GetWorkflowSnapshotResponse & atomic.GetWorkflowSnapshotResponse.$Shape} GetWorkflowSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.GetWorkflowSnapshotResponse & atomic.GetWorkflowSnapshotResponse.$Shape; + + /** + * Decodes a GetWorkflowSnapshotResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.GetWorkflowSnapshotResponse & atomic.GetWorkflowSnapshotResponse.$Shape} GetWorkflowSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.GetWorkflowSnapshotResponse & atomic.GetWorkflowSnapshotResponse.$Shape; + + /** + * Verifies a GetWorkflowSnapshotResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkflowSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkflowSnapshotResponse + */ + static fromObject(object: { [k: string]: any }): atomic.GetWorkflowSnapshotResponse; + + /** + * Creates a plain object from a GetWorkflowSnapshotResponse message. Also converts values to other types if specified. + * @param message GetWorkflowSnapshotResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.GetWorkflowSnapshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkflowSnapshotResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for GetWorkflowSnapshotResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace GetWorkflowSnapshotResponse { + + /** Properties of a GetWorkflowSnapshotResponse. */ + interface $Properties { + + /** GetWorkflowSnapshotResponse apiVersion */ + apiVersion?: (number|null); + + /** GetWorkflowSnapshotResponse generation */ + generation?: (number|null); + + /** GetWorkflowSnapshotResponse ontologyVersion */ + ontologyVersion?: (string|null); + + /** GetWorkflowSnapshotResponse identity */ + identity?: (string|null); + + /** GetWorkflowSnapshotResponse nodes */ + nodes?: (atomic.KGNode.$Properties[]|null); + + /** GetWorkflowSnapshotResponse edges */ + edges?: (atomic.KGEdge.$Properties[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a GetWorkflowSnapshotResponse. */ + type $Shape = atomic.GetWorkflowSnapshotResponse.$Properties; + } + + /** + * Properties of a MaintainKnowledgeGraphRequest. + * @deprecated Use atomic.MaintainKnowledgeGraphRequest.$Properties instead. + */ + interface IMaintainKnowledgeGraphRequest extends atomic.MaintainKnowledgeGraphRequest.$Properties { + } + + /** Represents a MaintainKnowledgeGraphRequest. */ + class MaintainKnowledgeGraphRequest { + + /** + * Constructs a new MaintainKnowledgeGraphRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.MaintainKnowledgeGraphRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** MaintainKnowledgeGraphRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** MaintainKnowledgeGraphRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** MaintainKnowledgeGraphRequest action. */ + action: atomic.KnowledgeMaintainAction; + + /** MaintainKnowledgeGraphRequest scope. */ + scope?: (string|null); + + /** MaintainKnowledgeGraphRequest changes. */ + changes: atomic.Hash.$Properties[]; + + /** MaintainKnowledgeGraphRequest signerAuthHeaders. */ + signerAuthHeaders: { [k: string]: string }; + + /** MaintainKnowledgeGraphRequest signerRemoteUrl. */ + signerRemoteUrl?: (string|null); + + /** + * Creates a new MaintainKnowledgeGraphRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintainKnowledgeGraphRequest instance + */ + static create(properties: atomic.MaintainKnowledgeGraphRequest.$Shape): atomic.MaintainKnowledgeGraphRequest & atomic.MaintainKnowledgeGraphRequest.$Shape; + static create(properties?: atomic.MaintainKnowledgeGraphRequest.$Properties): atomic.MaintainKnowledgeGraphRequest; + + /** + * Encodes the specified MaintainKnowledgeGraphRequest message. Does not implicitly {@link atomic.MaintainKnowledgeGraphRequest.verify|verify} messages. + * @param message MaintainKnowledgeGraphRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.MaintainKnowledgeGraphRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintainKnowledgeGraphRequest message, length delimited. Does not implicitly {@link atomic.MaintainKnowledgeGraphRequest.verify|verify} messages. + * @param message MaintainKnowledgeGraphRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.MaintainKnowledgeGraphRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintainKnowledgeGraphRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.MaintainKnowledgeGraphRequest & atomic.MaintainKnowledgeGraphRequest.$Shape} MaintainKnowledgeGraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.MaintainKnowledgeGraphRequest & atomic.MaintainKnowledgeGraphRequest.$Shape; + + /** + * Decodes a MaintainKnowledgeGraphRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.MaintainKnowledgeGraphRequest & atomic.MaintainKnowledgeGraphRequest.$Shape} MaintainKnowledgeGraphRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.MaintainKnowledgeGraphRequest & atomic.MaintainKnowledgeGraphRequest.$Shape; + + /** + * Verifies a MaintainKnowledgeGraphRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintainKnowledgeGraphRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintainKnowledgeGraphRequest + */ + static fromObject(object: { [k: string]: any }): atomic.MaintainKnowledgeGraphRequest; + + /** + * Creates a plain object from a MaintainKnowledgeGraphRequest message. Also converts values to other types if specified. + * @param message MaintainKnowledgeGraphRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.MaintainKnowledgeGraphRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintainKnowledgeGraphRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for MaintainKnowledgeGraphRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace MaintainKnowledgeGraphRequest { + + /** Properties of a MaintainKnowledgeGraphRequest. */ + interface $Properties { + + /** MaintainKnowledgeGraphRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** MaintainKnowledgeGraphRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** MaintainKnowledgeGraphRequest action */ + action?: (atomic.KnowledgeMaintainAction|null); + + /** MaintainKnowledgeGraphRequest scope */ + scope?: (string|null); + + /** MaintainKnowledgeGraphRequest changes */ + changes?: (atomic.Hash.$Properties[]|null); + + /** MaintainKnowledgeGraphRequest signerAuthHeaders */ + signerAuthHeaders?: ({ [k: string]: string }|null); + + /** MaintainKnowledgeGraphRequest signerRemoteUrl */ + signerRemoteUrl?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a MaintainKnowledgeGraphRequest. */ + type $Shape = atomic.MaintainKnowledgeGraphRequest.$Properties; + } + + /** KnowledgeMaintainAction enum. */ + enum KnowledgeMaintainAction { + + /** KNOWLEDGE_MAINTAIN_ACTION_UNSPECIFIED value */ + KNOWLEDGE_MAINTAIN_ACTION_UNSPECIFIED = 0, + + /** KNOWLEDGE_MAINTAIN_ACTION_EMBED value */ + KNOWLEDGE_MAINTAIN_ACTION_EMBED = 1, + + /** KNOWLEDGE_MAINTAIN_ACTION_ENRICH value */ + KNOWLEDGE_MAINTAIN_ACTION_ENRICH = 2, + + /** KNOWLEDGE_MAINTAIN_ACTION_REINDEX value */ + KNOWLEDGE_MAINTAIN_ACTION_REINDEX = 3 + } + + /** + * Properties of a MaintainKnowledgeGraphResponse. + * @deprecated Use atomic.MaintainKnowledgeGraphResponse.$Properties instead. + */ + interface IMaintainKnowledgeGraphResponse extends atomic.MaintainKnowledgeGraphResponse.$Properties { + } + + /** Represents a MaintainKnowledgeGraphResponse. */ + class MaintainKnowledgeGraphResponse { + + /** + * Constructs a new MaintainKnowledgeGraphResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.MaintainKnowledgeGraphResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** MaintainKnowledgeGraphResponse processed. */ + processed: (number|Long); + + /** MaintainKnowledgeGraphResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** MaintainKnowledgeGraphResponse provider. */ + provider?: (string|null); + + /** MaintainKnowledgeGraphResponse dimensions. */ + dimensions?: (number|null); + + /** MaintainKnowledgeGraphResponse path. */ + path?: (string|null); + + /** + * Creates a new MaintainKnowledgeGraphResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintainKnowledgeGraphResponse instance + */ + static create(properties: atomic.MaintainKnowledgeGraphResponse.$Shape): atomic.MaintainKnowledgeGraphResponse & atomic.MaintainKnowledgeGraphResponse.$Shape; + static create(properties?: atomic.MaintainKnowledgeGraphResponse.$Properties): atomic.MaintainKnowledgeGraphResponse; + + /** + * Encodes the specified MaintainKnowledgeGraphResponse message. Does not implicitly {@link atomic.MaintainKnowledgeGraphResponse.verify|verify} messages. + * @param message MaintainKnowledgeGraphResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.MaintainKnowledgeGraphResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintainKnowledgeGraphResponse message, length delimited. Does not implicitly {@link atomic.MaintainKnowledgeGraphResponse.verify|verify} messages. + * @param message MaintainKnowledgeGraphResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.MaintainKnowledgeGraphResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintainKnowledgeGraphResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.MaintainKnowledgeGraphResponse & atomic.MaintainKnowledgeGraphResponse.$Shape} MaintainKnowledgeGraphResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.MaintainKnowledgeGraphResponse & atomic.MaintainKnowledgeGraphResponse.$Shape; + + /** + * Decodes a MaintainKnowledgeGraphResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.MaintainKnowledgeGraphResponse & atomic.MaintainKnowledgeGraphResponse.$Shape} MaintainKnowledgeGraphResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.MaintainKnowledgeGraphResponse & atomic.MaintainKnowledgeGraphResponse.$Shape; + + /** + * Verifies a MaintainKnowledgeGraphResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintainKnowledgeGraphResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintainKnowledgeGraphResponse + */ + static fromObject(object: { [k: string]: any }): atomic.MaintainKnowledgeGraphResponse; + + /** + * Creates a plain object from a MaintainKnowledgeGraphResponse message. Also converts values to other types if specified. + * @param message MaintainKnowledgeGraphResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.MaintainKnowledgeGraphResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintainKnowledgeGraphResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for MaintainKnowledgeGraphResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace MaintainKnowledgeGraphResponse { + + /** Properties of a MaintainKnowledgeGraphResponse. */ + interface $Properties { + + /** MaintainKnowledgeGraphResponse processed */ + processed?: (number|Long|null); + + /** MaintainKnowledgeGraphResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** MaintainKnowledgeGraphResponse provider */ + provider?: (string|null); + + /** MaintainKnowledgeGraphResponse dimensions */ + dimensions?: (number|null); + + /** MaintainKnowledgeGraphResponse path */ + path?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a MaintainKnowledgeGraphResponse. */ + type $Shape = atomic.MaintainKnowledgeGraphResponse.$Properties; + } +} + +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** + * Properties of a Timestamp. + * @deprecated Use google.protobuf.Timestamp.$Properties instead. + */ + interface ITimestamp extends google.protobuf.Timestamp.$Properties { + } + + /** Represents a Timestamp. */ + class Timestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.Timestamp.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** Timestamp seconds. */ + seconds: (number|Long); + + /** Timestamp nanos. */ + nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + static create(properties: google.protobuf.Timestamp.$Shape): google.protobuf.Timestamp & google.protobuf.Timestamp.$Shape; + static create(properties?: google.protobuf.Timestamp.$Properties): 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 + */ + static encode(message: google.protobuf.Timestamp.$Properties, 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 + */ + static encodeDelimited(message: google.protobuf.Timestamp.$Properties, 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 {google.protobuf.Timestamp & google.protobuf.Timestamp.$Shape} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp & google.protobuf.Timestamp.$Shape; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp & google.protobuf.Timestamp.$Shape} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp & google.protobuf.Timestamp.$Shape; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + 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 + */ + 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 + */ + static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for Timestamp + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace Timestamp { + + /** Properties of a Timestamp. */ + interface $Properties { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a Timestamp. */ + type $Shape = google.protobuf.Timestamp.$Properties; + } + } +} diff --git a/vendor/nodeatomic/dist/generated/runtime-contract.d.ts b/vendor/nodeatomic/dist/generated/runtime-contract.d.ts new file mode 100644 index 0000000..4f7cf06 --- /dev/null +++ b/vendor/nodeatomic/dist/generated/runtime-contract.d.ts @@ -0,0 +1 @@ +export declare const descriptorSha256 = "8e034a5fd37a1891d99b29d26a5839111c0081c587534876b2144db71d88cce2"; diff --git a/vendor/nodeatomic/dist/generated/runtime-contract.js b/vendor/nodeatomic/dist/generated/runtime-contract.js new file mode 100644 index 0000000..ebc223a --- /dev/null +++ b/vendor/nodeatomic/dist/generated/runtime-contract.js @@ -0,0 +1,2 @@ +// Generated from the producer's full embedded descriptor. +export const descriptorSha256 = '8e034a5fd37a1891d99b29d26a5839111c0081c587534876b2144db71d88cce2'; diff --git a/vendor/nodeatomic/dist/index.d.ts b/vendor/nodeatomic/dist/index.d.ts new file mode 100644 index 0000000..6329e02 --- /dev/null +++ b/vendor/nodeatomic/dist/index.d.ts @@ -0,0 +1,23 @@ +import type { atomic as Contract } from './generated/proto.cjs'; +export { call, proto } from './native.js'; +export { AtomicRuntimeError } from './runtime/loader.mjs'; +export { openRepository, AtomicRepository } from './repository.js'; +export { KnowledgeClient } from './knowledge.js'; +export type { GetVaultOptions, ListVaultOptions, VaultContextOptions, VerificationOptions, AddOptions, RecordOptions, LogOptions, ChangeOptions, ChangeReference, StatusOptions, ListViewsOptions, CreateViewOptions, SwitchViewOptions, DeleteViewOptions, ChangeMetadata, ChangeAIUsage, ChangeTokenUsage, ChangeGraphSummary, ChangeFileSummary, ChangeBlastRadius, ChangeImpactFile, ChangeImpactEdge, ChangeIntentContext, ChangePlanBinding, ChangeIntentIdentity, ChangeIntentAssociation, } from './repository.js'; +export type FileStatus = 'modified' | 'deleted' | 'untracked' | 'added' | 'conflicted' | 'unspecified'; +/** Convenience presentation of a protobuf file entry (hashes rendered as hex). */ +export type StatusFile = Pick & { + status: FileStatus; + recordedHash?: string; + currentHash?: string; + details?: string; +}; +/** Counts and flags retain their generated contract types. */ +export type RepositoryStatus = Pick & { + viewMerkle?: string; + files: StatusFile[]; +}; +/** Read working-copy status through libatomic inside Node. Accepts an existing + * repository root or nested path. Defaults to cwd; never changes process cwd. + */ +export declare function status(path?: string): Promise; diff --git a/vendor/nodeatomic/dist/index.js b/vendor/nodeatomic/dist/index.js new file mode 100644 index 0000000..469edc7 --- /dev/null +++ b/vendor/nodeatomic/dist/index.js @@ -0,0 +1,45 @@ +import { resolve } from 'node:path'; +import { call, proto as atomic } from './native.js'; +export { call, proto } from './native.js'; +export { AtomicRuntimeError } from './runtime/loader.mjs'; +export { openRepository, AtomicRepository } from './repository.js'; +export { KnowledgeClient } from './knowledge.js'; +const statusNames = { + [atomic.FileStatus.FILE_STATUS_MODIFIED]: 'modified', + [atomic.FileStatus.FILE_STATUS_DELETED]: 'deleted', + [atomic.FileStatus.FILE_STATUS_UNTRACKED]: 'untracked', + [atomic.FileStatus.FILE_STATUS_ADDED]: 'added', + [atomic.FileStatus.FILE_STATUS_CONFLICTED]: 'conflicted', +}; +const hex = (hash) => hash?.value ? Buffer.from(hash.value).toString('hex') : undefined; +/** Read working-copy status through libatomic inside Node. Accepts an existing + * repository root or nested path. Defaults to cwd; never changes process cwd. + */ +export async function status(path = process.cwd()) { + if (typeof path !== 'string' || path.length === 0) { + throw new TypeError('status path must be a non-empty string'); + } + const resolved = atomic.ResolveRepositoryResponse.decode(await call('/atomic.DaemonService/ResolveRepository', atomic.ResolveRepositoryRequest.encode({ path: resolve(path) }).finish())); + const response = atomic.StatusResponse.decode(await call('/atomic.RepositoryQueryService/Status', atomic.StatusRequest.encode({ repository: resolved.repository }).finish())); + return { + view: response.view, + viewMerkle: hex(response.viewMerkle), + needsReindex: response.needsReindex, + files: response.files.map((properties) => { + const file = atomic.FileStatusEntry.create(properties); + return { + path: file.path, + status: statusNames[file.status] ?? 'unspecified', + recordedHash: hex(file.recordedHash), + currentHash: hex(file.currentHash), + details: file.details ?? undefined, + }; + }), + modifiedCount: response.modifiedCount, + deletedCount: response.deletedCount, + untrackedCount: response.untrackedCount, + addedCount: response.addedCount, + conflictedCount: response.conflictedCount, + staleIndexCount: response.staleIndexCount, + }; +} diff --git a/vendor/nodeatomic/dist/knowledge.d.ts b/vendor/nodeatomic/dist/knowledge.d.ts new file mode 100644 index 0000000..849e86b --- /dev/null +++ b/vendor/nodeatomic/dist/knowledge.d.ts @@ -0,0 +1,21 @@ +import type { atomic as Contract } from './generated/proto.cjs'; +/** Client for Atomic's KnowledgeService: knowledge-graph queries and + * maintenance, plus repository-wide workflow inspection. + * + * Requires a libatomic runtime built with KnowledgeService dispatch support + * (e.g. from the `feat/semweb-knowledge-graph` branch). + */ +export declare class KnowledgeClient { + private repository; + constructor(repository: Contract.RepositoryRef); + /** Every read: content/code search, KG search, entity, neighbors, + * callers, graph slice, plan execution, RAG ask. + */ + queryGraph(request: Omit): Promise; + /** Repository-wide workflow inspection; not a view-scoped sandbox query. */ + getProjectIdentity(): Promise; + /** One consistent, repository-wide asserted snapshot. SHACL runs client-side. */ + getWorkflowSnapshot(): Promise; + /** Embed/enrich/reindex (the write/rebuild side of the KG). */ + maintainKnowledgeGraph(request: Omit): Promise; +} diff --git a/vendor/nodeatomic/dist/knowledge.js b/vendor/nodeatomic/dist/knowledge.js new file mode 100644 index 0000000..934e65d --- /dev/null +++ b/vendor/nodeatomic/dist/knowledge.js @@ -0,0 +1,35 @@ +import { call, proto } from './native.js'; +/** Client for Atomic's KnowledgeService: knowledge-graph queries and + * maintenance, plus repository-wide workflow inspection. + * + * Requires a libatomic runtime built with KnowledgeService dispatch support + * (e.g. from the `feat/semweb-knowledge-graph` branch). + */ +export class KnowledgeClient { + repository; + constructor(repository) { + this.repository = repository; + } + /** Every read: content/code search, KG search, entity, neighbors, + * callers, graph slice, plan execution, RAG ask. + */ + async queryGraph(request) { + const bytes = await call('/atomic.KnowledgeService/QueryGraph', proto.QueryGraphRequest.encode({ ...request, repository: this.repository }).finish()); + return proto.QueryGraphResponse.decode(bytes); + } + /** Repository-wide workflow inspection; not a view-scoped sandbox query. */ + async getProjectIdentity() { + const bytes = await call('/atomic.KnowledgeService/GetProjectIdentity', proto.GetProjectIdentityRequest.encode({ repository: this.repository }).finish()); + return proto.GetProjectIdentityResponse.decode(bytes); + } + /** One consistent, repository-wide asserted snapshot. SHACL runs client-side. */ + async getWorkflowSnapshot() { + const bytes = await call('/atomic.KnowledgeService/GetWorkflowSnapshot', proto.GetWorkflowSnapshotRequest.encode({ repository: this.repository }).finish()); + return proto.GetWorkflowSnapshotResponse.decode(bytes); + } + /** Embed/enrich/reindex (the write/rebuild side of the KG). */ + async maintainKnowledgeGraph(request) { + const bytes = await call('/atomic.KnowledgeService/MaintainKnowledgeGraph', proto.MaintainKnowledgeGraphRequest.encode({ ...request, repository: this.repository }).finish()); + return proto.MaintainKnowledgeGraphResponse.decode(bytes); + } +} diff --git a/vendor/nodeatomic/dist/native.d.ts b/vendor/nodeatomic/dist/native.d.ts new file mode 100644 index 0000000..9580ebc --- /dev/null +++ b/vendor/nodeatomic/dist/native.d.ts @@ -0,0 +1,5 @@ +import protocol from './generated/proto.cjs'; +/** Codecs/types generated from the installed addon, not a separate schema. */ +export declare const proto: typeof protocol.atomic; +/** Invoke a supported local service method without sockets or subprocesses. */ +export declare function call(method: string, request: Uint8Array): Promise; diff --git a/vendor/nodeatomic/dist/native.js b/vendor/nodeatomic/dist/native.js new file mode 100644 index 0000000..4f1cc4b --- /dev/null +++ b/vendor/nodeatomic/dist/native.js @@ -0,0 +1,17 @@ +import protocol from './generated/proto.cjs'; +import { descriptorSha256 } from './generated/runtime-contract.js'; +import { loadAddon } from './runtime/loader.mjs'; +/** Codecs/types generated from the installed addon, not a separate schema. */ +export const proto = protocol.atomic; +let native; +/** Invoke a supported local service method without sockets or subprocesses. */ +export async function call(method, request) { + if (typeof method !== 'string' || !(request instanceof Uint8Array)) { + throw new TypeError('call requires a method string and protobuf request bytes'); + } + // Importing codecs/the public API does not require an Atomic installation. + // Cache only a successfully validated runtime; a failed attempt can be retried + // after explicit configuration, without hiding the original failure. + native ??= loadAddon({ expectedDescriptorSha256: descriptorSha256 }); + return native.call(method, Buffer.from(request)); +} diff --git a/vendor/nodeatomic/dist/repository.d.ts b/vendor/nodeatomic/dist/repository.d.ts new file mode 100644 index 0000000..72444a7 --- /dev/null +++ b/vendor/nodeatomic/dist/repository.d.ts @@ -0,0 +1,93 @@ +import type { atomic as Contract } from './generated/proto.cjs'; +export type GetVaultOptions = Omit; +export type ListVaultOptions = Omit; +export type VaultContextOptions = Omit; +export type VerificationOptions = Pick; +export type AddOptions = Omit; +export type RecordOptions = Omit; +export type LogOptions = Omit; +export type ChangeOptions = Omit; +export type ChangeMetadata = Contract.ChangeMetadata; +export type ChangeAIUsage = Contract.ChangeAIUsage; +export type ChangeTokenUsage = Contract.ChangeTokenUsage; +export type ChangeGraphSummary = Contract.ChangeGraphSummary; +export type ChangeFileSummary = Contract.ChangeFileSummary; +export type ChangeBlastRadius = Contract.ChangeBlastRadius; +export type ChangeImpactFile = Contract.ChangeImpactFile; +export type ChangeImpactEdge = Contract.ChangeImpactEdge; +export type ChangeIntentContext = Contract.ChangeIntentContext; +export type ChangePlanBinding = Contract.ChangePlanBinding; +export type ChangeIntentIdentity = Contract.ChangeIntentIdentity; +export type ChangeIntentAssociation = Contract.ChangeIntentAssociation; +export type StatusOptions = Contract.StatusOptions.$Properties; +export type ListViewsOptions = Omit; +export type CreateViewOptions = Omit; +export type SwitchViewOptions = Omit; +export type DeleteViewOptions = Omit; +/** A full binary hash, an unambiguous base32 prefix, or a view-log sequence. */ +export type ChangeReference = { + hash: Uint8Array; +} | { + prefix: string; +} | { + sequence: NonNullable; +}; +/** A routing reference, not an open database. No close() is required. + * Vault reads are currently repository-wide; explicit view selection fails + * closed until the backend implements view-scoped vault revisions. + */ +export declare class AtomicRepository { + readonly reference: Contract.RepositoryRef; + readonly workspace: Contract.WorkspaceInfo | undefined; + constructor(reference: Contract.RepositoryRef, workspace: Contract.WorkspaceInfo | undefined); + /** Track explicit working-copy paths; no implicit add-all or CLI fallback. */ + add(paths: string[], options?: AddOptions): Promise; + /** Publish a change. Pass expected for optimistic concurrency when available. */ + record(message: string, options?: RecordOptions): Promise; + /** Working-copy status through the in-process query handler. */ + status(options?: StatusOptions): Promise; + /** Paged change history; use the returned nextCursor for subsequent pages. */ + log(options?: LogOptions): Promise; + /** Get one change. includes.metadata returns a decoded, privacy-limited + * metadata projection (including native graph/hunk summaries) alongside the canonical V3 bundle. uint64 counters and + * micro-USD retain generated Long values; do not coerce them to JS numbers. + */ + change(ref: ChangeReference, options?: ChangeOptions): Promise; + /** Read the current working-copy view's recorded bytes. This uses the existing + * read-only restore PREVIEW, never the restore mutation or the on-disk file. + * Missing content is absent, not an empty file. The observed view is returned. + */ + recordedFile(path: string): Promise<{ + content?: Uint8Array; + view?: string; + }>; + readonly views: { + list: (options?: ListViewsOptions) => Promise; + create: (name: string, options?: CreateViewOptions) => Promise; + switch: (name: string, options?: SwitchViewOptions) => Promise; + delete: (name: string, options?: DeleteViewOptions) => Promise; + }; + readonly vault: { + /** Equivalent stored-entry lookup to vault show / intent show / memory show. */ + get: (options: GetVaultOptions) => Promise; + /** List stored entries; optional kind selects intent/memory/goal summaries. */ + list: (options?: ListVaultOptions) => Promise; + context: (options?: VaultContextOptions) => Promise; + getIntent: (id: string) => Promise; + listIntents: () => Promise; + /** Returns the exact stored signed JSON-LD and backend verification facts. + * valid means signature-valid AND source-fresh. Use signatureValid and + * sourceFresh separately; neither implies signer trust or buffer freshness. + */ + getSignedIntent: (id: string, options?: VerificationOptions) => Promise; + }; + readonly attestations: { + /** No signing, private-key access, or mutation. Public keys are 32 bytes. + * Omitted publicKey resolves the proof's signer from existing public identities. + * Unknown key yields absent signatureValid, not a proven-invalid signature. + */ + verify: (subject: Contract.AttestationTarget.$Properties, options?: VerificationOptions) => Promise; + }; +} +/** Resolve a repository once; calls use its reference without running Atomic CLI. */ +export declare function openRepository(path?: string): Promise; diff --git a/vendor/nodeatomic/dist/repository.js b/vendor/nodeatomic/dist/repository.js new file mode 100644 index 0000000..f5563ca --- /dev/null +++ b/vendor/nodeatomic/dist/repository.js @@ -0,0 +1,163 @@ +import { resolve } from 'node:path'; +import { call, proto } from './native.js'; +function requireId(id) { + if (typeof id !== 'string' || id.trim().length === 0) + throw new TypeError('a non-empty subject id is required'); +} +function requireName(name) { + if (typeof name !== 'string' || !name.trim()) + throw new TypeError('a non-empty view name is required'); +} +/** A routing reference, not an open database. No close() is required. + * Vault reads are currently repository-wide; explicit view selection fails + * closed until the backend implements view-scoped vault revisions. + */ +export class AtomicRepository { + reference; + workspace; + constructor(reference, workspace) { + this.reference = reference; + this.workspace = workspace; + } + /** Track explicit working-copy paths; no implicit add-all or CLI fallback. */ + async add(paths, options = {}) { + if (!Array.isArray(paths) || !paths.length || paths.some((p) => typeof p !== 'string' || !p.trim())) { + throw new TypeError('add requires at least one non-empty path'); + } + return proto.AddFilesResponse.decode(await call('/atomic.RepositoryMutationService/AddFiles', proto.AddFilesRequest.encode({ ...options, paths, repository: this.reference }).finish())); + } + /** Publish a change. Pass expected for optimistic concurrency when available. */ + async record(message, options = {}) { + if (typeof message !== 'string' || !message.trim()) + throw new TypeError('record requires a non-empty message'); + return proto.RecordResponse.decode(await call('/atomic.RepositoryMutationService/Record', proto.RecordRequest.encode({ ...options, message, repository: this.reference }).finish())); + } + /** Working-copy status through the in-process query handler. */ + async status(options = {}) { + return proto.StatusResponse.decode(await call('/atomic.RepositoryQueryService/Status', proto.StatusRequest.encode({ repository: this.reference, options }).finish())); + } + /** Paged change history; use the returned nextCursor for subsequent pages. */ + async log(options = {}) { + return proto.LogResponse.decode(await call('/atomic.RepositoryQueryService/Log', proto.LogRequest.encode({ ...options, repository: this.reference }).finish())); + } + /** Get one change. includes.metadata returns a decoded, privacy-limited + * metadata projection (including native graph/hunk summaries) alongside the canonical V3 bundle. uint64 counters and + * micro-USD retain generated Long values; do not coerce them to JS numbers. + */ + async change(ref, options = {}) { + if (!ref || typeof ref !== 'object' || Object.keys(ref).length !== 1) { + throw new TypeError('change requires exactly one hash, prefix, or sequence'); + } + let reference; + if ('hash' in ref && ref.hash instanceof Uint8Array && ref.hash.length === 32) { + reference = { hash: { value: ref.hash } }; + } + else if ('prefix' in ref && typeof ref.prefix === 'string' && ref.prefix.trim()) { + reference = { prefix: ref.prefix }; + } + else if ('sequence' in ref && ((typeof ref.sequence === 'number' && Number.isSafeInteger(ref.sequence) && ref.sequence >= 0) || + (typeof ref.sequence === 'object' && ref.sequence !== null && + Number.isInteger(ref.sequence.low) && Number.isInteger(ref.sequence.high) && + Number(ref.sequence.toString()) >= 0))) { + reference = { sequence: ref.sequence }; + } + else { + throw new TypeError('change requires a 32-byte hash, non-empty prefix, or non-negative safe sequence'); + } + return proto.GetChangeResponse.decode(await call('/atomic.RepositoryQueryService/GetChange', proto.GetChangeRequest.encode({ ...options, ref: reference, repository: this.reference }).finish())); + } + /** Read the current working-copy view's recorded bytes. This uses the existing + * read-only restore PREVIEW, never the restore mutation or the on-disk file. + * Missing content is absent, not an empty file. The observed view is returned. + */ + async recordedFile(path) { + if (typeof path !== 'string' || !path.trim() || path.startsWith('/') || /^[A-Za-z]:/.test(path) || path.startsWith('\\') || + path.split(/[\\/]/).some((part) => part === '..')) + throw new TypeError('recordedFile requires a repository-relative path'); + const response = proto.PreviewMutationResponse.decode(await call('/atomic.RepositoryQueryService/PreviewRestore', proto.PreviewRestoreRequest.encode({ repository: this.reference, paths: [path], contentPath: path }).finish())); + return { content: response.pristineContent ?? undefined, view: response.view ?? undefined }; + } + views = { + list: async (options = {}) => proto.ListViewsResponse.decode(await call('/atomic.ViewService/ListViews', proto.ListViewsRequest.encode({ ...options, repository: this.reference }).finish())), + create: async (name, options = {}) => { + requireName(name); + const bases = [options.fromView, options.parent, options.empty].filter((v) => v != null); + if (bases.length > 1) + throw new TypeError('choose only one view base: fromView, parent, or empty'); + return proto.CreateViewResponse.decode(await call('/atomic.ViewService/CreateView', proto.CreateViewRequest.encode({ ...options, name, repository: this.reference }).finish())); + }, + switch: async (name, options = {}) => { + requireName(name); + return proto.SwitchViewResponse.decode(await call('/atomic.ViewService/SwitchView', proto.SwitchViewRequest.encode({ ...options, view: name, repository: this.reference }).finish())); + }, + delete: async (name, options = {}) => { + requireName(name); + return proto.DeleteViewResponse.decode(await call('/atomic.ViewService/DeleteView', proto.DeleteViewRequest.encode({ ...options, view: name, repository: this.reference }).finish())); + }, + }; + vault = { + /** Equivalent stored-entry lookup to vault show / intent show / memory show. */ + get: async (options) => { + const bytes = await call('/atomic.VaultService/GetVaultEntry', proto.GetVaultEntryRequest.encode({ ...options, repository: this.reference }).finish()); + return proto.GetVaultEntryResponse.decode(bytes); + }, + /** List stored entries; optional kind selects intent/memory/goal summaries. */ + list: async (options = {}) => { + const bytes = await call('/atomic.VaultService/ListVaultEntries', proto.ListVaultEntriesRequest.encode({ ...options, repository: this.reference }).finish()); + return proto.ListVaultEntriesResponse.decode(bytes); + }, + context: async (options = {}) => { + const bytes = await call('/atomic.VaultService/GetVaultContext', proto.GetVaultContextRequest.encode({ ...options, repository: this.reference }).finish()); + return proto.GetVaultContextResponse.decode(bytes); + }, + getIntent: async (id) => { + requireId(id); + return this.vault.get({ id, kind: proto.VaultEntityKind.VAULT_ENTITY_KIND_INTENT, includeBundle: true }); + }, + listIntents: async () => this.vault.list({ kind: proto.VaultEntityKind.VAULT_ENTITY_KIND_INTENT }), + /** Returns the exact stored signed JSON-LD and backend verification facts. + * valid means signature-valid AND source-fresh. Use signatureValid and + * sourceFresh separately; neither implies signer trust or buffer freshness. + */ + getSignedIntent: async (id, options = {}) => { + requireId(id); + return this.attestations.verify({ intentId: id }, options); + }, + }; + attestations = { + /** No signing, private-key access, or mutation. Public keys are 32 bytes. + * Omitted publicKey resolves the proof's signer from existing public identities. + * Unknown key yields absent signatureValid, not a proven-invalid signature. + */ + verify: async (subject, options = {}) => { + const targets = [subject.intentId, subject.memoryId, subject.changeHash, subject.graphStats] + .filter((value) => value != null); + if (targets.length !== 1) + throw new TypeError('exactly one attestation subject is required'); + if (subject.intentId != null) + requireId(subject.intentId); + if (subject.memoryId != null) + requireId(subject.memoryId); + if (options.publicKey != null && options.identityName != null) { + throw new TypeError('use publicKey or identityName, not both'); + } + if (options.publicKey != null && !(options.publicKey instanceof Uint8Array)) { + throw new TypeError('publicKey must be a Uint8Array'); + } + if (options.publicKey != null && options.publicKey.length !== 32) { + throw new TypeError('Ed25519 publicKey must be 32 bytes'); + } + const bytes = await call('/atomic.AttestationService/VerifyAttestation', proto.VerifyAttestationRequest.encode({ ...options, subject, repository: this.reference }).finish()); + return proto.VerifyAttestationResponse.decode(bytes); + }, + }; +} +/** Resolve a repository once; calls use its reference without running Atomic CLI. */ +export async function openRepository(path = process.cwd()) { + if (typeof path !== 'string' || path.length === 0) + throw new TypeError('repository path must be a non-empty string'); + const response = proto.ResolveRepositoryResponse.decode(await call('/atomic.DaemonService/ResolveRepository', proto.ResolveRepositoryRequest.encode({ path: resolve(path) }).finish())); + if (!response.repository) + throw new Error('libatomic did not return a repository reference'); + return new AtomicRepository(proto.RepositoryRef.create(response.repository), response.workspace ? proto.WorkspaceInfo.create(response.workspace) : undefined); +} diff --git a/vendor/nodeatomic/dist/runtime/loader.d.mts b/vendor/nodeatomic/dist/runtime/loader.d.mts new file mode 100644 index 0000000..48cc662 --- /dev/null +++ b/vendor/nodeatomic/dist/runtime/loader.d.mts @@ -0,0 +1,35 @@ +export interface NativeAddon { + call(method: string, request: Buffer): Promise; + descriptor(): Buffer; +} +export interface RuntimeHost { + platform: string; + arch: string; + nodeApiVersion: number; + libc?: string; +} +export interface RuntimeManifest { + schemaVersion: 1; + version: string; + revision: string; + target: string; + platform: string; + arch: string; + nodeApiVersion: number; + library: string; + librarySha256: string; + descriptorSha256: string; +} +export interface RuntimeOptions { + env?: NodeJS.ProcessEnv; + host?: RuntimeHost; + cwd?: string; + expectedDescriptorSha256?: string; + load?: (path: string) => NativeAddon; +} +export class AtomicRuntimeError extends Error { + readonly code: string; + constructor(code: string, message: string, cause?: unknown); +} +export function resolveRuntime(options?: RuntimeOptions): { path: string; manifest?: RuntimeManifest }; +export function loadAddon(options?: RuntimeOptions): NativeAddon; diff --git a/vendor/nodeatomic/dist/runtime/loader.mjs b/vendor/nodeatomic/dist/runtime/loader.mjs new file mode 100644 index 0000000..31053e0 --- /dev/null +++ b/vendor/nodeatomic/dist/runtime/loader.mjs @@ -0,0 +1,227 @@ +import { createHash } from 'node:crypto'; +import { accessSync, constants, readFileSync, realpathSync, statSync } from 'node:fs'; +import { dirname, extname, isAbsolute, join, relative, sep } from 'node:path'; + +const targets = { + 'darwin/arm64': { target: 'aarch64-apple-darwin', library: 'libatomic.dylib' }, + 'linux/x64': { target: 'x86_64-unknown-linux-gnu', library: 'libatomic.so' }, + 'win32/x64': { target: 'x86_64-pc-windows-msvc', library: 'libatomic.dll' }, +}; +const sha256 = (bytes) => createHash('sha256').update(bytes).digest('hex'); +const digestPattern = /^[0-9a-f]{64}$/; + +export class AtomicRuntimeError extends Error { + constructor(code, message, cause) { + super(message, cause ? { cause } : undefined); + this.name = 'AtomicRuntimeError'; + this.code = code; + } +} + +function fail(code, message, cause) { + throw new AtomicRuntimeError(code, message, cause); +} + +function currentHost() { + return { + platform: process.platform, + arch: process.arch, + nodeApiVersion: Number(process.versions.napi ?? 0), + libc: process.platform === 'linux' + ? (process.report?.getReport().header.glibcVersionRuntime ? 'glibc' : 'musl') : undefined, + }; +} + +function platformSpec(host) { + const spec = targets[`${host.platform}/${host.arch}`]; + if (!spec || (host.platform === 'linux' && host.libc !== 'glibc')) { + fail('ATOMIC_UNSUPPORTED_PLATFORM', `No Atomic Node runtime is supported for ${host.platform}/${host.arch}${host.platform === 'linux' ? `/${host.libc}` : ''}. Supported: macOS ARM64, Linux x64 glibc, Windows x64.`); + } + if (!Number.isInteger(host.nodeApiVersion) || host.nodeApiVersion < 8) { + fail('ATOMIC_NODE_API_UNSUPPORTED', 'Atomic requires a Node/Electron host supporting Node-API 8 or newer.'); + } + return spec; +} + +function absolutePath(value, name) { + if (!isAbsolute(value)) fail('ATOMIC_RUNTIME_CONFIGURATION', `${name} must be an absolute path, not ${JSON.stringify(value)}.`); + return value; +} + +function exists(path) { + try { statSync(path); return true; } + catch (error) { + if (error.code === 'ENOENT' || error.code === 'ENOTDIR') return false; + fail('ATOMIC_RUNTIME_IO', `Cannot inspect Atomic runtime path ${path}: ${error.message}`, error); + } +} + +function inside(path, directory) { + const rel = relative(directory, path); + return rel === '' || (rel !== '..' && !rel.startsWith(`..${sep}`) && !isAbsolute(rel)); +} + +function readManifest(directory, host, spec) { + const path = join(directory, 'libatomic-runtime.json'); + let manifest; + try { manifest = JSON.parse(readFileSync(path, 'utf8')); } + catch (error) { + fail('ATOMIC_RUNTIME_MANIFEST', `Cannot read ${path}. Install an Atomic release containing the Node-enabled runtime, or set ATOMIC_RUNTIME_DIR to that installation directory. ${error.message}`, error); + } + if (!manifest || manifest.schemaVersion !== 1 || manifest.platform !== host.platform + || manifest.arch !== host.arch || manifest.target !== spec.target || manifest.library !== spec.library + || !/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(manifest.version) + || !/^[0-9a-f]{40}$/.test(manifest.revision) + || !Number.isInteger(manifest.nodeApiVersion) || manifest.nodeApiVersion < 8 + || manifest.nodeApiVersion > host.nodeApiVersion + || !digestPattern.test(manifest.librarySha256) || !digestPattern.test(manifest.descriptorSha256)) { + fail('ATOMIC_RUNTIME_MANIFEST', `Invalid or incompatible runtime manifest ${path}; expected ${spec.target}, ${spec.library}, and a supported Node-API version.`); + } + return manifest; +} + +function runtimeByExecutable(executable, host, spec) { + let binary; + try { + binary = realpathSync(executable); + if (!statSync(binary).isFile()) throw new Error('not a regular file'); + } catch (error) { + fail('ATOMIC_RUNTIME_NOT_FOUND', `Cannot locate the Atomic executable ${executable}: ${error.message}`, error); + } + const directory = dirname(binary); + return { path: join(directory, spec.library), manifest: readManifest(directory, host, spec) }; +} + +/** Location of the installer's machine record, mirroring the installer's own + * resolution: `${XDG_STATE_HOME:-$HOME/.local/state}/atomic/install.json`. */ +function installationRecordPath(env, host) { + const state = env.XDG_STATE_HOME && env.XDG_STATE_HOME !== '' ? env.XDG_STATE_HOME : ''; + const home = env.HOME || (host.platform === 'win32' ? env.USERPROFILE : undefined) || ''; + const base = state || (home ? join(home, '.local', 'state') : ''); + return base ? join(base, 'atomic', 'install.json') : undefined; +} + +/** The official installer registers the active complete runtime in its + * installation record, so editors find it without PATH or environment setup. + * A registration that exists but is broken is a hard error: silently loading a + * different installation would hide the exact drift the registration prevents. + * A record without `runtime_dir` is a CLI-only or legacy install — not a + * registration — so discovery continues to PATH. */ +function registeredRuntime(env, host, spec) { + const record = installationRecordPath(env, host); + if (!record || !exists(record)) return undefined; + let parsed; + try { parsed = JSON.parse(readFileSync(record, 'utf8')); } + catch (error) { + fail('ATOMIC_RUNTIME_CONFIGURATION', `Cannot parse the Atomic installation record ${record}. Re-run the Atomic installer to repair it: ${error.message}`, error); + } + if (!parsed || typeof parsed !== 'object' || parsed.runtime_dir === undefined) return undefined; + const directory = absolutePath(String(parsed.runtime_dir), `runtime_dir in ${record}`); + return { path: join(directory, spec.library), manifest: readManifest(directory, host, spec), registered: record }; +} + +/** Resolve installation files only: never execute a CLI, search source trees, + * choose a "latest" version directory, or fall back after a bad installation. */ +export function resolveRuntime({ env = process.env, host = currentHost(), cwd = process.cwd() } = {}) { + const spec = platformSpec(host); + if (env.ATOMIC_RUNTIME_DIR && env.LIBATOMIC_ADDON) { + fail('ATOMIC_RUNTIME_CONFIGURATION', 'Set ATOMIC_RUNTIME_DIR or LIBATOMIC_ADDON, not both.'); + } + if (env.ATOMIC_RUNTIME_DIR) { + const directory = absolutePath(env.ATOMIC_RUNTIME_DIR, 'ATOMIC_RUNTIME_DIR'); + return { path: join(directory, spec.library), manifest: readManifest(directory, host, spec) }; + } + if (env.LIBATOMIC_ADDON) { + const path = absolutePath(env.LIBATOMIC_ADDON, 'LIBATOMIC_ADDON'); + if (![extname(spec.library), '.node'].includes(extname(path))) { + fail('ATOMIC_RUNTIME_CONFIGURATION', `LIBATOMIC_ADDON must be a ${extname(spec.library)} or .node artifact for ${spec.target}.`); + } + const directory = dirname(path); + // Explicit development artifacts can lack metadata. If metadata exists, + // however, it must describe this exact library; overrides cannot bypass it. + const manifest = exists(join(directory, 'libatomic-runtime.json')) ? readManifest(directory, host, spec) : undefined; + if (manifest) { + let matches; + try { matches = realpathSync(path) === realpathSync(join(directory, manifest.library)); } + catch (error) { + fail('ATOMIC_RUNTIME_MANIFEST', `Cannot resolve the library named by the adjacent runtime manifest: ${error.message}`, error); + } + if (!matches) fail('ATOMIC_RUNTIME_MANIFEST', 'LIBATOMIC_ADDON does not match the library named in its adjacent runtime manifest.'); + } + return { path, manifest }; + } + if (env.ATOMIC_BIN) { + return runtimeByExecutable(absolutePath(env.ATOMIC_BIN, 'ATOMIC_BIN'), host, spec); + } + + // Explicit configuration above; the registered installation outranks PATH + // discovery so an editor launched from the Dock uses the installer's choice. + const registered = registeredRuntime(env, host, spec); + if (registered) return registered; + + const filename = host.platform === 'win32' ? 'atomic.exe' : 'atomic'; + let workingDirectory; + try { workingDirectory = realpathSync(cwd); } catch { workingDirectory = cwd; } + for (const part of (env.PATH ?? env.Path ?? '').split(host.platform === 'win32' ? ';' : ':')) { + const entry = part.replace(/^"(.*)"$/, '$1'); + // Empty/relative PATH entries include the current directory implicitly. + if (!isAbsolute(entry) || inside(entry, workingDirectory)) continue; + const executable = join(entry, filename); + if (!exists(executable) || !statSync(executable).isFile()) continue; + if (inside(realpathSync(executable), workingDirectory)) continue; + if (host.platform !== 'win32') { + try { accessSync(executable, constants.X_OK); } catch { continue; } + } + // The first executable is the active CLI. A missing/incompatible runtime + // there is an error, not permission to load a different installation. + return runtimeByExecutable(executable, host, spec); + } + fail('ATOMIC_RUNTIME_NOT_FOUND', `Atomic is not installed or is not on a trusted absolute PATH entry. Install Atomic with ${spec.library} and libatomic-runtime.json (the official installer registers it automatically), or set ATOMIC_RUNTIME_DIR to its installation directory. nodeatomic does not build Atomic.`); +} + +function dlopen(path) { + const addon = { exports: {} }; + process.dlopen(addon, path); + return addon.exports; +} + +/** Load an installed Node-API library and conservatively gate its protobuf + * contract against the descriptor used to generate this consumer. */ +export function loadAddon({ expectedDescriptorSha256, load = dlopen, ...options } = {}) { + const runtime = resolveRuntime(options); + if (expectedDescriptorSha256 !== undefined && !digestPattern.test(expectedDescriptorSha256)) { + fail('ATOMIC_RUNTIME_CONTRACT', 'nodeatomic has no valid generated descriptor fingerprint; rebuild the consumer.'); + } + const manifest = runtime.manifest; + if (manifest && expectedDescriptorSha256 && manifest.descriptorSha256 !== expectedDescriptorSha256) { + fail('ATOMIC_RUNTIME_CONTRACT', `Atomic ${manifest.version} has a different protobuf contract from this nodeatomic build. Install a matching Atomic runtime or update/rebuild the consumer.`); + } + let addon; + try { + if (!statSync(runtime.path).isFile()) throw new Error('not a regular file'); + if (manifest && sha256(readFileSync(runtime.path)) !== manifest.librarySha256) { + fail('ATOMIC_RUNTIME_INTEGRITY', `Atomic library checksum mismatch: ${runtime.path}. Reinstall the complete runtime.`); + } + addon = load(realpathSync(runtime.path)); + } catch (error) { + if (error instanceof AtomicRuntimeError) throw error; + fail('ATOMIC_RUNTIME_LOAD', `Cannot load ${runtime.path}. Install a library built for this host with libatomic's node feature. ${error.message}`, error); + } + if (typeof addon?.call !== 'function' || typeof addon?.descriptor !== 'function') { + fail('ATOMIC_RUNTIME_EXPORTS', 'The supplied Node-enabled libatomic must export call() and descriptor().'); + } + let descriptor; + try { descriptor = addon.descriptor(); } + catch (error) { + fail('ATOMIC_RUNTIME_CONTRACT', `Cannot read libatomic's protobuf descriptor: ${error.message}`, error); + } + if (!Buffer.isBuffer(descriptor) || descriptor.length === 0) { + fail('ATOMIC_RUNTIME_CONTRACT', 'libatomic returned an empty or invalid protobuf descriptor.'); + } + const descriptorHash = sha256(descriptor); + if ((manifest && descriptorHash !== manifest.descriptorSha256) + || (expectedDescriptorSha256 && descriptorHash !== expectedDescriptorSha256)) { + fail('ATOMIC_RUNTIME_CONTRACT', 'The loaded libatomic protobuf descriptor does not match its manifest or this nodeatomic build. Update/reinstall a matching runtime.'); + } + return addon; +} diff --git a/vendor/nodeatomic/package.json b/vendor/nodeatomic/package.json new file mode 100644 index 0000000..13d05c1 --- /dev/null +++ b/vendor/nodeatomic/package.json @@ -0,0 +1,38 @@ +{ + "name": "nodeatomic", + "version": "0.1.0", + "private": true, + "type": "module", + "description": "In-process TypeScript bindings to Atomic's service layer", + "license": "MIT OR Apache-2.0", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + } + }, + "files": [ + "dist", + "README.md" + ], + "engines": { + "node": ">=18" + }, + "scripts": { + "install:addon": "node scripts/install-addon.mjs", + "generate:proto": "node scripts/generate-proto.mjs", + "build:ts": "tsc && node scripts/copy-generated.mjs", + "build": "npm run generate:proto && npm run build:ts", + "test": "npm run build && node --test test/*.test.mjs", + "test:runtime": "node --test test/runtime.test.mjs test/build.test.mjs", + "status": "node scripts/status.mjs" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "protobufjs-cli": "^2.7.1", + "typescript": "^5.0.0" + }, + "dependencies": { + "protobufjs": "^8.8.1" + } +}