From 7ecba2a76785852fd428f1c5ee71f8ad438c5612 Mon Sep 17 00:00:00 2001 From: Bradley Hilton Date: Thu, 5 Nov 2026 16:00:56 -0600 Subject: [PATCH 1/2] Route all Atomic repository operations through nodeatomic --- CHANGELOG.md | 2 +- README.md | 8 +- THIRD_PARTY_NOTICES.md | 3 +- scripts/atomicCli.test.mjs | 29 - scripts/atomicOperationResults.test.mjs | 53 + scripts/atomicSyncArgs.test.mjs | 19 - scripts/fixtures/fakeAtomic.mjs | 7 - src/atomic/model.ts | 2 +- src/atomic/operationResults.ts | 49 + src/atomic/sourceControl.ts | 44 +- src/atomic/syncArgs.ts | 32 - src/atomic/syncCli.ts | 74 - vendor/nodeatomic/NOTICE | 3 +- vendor/nodeatomic/README.md | 35 + vendor/nodeatomic/dist/generated/proto.cjs | 26233 ++++++++++++---- vendor/nodeatomic/dist/generated/proto.d.cts | 4699 ++- .../dist/generated/runtime-contract.d.ts | 2 +- .../dist/generated/runtime-contract.js | 2 +- vendor/nodeatomic/dist/index.d.ts | 2 +- vendor/nodeatomic/dist/repository.d.ts | 17 + vendor/nodeatomic/dist/repository.js | 38 + 21 files changed, 24571 insertions(+), 6782 deletions(-) delete mode 100644 scripts/atomicCli.test.mjs create mode 100644 scripts/atomicOperationResults.test.mjs delete mode 100644 scripts/atomicSyncArgs.test.mjs delete mode 100644 scripts/fixtures/fakeAtomic.mjs create mode 100644 src/atomic/operationResults.ts delete mode 100644 src/atomic/syncArgs.ts delete mode 100644 src/atomic/syncCli.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 0db3621..f526a27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - 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. +- Route Atomic push, pull, insert-view, and remote registration through nodeatomic and the in-process native service; remove the CLI subprocess bridge. Share Rust authentication with the CLI, surface structured failure reports, and protect unsaved current-view buffers. - 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. diff --git a/README.md b/README.md index 3d9314c..2e9313d 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ Open a **trusted, local filesystem** workspace in an Atomic repository, then ope - Enter a message and choose **✓ / Atomic: Record Tracked Changes** (or accept the input box). This records the displayed tracked paths, not untracked files, using the displayed status's concurrency fence. Save or close unsaved repository documents first. Backend fence failures are surfaced, not retried automatically. - **Atomic History & Views** lists typed **Draft / Shared** views. Expand a view to see its change hashes, then click a hash to inspect the change without switching the working copy. **Load more changes…** pages through that view's history. - Right-click a repository in that panel for **Create View**, **Switch View**, or **Delete View**. New views derive from the displayed current view. Deletion requires confirmation and excludes the current view. Switching never bypasses Atomic's dirty-working-copy check and also refuses unsaved editor documents. -- **Atomic: Push View** and **Atomic: Pull View** choose a remote and view names. Enter a configured remote name or an `https://atomic.storage/...` project URL; the installed Atomic CLI resolves identity authentication and project binding. **Atomic: Add Remote** records a remote in the repository. -- **Atomic: Insert View Into View** inserts all changes from one view into another with Atomic's dependency closure and conflict rules. It asks for confirmation and uses `atomic insert --confirm view`. +- **Atomic: Push View** and **Atomic: Pull View** choose a remote and view names. Enter a configured remote name or an `https://atomic.storage/...` project URL; the native Atomic service resolves identity authentication and project binding. **Atomic: Add Remote** records a remote through the same native service. +- **Atomic: Insert View Into View** inserts all changes from one view into another with Atomic's dependency closure and conflict rules. It asks for confirmation and uses the native insertion API; it does not promote Draft/Shared scope. Pull and insertion may refresh the working copy when targeting the current view, so save or close unsaved repository documents first. Inactive targets do not update host files. - Filesystem events trigger debounced refreshes; **Atomic: Refresh Version Control** retries discovery and reloads state. Errors are available in the **Atomic Version Control** output channel. ### Change detail @@ -84,11 +84,11 @@ This explicitly writes/rebuilds derived database indexes from repository authori All repository calls run in the extension host through `nodeatomic` → the separately installed Node-enabled `libatomic.dylib`, `libatomic.so`, or `libatomic.dll`. nodeatomic selects the host OS/CPU, validates release metadata/checksums and its exact generated protobuf descriptor, then loads the library in-process. It follows the active Atomic executable on PATH (including executable symlinks), or explicit `ATOMIC_RUNTIME_DIR`, `LIBATOMIC_ADDON`, or `ATOMIC_BIN` configuration. Do not set `ATOMIC_RUNTIME_DIR` together with `LIBATOMIC_ADDON`; paths must be absolute. Automatic discovery excludes empty/relative PATH entries and the current working directory. Use a trusted installation PATH, not workspace-controlled executables. -There is no daemon startup, socket, direct database access, or webview native access for repository reads and mutations. The explicit **Push View**, **Pull View**, **Insert View Into View**, and **Add Remote** commands invoke the installed Atomic CLI because remote authentication, project binding, and view-promotion semantics are owned by that CLI. They pass argument arrays (never a shell) and surface bounded stdout/stderr in **Atomic Version Control**. Missing/incompatible runtimes fail with installation/recovery guidance, not an automatic download, compiler invocation, schema repair, or fallback to another installation. Native editor diffs use read-only backend content; no automatic repository initialization, untracking, restore mutation, signing, or attestation creation is added by this panel. +There is no CLI subprocess, daemon startup, socket, direct database access, or webview native access for any repository operation, including **Push View**, **Pull View**, **Insert View Into View**, and **Add Remote**. The trusted local Rust service uses authentication shared with the CLI; private keys, JWT signing, and delegation stay in Rust, never JavaScript. Native reports, push refusals, partial pull failures, and insertion conflicts are surfaced in **Atomic Version Control**. Missing/incompatible runtimes fail with installation/recovery guidance, not an automatic download, compiler invocation, schema repair, or fallback to another installation. Native editor diffs use read-only backend content; no automatic repository initialization, untracking, restore mutation, or attestation creation is added by this panel. ## Develop and package -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. +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`; its NOTICE records the source revision. A clean checkout builds without a sibling repository. Refresh that directory from the nodeatomic producer when its descriptor, API, 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 diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index fe9c433..655bd52 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -39,7 +39,8 @@ THIS SOFTWARE. The bundled `dist/nodeatomic/index.mjs` consumer is generated from [`atomicdotdev/nodeatomic`](https://github.com/atomicdotdev/nodeatomic), revision -`6e50338c1d450cef8463113198d95c61e431a0b9`. The vendored build under +`ac76e68d3d7facd8aefe26ef04baf3350509b115`, with generated codecs from the matching +libatomic descriptor. 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 diff --git a/scripts/atomicCli.test.mjs b/scripts/atomicCli.test.mjs deleted file mode 100644 index 5274d2a..0000000 --- a/scripts/atomicCli.test.mjs +++ /dev/null @@ -1,29 +0,0 @@ -import { expect, test } from 'bun:test'; -import { fileURLToPath } from 'node:url'; -import { AtomicCliError, runAtomicCli } from '../src/atomic/syncCli.ts'; - -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'], options); - } catch (error) { - failure = error; - } - expect(failure).toBeInstanceOf(AtomicCliError); - expect(failure.code).not.toBe(0); - expect(`${failure.stderr}${failure.message}`).toContain('unknown-subcommand'); -}); diff --git a/scripts/atomicOperationResults.test.mjs b/scripts/atomicOperationResults.test.mjs new file mode 100644 index 0000000..d610814 --- /dev/null +++ b/scripts/atomicOperationResults.test.mjs @@ -0,0 +1,53 @@ +import { expect, test } from 'bun:test'; +import { insertResult, pullResult, pushResult } from '../src/atomic/operationResults.ts'; + +const pull = (overrides = {}) => ({ appliedChanges: '2', report: { + localView: 'target', changesDownloaded: '2', changesFailed: '0', filesWritten: '0', + warnings: [], localOnly: [], downloads: [], applyErrors: [], ...overrides +} }); + +test('a native push refusal is not reported as a completed push', () => { + const result = pushResult({ pushedChanges: '0', conflict: { + view: 'feature', description: 'remote history diverged', identityMismatch: false + } }); + expect(result.error).toContain('remote history diverged'); + expect(result.lines).toEqual([]); +}); + +test('a native pull that applied changes but failed materialization remains an error', () => { + const result = pullResult(pull({ applied: true, materializeError: 'unrecorded file would be overwritten' })); + expect(result.error).toContain('Working copy not updated: unrecorded file would be overwritten'); + expect(result.lines.join('\n')).not.toContain('Pull complete:'); + expect(result.lines.join('\n')).not.toContain('switch to'); +}); + +test('native download and reconciliation failures cannot become success', () => { + for (const report of [ + { changesFailed: '1' }, + { changesFailed: '1', downloads: [{ ok: false, error: 'change checksum mismatch' }] }, + { applyErrors: ['view closure rejected'] } + ]) { + const result = pullResult(pull(report)); + expect(result.error).toBeDefined(); + expect(result.lines.join('\n')).toContain('Pull completed with errors:'); + } +}); + +test('a successful inactive-view pull distinguishes membership from working-copy changes', () => { + const result = pullResult(pull({ applied: true, materialized: false, localOnly: ['local-change'], + warnings: [{ text: 'remote identity endpoint unavailable' }] })); + expect(result.error).toBeUndefined(); + expect(result.lines.join('\n')).toContain('Working copy unchanged; switch to “target”'); + expect(result.lines.join('\n')).toContain('1 local changes are not on the remote'); + expect(result.lines.join('\n')).toContain('remote identity endpoint unavailable'); +}); + +test('insertion exposes both new and pre-existing conflicts', () => { + for (const response of [ + { hasConflicts: true, conflicts: [] }, + { hasConflicts: false, conflicts: [{ path: 'conflicted.txt' }] } + ]) { + const result = insertResult({ inserted: [], resolvedTargetView: 'target', skippedCount: 0, ...response }); + expect(result.error).toContain('Insertion reported conflicts'); + } +}); diff --git a/scripts/atomicSyncArgs.test.mjs b/scripts/atomicSyncArgs.test.mjs deleted file mode 100644 index cc55a9d..0000000 --- a/scripts/atomicSyncArgs.test.mjs +++ /dev/null @@ -1,19 +0,0 @@ -import { expect, test } from 'bun:test'; -import { buildInsertViewArgs, buildPullArgs, buildPushArgs } from '../src/atomic/syncArgs.ts'; - -test('push and pull arguments preserve remote and view selections', () => { - expect(buildPushArgs({ remote: 'origin', fromView: 'dev', toView: 'shared' })) - .toEqual(['push', 'origin', '--from-view', 'dev', '--to-view', 'shared']); - expect(buildPullArgs({ remote: 'https://atomic.storage/example', fromView: 'main', toView: 'dev' })) - .toEqual(['pull', 'https://atomic.storage/example', '--from-view', 'main', '--to-view', 'dev']); -}); - -test('empty optional values are omitted', () => { - expect(buildPushArgs({ remote: '', fromView: '', toView: '' })).toEqual(['push']); - expect(buildPullArgs({ remote: ' ', fromView: 'dev' })).toEqual(['pull', '--from-view', 'dev']); -}); - -test('insert view always passes confirm and target view', () => { - expect(buildInsertViewArgs('feature', 'dev')).toEqual(['insert', '--confirm', 'view', 'feature', '--to-view', 'dev']); - expect(() => buildInsertViewArgs('', 'dev')).toThrow('source and target view names are required'); -}); diff --git a/scripts/fixtures/fakeAtomic.mjs b/scripts/fixtures/fakeAtomic.mjs deleted file mode 100644 index 9798ea6..0000000 --- a/scripts/fixtures/fakeAtomic.mjs +++ /dev/null @@ -1,7 +0,0 @@ -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/src/atomic/model.ts b/src/atomic/model.ts index 7545e77..2941c4f 100644 --- a/src/atomic/model.ts +++ b/src/atomic/model.ts @@ -2,7 +2,7 @@ import * as path from 'node:path'; import type { AtomicRepository } from 'nodeatomic' with { 'resolution-mode': 'import' }; import type { ViewSummary } from '../shared/atomicEvidence'; -export type RepositoryClient = Pick; +export type RepositoryClient = Pick; export type Status = Awaited>; export type History = Awaited>; export type Views = Awaited>; diff --git a/src/atomic/operationResults.ts b/src/atomic/operationResults.ts new file mode 100644 index 0000000..47e14c3 --- /dev/null +++ b/src/atomic/operationResults.ts @@ -0,0 +1,49 @@ +import type { PushResponse, PullResponse, InsertViewResponse } from 'nodeatomic' with { 'resolution-mode': 'import' }; + +export type OperationResult = { lines: string[]; error?: string }; + +/** A successful native call can still report a refused push or a partial pull. */ +export function pushResult(response: PushResponse): OperationResult { + if (response.conflict) { + const conflict = response.conflict; + return { lines: [], error: `View “${conflict.view}”: ${conflict.description}` }; + } + const report = response.report; + if (!report) throw new Error('Atomic returned no push report. Install a compatible native runtime.'); + const lines = (report.views ?? []).flatMap((view) => [ + ...(view.shrink ? [`Warning: remote view “${view.remoteName}” contains changes absent locally; its manifest was not reduced.`] : []), + ...(view.forced ? [`Warning: remote view “${view.remoteName}” diverged; a forced push was attempted.`] : []) + ]); + lines.push(`Push complete: ${response.pushedChanges} changes stored, ${report.viewsDeclared} views declared on ${report.remoteName}.`); + return { lines }; +} + +export function pullResult(response: PullResponse): OperationResult { + const report = response.report; + if (!report) throw new Error('Atomic returned no pull report. Install a compatible native runtime.'); + const downloads = report.downloads ?? []; + const localOnly = report.localOnly ?? []; + const lines = (report.warnings ?? []).map((warning) => `Warning: ${warning.text}`); + if (localOnly.length) lines.push(`Warning: ${localOnly.length} local changes are not on the remote.`); + if (report.setIdWarning) lines.push(`Warning: ${report.setIdWarning}`); + const failures = [ + ...downloads.filter((download) => !download.ok).map((download) => download.error || 'A change failed to download.'), + ...(report.applyErrors ?? []), + ...(report.materializeError ? [`Working copy not updated: ${report.materializeError}`] : []) + ]; + if (String(report.changesFailed) !== '0' && !downloads.some((download) => !download.ok)) { + failures.push(`${report.changesFailed} changes failed to download.`); + } + lines.push(`${failures.length ? 'Pull completed with errors' : 'Pull complete'}: ${report.changesDownloaded} changes downloaded, ${response.appliedChanges} applied to ${report.localView}.`); + if (report.materialized) lines.push(`${report.filesWritten} working-copy files updated.`); + else if (report.applied && !report.materializeError) lines.push(`Working copy unchanged; switch to “${report.localView}” to inspect the pulled view.`); + return { lines, ...(failures.length ? { error: failures.join('\n') } : {}) }; +} + +export function insertResult(response: InsertViewResponse): OperationResult { + const lines = [`Inserted ${response.inserted.length} changes into “${response.resolvedTargetView}”; ${response.skippedCount} already present.`]; + if (response.filesUpdated != null) lines.push(`${response.filesUpdated} working-copy files updated.`); + const conflicts = response.conflicts.map((conflict) => conflict.path).filter(Boolean); + return { lines, ...(response.hasConflicts || conflicts.length + ? { error: `Insertion reported conflicts${conflicts.length ? `: ${conflicts.join(', ')}` : '.'}` } : {}) }; +} diff --git a/src/atomic/sourceControl.ts b/src/atomic/sourceControl.ts index 4d6732a..aba9e00 100644 --- a/src/atomic/sourceControl.ts +++ b/src/atomic/sourceControl.ts @@ -6,8 +6,7 @@ import { RepositorySession, resolveRepositoryPath, statusIdentity, statusLabels, import { describeAtomicError, type AtomicIssue } from './errors'; import { AtomicGraphPanel } from './graphPanel'; import { displayChangeHash } from '../shared/atomicHash'; -import { buildInsertViewArgs, buildPullArgs, buildPushArgs } from './syncArgs'; -import { runAtomicCli } from './syncCli'; +import { insertResult, pullResult, pushResult, type OperationResult } from './operationResults'; import type { AtomicRepository } from 'nodeatomic' with { 'resolution-mode': 'import' }; import { AtomicDiffEditor } from './diffEditor'; import { revisionText } from './fileDiff'; @@ -189,7 +188,9 @@ class AtomicSourceControl implements vscode.TreeDataProvider, vscode.Dispo if (toView === undefined) return; const remote = await this.promptRemote(); if (remote === undefined) return; - await this.runSync(owner, 'Push view', buildPushArgs({ remote, fromView, toView })); + await this.runOperation(owner, 'Push view', async () => pushResult(await owner.session.client.push({ + remote: remote.trim(), fromView: fromView.trim() || undefined, toView: toView.trim() || undefined + }))); }); command('pull', async (node?: Node) => { const owner = node?.owner ?? await this.pick(); @@ -200,7 +201,9 @@ class AtomicSourceControl implements vscode.TreeDataProvider, vscode.Dispo if (fromView === undefined) return; const toView = await this.pickView(owner, 'Local view to pull into', owner.session.status?.view); if (toView === undefined) return; - await this.runSync(owner, 'Pull view', buildPullArgs({ remote, fromView, toView })); + await this.runOperation(owner, 'Pull view', async () => pullResult(await owner.session.client.pull({ + remote: remote.trim(), fromView: fromView.trim() || undefined, toView: toView.trim() || undefined + })), toView); }); command('insertView', async (node?: Node) => { const owner = node?.owner ?? await this.pick(); @@ -216,7 +219,8 @@ class AtomicSourceControl implements vscode.TreeDataProvider, vscode.Dispo 'Insert View' ); if (confirmed !== 'Insert View') return; - await this.runSync(owner, 'Insert view', buildInsertViewArgs(source, target)); + await this.runOperation(owner, 'Insert view', async () => + insertResult(await owner.session.client.views.insert(source, target)), target); }); command('addRemote', async (node?: Node) => { const owner = node?.owner ?? await this.pick(); @@ -227,7 +231,10 @@ class AtomicSourceControl implements vscode.TreeDataProvider, vscode.Dispo const url = await vscode.window.showInputBox({ prompt: 'Remote URL (for example an atomic.storage project URL)', placeHolder: 'https://atomic.storage/…', validateInput: (value) => value.trim() ? undefined : 'A remote URL is required' }); if (url === undefined) return; - await this.runSync(owner, 'Add remote', ['remote', 'add', name.trim(), url.trim()]); + await this.runOperation(owner, 'Add remote', async () => { + await owner.session.client.remotes.add(name.trim(), url.trim()); + return { lines: [`Added remote “${name.trim()}”.`] }; + }); }); void this.discover(); } @@ -413,18 +420,27 @@ class AtomicSourceControl implements vscode.TreeDataProvider, vscode.Dispo return picked; } - private async runSync(owner: RepositoryUI, label: string, args: string[]): Promise { + private async runOperation(owner: RepositoryUI, label: string, + operation: () => Promise, workingCopyView?: string): Promise { this.requireTrusted(); - this.output.appendLine(`atomic ${args.join(' ')}`); await vscode.window.withProgress( { location: vscode.ProgressLocation.Notification, title: `Atomic: ${label}`, cancellable: false }, - async () => { - const result = await owner.session.run(() => runAtomicCli(args, { cwd: owner.session.root })); - if (result.stdout.trim()) this.output.appendLine(result.stdout.trim()); - if (result.stderr.trim()) this.output.appendLine(result.stderr.trim()); - } + () => owner.session.run(async () => { + this.requireTrusted(); + if (!this.isOwner(owner)) return; + if (workingCopyView !== undefined && this.hasDirtyDocuments(owner)) { + const currentView = (await owner.session.client.status()).view; + if (!workingCopyView.trim() || workingCopyView.trim() === currentView) { + throw new Error('Save or close unsaved files before updating the working-copy view.'); + } + } + this.output.appendLine(`${label}: ${owner.session.root}`); + const result = await operation(); + result.lines.forEach((line) => this.output.appendLine(line)); + await this.update(owner); + if (result.error) throw new Error(result.error); + }) ); - await this.update(owner); } private async pick(source?: vscode.SourceControl): Promise { diff --git a/src/atomic/syncArgs.ts b/src/atomic/syncArgs.ts deleted file mode 100644 index 82d01fa..0000000 --- a/src/atomic/syncArgs.ts +++ /dev/null @@ -1,32 +0,0 @@ -export type PushArgsOptions = { remote?: string; fromView?: string; toView?: string }; -export type PullArgsOptions = { remote?: string; fromView?: string; toView?: string }; - -function optionalArg(args: string[], flag: string, value: string | undefined): void { - const trimmed = `${value ?? ''}`.trim(); - if (trimmed) args.push(flag, trimmed); -} - -export function buildPushArgs(options: PushArgsOptions): string[] { - const remote = `${options.remote ?? ''}`.trim(); - const args = ['push']; - if (remote) args.push(remote); - optionalArg(args, '--from-view', options.fromView); - optionalArg(args, '--to-view', options.toView); - return args; -} - -export function buildPullArgs(options: PullArgsOptions): string[] { - const remote = `${options.remote ?? ''}`.trim(); - const args = ['pull']; - if (remote) args.push(remote); - optionalArg(args, '--from-view', options.fromView); - optionalArg(args, '--to-view', options.toView); - return args; -} - -export function buildInsertViewArgs(source: string, target: string): string[] { - const from = source.trim(); - const to = target.trim(); - if (!from || !to) throw new Error('source and target view names are required'); - return ['insert', '--confirm', 'view', from, '--to-view', to]; -} diff --git a/src/atomic/syncCli.ts b/src/atomic/syncCli.ts deleted file mode 100644 index 6a683ff..0000000 --- a/src/atomic/syncCli.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { spawn } from 'node:child_process'; - -const MAX_OUTPUT_BYTES = 2 * 1024 * 1024; -const DEFAULT_TIMEOUT_MS = 300_000; - -export class AtomicCliError extends Error { - constructor(message: string, readonly code: number | null, readonly stdout: string, readonly stderr: string) { - super(message); - this.name = 'AtomicCliError'; - } -} - -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(options.executable ?? 'atomic', [...(options.argsPrefix ?? []), ...args], { - cwd: options.cwd, - stdio: ['ignore', 'pipe', 'pipe'] - }); - const stdout: Buffer[] = []; - const stderr: Buffer[] = []; - let outputBytes = 0; - let settled = false; - let timedOut = false; - - const finish = (error?: AtomicCliError) => { - if (settled) return; - settled = true; - clearTimeout(timer); - if (error) reject(error); - else resolve({ stdout: Buffer.concat(stdout).toString('utf8'), stderr: Buffer.concat(stderr).toString('utf8') }); - }; - - const append = (target: Buffer[], chunk: Buffer | string) => { - const buffer = typeof chunk === 'string' ? Buffer.from(chunk) : chunk; - outputBytes += buffer.length; - if (outputBytes <= MAX_OUTPUT_BYTES) target.push(buffer); - }; - - const timer = setTimeout(() => { - timedOut = true; - child.kill(); - }, options.timeoutMs ?? DEFAULT_TIMEOUT_MS); - - child.on('error', (error) => { - const missing = (error as NodeJS.ErrnoException).code === 'ENOENT'; - finish(new AtomicCliError( - missing - ? 'The Atomic CLI was not found on PATH. Install the complete Atomic release on the extension host.' - : `Failed to start the Atomic CLI: ${error.message}`, - null, - Buffer.concat(stdout).toString('utf8'), - Buffer.concat(stderr).toString('utf8') - )); - }); - child.on('close', (code) => { - const out = Buffer.concat(stdout).toString('utf8'); - const err = Buffer.concat(stderr).toString('utf8'); - if (timedOut) { - finish(new AtomicCliError('The Atomic CLI request timed out.', code, out, err)); - return; - } - if (code !== 0) { - finish(new AtomicCliError(err.trim() || `atomic ${args.join(' ')} failed`, code, out, err)); - return; - } - finish(); - }); - child.stdout.on('data', (chunk) => append(stdout, chunk)); - child.stderr.on('data', (chunk) => append(stderr, chunk)); - }); -} diff --git a/vendor/nodeatomic/NOTICE b/vendor/nodeatomic/NOTICE index 0a718c5..93b8a50 100644 --- a/vendor/nodeatomic/NOTICE +++ b/vendor/nodeatomic/NOTICE @@ -1,7 +1,8 @@ Vendored nodeatomic JavaScript consumer and generated protobuf codecs. Source: https://github.com/atomicdotdev/nodeatomic -Source revision: 6e50338c1d450cef8463113198d95c61e431a0b9 +Source revision: ac76e68d3d7facd8aefe26ef04baf3350509b115 +Generated codecs/fingerprint use the matching libatomic descriptor. License: MIT OR Apache-2.0 The vendored files are distributed under the MIT license in the repository diff --git a/vendor/nodeatomic/README.md b/vendor/nodeatomic/README.md index 903310a..568db93 100644 --- a/vendor/nodeatomic/README.md +++ b/vendor/nodeatomic/README.md @@ -6,6 +6,9 @@ All Rust code—including the Node-API exports—lives in the separate Atomic project. This project has no Cargo manifest, Rust sources, or Rust lockfile. No atomicd, RPC connection, or service process is required. +Repository operations use the in-process native protobuf boundary only: no CLI +subprocess, JavaScript signing/private keys, daemon fallback, or alternate network +client. Native sync resolves trusted-local identities and authorization internally. ## Load an installed Atomic runtime @@ -209,6 +212,38 @@ await repo.views.switch(status.view); await repo.views.delete('feature'); ``` +### Sync, remotes, and view insertion + +```ts +await repo.remotes.add('origin', 'https://example.com/project', { setDefault: true }); +const remotes = await repo.remotes.list(); // response.remotes: name, url, default +const pushed = await repo.push({ remote: 'origin', fromView: 'feature', toView: 'shared', identity: 'work' }); +const pulled = await repo.pull({ remote: 'origin', fromView: 'shared', toView: 'feature' }); +const inserted = await repo.views.insert('feature', 'shared', { dryRun: true }); +``` + +`PushOptions` and `PullOptions` expose the canonical protocol controls, including +`remote`, `fromView`, `toView`, `identity`, `dryRun`, `all`, `insecure`, and +`timeoutSecs` (default **300 seconds**); push also supports `force`, `views` and +`expected`, and pull supports `downloadOnly` and `importSidecars` (default **true**). +They exclude `repository`, `authHeaders`, and `remoteUrl`; even untyped callers +cannot override instance routing or supply authentication headers/URL overrides. +Native code owns authentication and canonical graph synchronization. Pull and +insertion retain the canonical handler's working-copy refresh policy: current-view +targets may update host files, while inactive targets only change graph/view +state. Responses retain native reports, conflicts and uint64/Long counters; +callers must inspect outcomes. + +`AddRemoteOptions` exposes `setDefault`; adding and selecting a default is one +native transaction. `InsertViewOptions` exposes `meta`, `allowConflicts`, +`expectedSnapshot`, `sourceSnapshot`, `applyDependencies`, and `dryRun`. Insertion +requires distinct non-empty source/target names, resolves the target's canonical +`ViewRef` with `views.list()`, and uses the `from_view` source arm. Optional snapshot +and dependency controls pass through unchanged. It inserts graph membership and +dependencies, **not Git merging or view-scope promotion**. Source membership and +target identity are never overridable through options. + + `repo.add` requires explicit paths (there is no add-all flag in this RPC). `repo.change(ref, { includes: { metadata: true } })` returns `metadata` with schema version 1, the source change hash, recorded AI model/tool/request/session diff --git a/vendor/nodeatomic/dist/generated/proto.cjs b/vendor/nodeatomic/dist/generated/proto.cjs index d1bf46e..9fce082 100644 --- a/vendor/nodeatomic/dist/generated/proto.cjs +++ b/vendor/nodeatomic/dist/generated/proto.cjs @@ -3712,6 +3712,10 @@ $root.atomic = (function() { case 5: message.status = 5; break; + case "FILE_STATUS_PENDING_UNTRACK": + case 6: + message.status = 6; + break; default: if (typeof object.status === "number" && (object.status | 0) === object.status) message.status = object.status; @@ -3819,6 +3823,7 @@ $root.atomic = (function() { * @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 + * @property {number} FILE_STATUS_PENDING_UNTRACK=6 FILE_STATUS_PENDING_UNTRACK value */ atomic.FileStatus = (function() { var valuesById = $Object.create(null), values = $Object.create(valuesById); @@ -3828,6 +3833,7 @@ $root.atomic = (function() { values[valuesById[3] = "FILE_STATUS_UNTRACKED"] = 3; values[valuesById[4] = "FILE_STATUS_ADDED"] = 4; values[valuesById[5] = "FILE_STATUS_CONFLICTED"] = 5; + values[valuesById[6] = "FILE_STATUS_PENDING_UNTRACK"] = 6; return values; })(); @@ -24086,42 +24092,70 @@ $root.atomic = (function() { 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 + atomic.PushChangesRequest = (function() { + + /** + * Properties of a PushChangesRequest. + * @typedef {Object} atomic.PushChangesRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] PushChangesRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] PushChangesRequest meta + * @property {string|null} [remote] PushChangesRequest remote + * @property {Array.|null} [views] PushChangesRequest views + * @property {atomic.ExpectedState.$Properties|null} [expected] PushChangesRequest expected + * @property {string|null} [toView] PushChangesRequest toView + * @property {string|null} [fromView] PushChangesRequest fromView + * @property {boolean|null} [dryRun] PushChangesRequest dryRun + * @property {boolean|null} [force] PushChangesRequest force + * @property {boolean|null} [all] PushChangesRequest all + * @property {boolean|null} [insecure] PushChangesRequest insecure + * @property {number|Long|null} [timeoutSecs] PushChangesRequest timeoutSecs + * @property {Object.|null} [authHeaders] PushChangesRequest authHeaders + * @property {string|null} [remoteUrl] PushChangesRequest remoteUrl + * @property {string|null} [identity] PushChangesRequest identity * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ /** - * Properties of a GetVaultEntryRequest. + * Properties of a PushChangesRequest. * @memberof atomic - * @interface IGetVaultEntryRequest - * @augments atomic.GetVaultEntryRequest.$Properties - * @deprecated Use atomic.GetVaultEntryRequest.$Properties instead. + * @interface IPushChangesRequest + * @augments atomic.PushChangesRequest.$Properties + * @deprecated Use atomic.PushChangesRequest.$Properties instead. */ /** - * Shape of a GetVaultEntryRequest. - * @typedef {atomic.GetVaultEntryRequest.$Properties} atomic.GetVaultEntryRequest.$Shape + * Shape of a PushChangesRequest. + * @typedef {{ + * repository?: atomic.RepositoryRef.$Shape|null; + * meta?: atomic.RequestMeta.$Shape|null; + * remote?: string|null; + * views?: Array.|null; + * expected?: atomic.ExpectedState.$Shape|null; + * toView?: string|null; + * fromView?: string|null; + * dryRun?: boolean|null; + * force?: boolean|null; + * all?: boolean|null; + * insecure?: boolean|null; + * timeoutSecs?: number|Long|null; + * authHeaders?: Object.|null; + * remoteUrl?: string|null; + * identity?: string|null; + * $unknowns?: Array.; + * }} atomic.PushChangesRequest.$Shape */ /** - * Constructs a new GetVaultEntryRequest. + * Constructs a new PushChangesRequest. * @memberof atomic - * @classdesc Represents a GetVaultEntryRequest. + * @classdesc Represents a PushChangesRequest. * @constructor - * @param {atomic.GetVaultEntryRequest.$Properties=} [properties] Properties to set + * @param {atomic.PushChangesRequest.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var GetVaultEntryRequest = function (properties) { + var PushChangesRequest = function (properties) { + this.views = []; + this.authHeaders = {}; if (properties) for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null && keys[i] !== "__proto__") @@ -24129,88 +24163,184 @@ $root.atomic = (function() { }; /** - * GetVaultEntryRequest repository. + * PushChangesRequest repository. * @member {atomic.RepositoryRef.$Properties|null|undefined} repository - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @instance */ - GetVaultEntryRequest.prototype.repository = null; + PushChangesRequest.prototype.repository = null; /** - * GetVaultEntryRequest kind. - * @member {atomic.VaultEntityKind} kind - * @memberof atomic.GetVaultEntryRequest + * PushChangesRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.PushChangesRequest * @instance */ - GetVaultEntryRequest.prototype.kind = 0; + PushChangesRequest.prototype.meta = null; /** - * GetVaultEntryRequest id. - * @member {string} id - * @memberof atomic.GetVaultEntryRequest + * PushChangesRequest remote. + * @member {string} remote + * @memberof atomic.PushChangesRequest * @instance */ - GetVaultEntryRequest.prototype.id = ""; + PushChangesRequest.prototype.remote = ""; /** - * GetVaultEntryRequest path. - * @member {string|null|undefined} path - * @memberof atomic.GetVaultEntryRequest + * PushChangesRequest views. + * @member {Array.} views + * @memberof atomic.PushChangesRequest * @instance */ - GetVaultEntryRequest.prototype.path = null; + PushChangesRequest.prototype.views = $util.emptyArray; /** - * GetVaultEntryRequest includeBundle. - * @member {boolean} includeBundle - * @memberof atomic.GetVaultEntryRequest + * PushChangesRequest expected. + * @member {atomic.ExpectedState.$Properties|null|undefined} expected + * @memberof atomic.PushChangesRequest * @instance */ - GetVaultEntryRequest.prototype.includeBundle = false; + PushChangesRequest.prototype.expected = null; /** - * GetVaultEntryRequest view. - * @member {atomic.ViewRef.$Properties|null|undefined} view - * @memberof atomic.GetVaultEntryRequest + * PushChangesRequest toView. + * @member {string|null|undefined} toView + * @memberof atomic.PushChangesRequest * @instance */ - GetVaultEntryRequest.prototype.view = null; + PushChangesRequest.prototype.toView = null; + + /** + * PushChangesRequest fromView. + * @member {string|null|undefined} fromView + * @memberof atomic.PushChangesRequest + * @instance + */ + PushChangesRequest.prototype.fromView = null; + + /** + * PushChangesRequest dryRun. + * @member {boolean} dryRun + * @memberof atomic.PushChangesRequest + * @instance + */ + PushChangesRequest.prototype.dryRun = false; + + /** + * PushChangesRequest force. + * @member {boolean} force + * @memberof atomic.PushChangesRequest + * @instance + */ + PushChangesRequest.prototype.force = false; + + /** + * PushChangesRequest all. + * @member {boolean} all + * @memberof atomic.PushChangesRequest + * @instance + */ + PushChangesRequest.prototype.all = false; + + /** + * PushChangesRequest insecure. + * @member {boolean} insecure + * @memberof atomic.PushChangesRequest + * @instance + */ + PushChangesRequest.prototype.insecure = false; + + /** + * PushChangesRequest timeoutSecs. + * @member {number|Long} timeoutSecs + * @memberof atomic.PushChangesRequest + * @instance + */ + PushChangesRequest.prototype.timeoutSecs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PushChangesRequest authHeaders. + * @member {Object.} authHeaders + * @memberof atomic.PushChangesRequest + * @instance + */ + PushChangesRequest.prototype.authHeaders = $util.emptyObject; + + /** + * PushChangesRequest remoteUrl. + * @member {string|null|undefined} remoteUrl + * @memberof atomic.PushChangesRequest + * @instance + */ + PushChangesRequest.prototype.remoteUrl = null; + + /** + * PushChangesRequest identity. + * @member {string|null|undefined} identity + * @memberof atomic.PushChangesRequest + * @instance + */ + PushChangesRequest.prototype.identity = 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"]), + $Object.defineProperty(PushChangesRequest.prototype, "_expected", { + get: $util.oneOfGetter($oneOfFields = ["expected"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PushChangesRequest.prototype, "_to_view", { + get: $util.oneOfGetter($oneOfFields = ["toView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PushChangesRequest.prototype, "_from_view", { + get: $util.oneOfGetter($oneOfFields = ["fromView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PushChangesRequest.prototype, "_remote_url", { + get: $util.oneOfGetter($oneOfFields = ["remoteUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PushChangesRequest.prototype, "_identity", { + get: $util.oneOfGetter($oneOfFields = ["identity"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new GetVaultEntryRequest instance using the specified properties. + * Creates a new PushChangesRequest instance using the specified properties. * @function create - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @static - * @param {atomic.GetVaultEntryRequest.$Properties=} [properties] Properties to set - * @returns {atomic.GetVaultEntryRequest} GetVaultEntryRequest instance + * @param {atomic.PushChangesRequest.$Properties=} [properties] Properties to set + * @returns {atomic.PushChangesRequest} PushChangesRequest instance * @type {{ - * (properties: atomic.GetVaultEntryRequest.$Shape): atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape; - * (properties?: atomic.GetVaultEntryRequest.$Properties): atomic.GetVaultEntryRequest; + * (properties: atomic.PushChangesRequest.$Shape): atomic.PushChangesRequest & atomic.PushChangesRequest.$Shape; + * (properties?: atomic.PushChangesRequest.$Properties): atomic.PushChangesRequest; * }} */ - GetVaultEntryRequest.create = function(properties) { - return new GetVaultEntryRequest(properties); + PushChangesRequest.create = function(properties) { + return new PushChangesRequest(properties); }; /** - * Encodes the specified GetVaultEntryRequest message. Does not implicitly {@link atomic.GetVaultEntryRequest.verify|verify} messages. + * Encodes the specified PushChangesRequest message. Does not implicitly {@link atomic.PushChangesRequest.verify|verify} messages. * @function encode - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @static - * @param {atomic.GetVaultEntryRequest.$Properties} message GetVaultEntryRequest message or plain object to encode + * @param {atomic.PushChangesRequest.$Properties} message PushChangesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVaultEntryRequest.encode = function (message, writer, _depth) { + PushChangesRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); if (_depth === $undefined) @@ -24219,16 +24349,36 @@ $root.atomic = (function() { 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.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.remote != null && $Object.hasOwnProperty.call(message, "remote") && message.remote !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.remote); + if (message.views != null && message.views.length) + for (var i = 0; i < message.views.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.views[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.toView != null && $Object.hasOwnProperty.call(message, "toView")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.toView); + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.fromView); + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun") && message.dryRun !== false) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.dryRun); + if (message.force != null && $Object.hasOwnProperty.call(message, "force") && message.force !== false) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.force); + if (message.all != null && $Object.hasOwnProperty.call(message, "all") && message.all !== false) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.all); + if (message.insecure != null && $Object.hasOwnProperty.call(message, "insecure") && message.insecure !== false) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.insecure); + if (message.timeoutSecs != null && $Object.hasOwnProperty.call(message, "timeoutSecs") && (typeof message.timeoutSecs === "object" ? message.timeoutSecs.low || message.timeoutSecs.high : message.timeoutSecs !== 0)) + writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.timeoutSecs); + if (message.authHeaders != null && $Object.hasOwnProperty.call(message, "authHeaders")) + for (var keys = $Object.keys(message.authHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.authHeaders[keys[i]]).ldelim(); + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.remoteUrl); + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.identity); if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) for (var i = 0; i < message.$unknowns.length; ++i) writer.raw(message.$unknowns[i]); @@ -24236,37 +24386,37 @@ $root.atomic = (function() { }; /** - * Encodes the specified GetVaultEntryRequest message, length delimited. Does not implicitly {@link atomic.GetVaultEntryRequest.verify|verify} messages. + * Encodes the specified PushChangesRequest message, length delimited. Does not implicitly {@link atomic.PushChangesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @static - * @param {atomic.GetVaultEntryRequest.$Properties} message GetVaultEntryRequest message or plain object to encode + * @param {atomic.PushChangesRequest.$Properties} message PushChangesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVaultEntryRequest.encodeDelimited = function(message, writer) { + PushChangesRequest.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a GetVaultEntryRequest message from the specified reader or buffer. + * Decodes a PushChangesRequest message from the specified reader or buffer. * @function decode - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @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 + * @returns {atomic.PushChangesRequest & atomic.PushChangesRequest.$Shape} PushChangesRequest * @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) { + PushChangesRequest.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; + var end, message, key, value; if (length === $undefined) end = reader.len; else { @@ -24276,7 +24426,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.GetVaultEntryRequest(); + message = _target || new $root.atomic.PushChangesRequest(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -24293,43 +24443,142 @@ $root.atomic = (function() { continue; } case 2: { - if (wireType !== 0) + if (wireType !== 2) break; - if (value = reader.int32()) - message.kind = value; - else - delete message.kind; + 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.id = value; + message.remote = value; else - delete message.id; + delete message.remote; continue; } case 4: { if (wireType !== 2) break; - message.path = reader.stringVerify(); - message._path = "path"; + if (!(message.views && message.views.length)) + message.views = []; + message.views.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.toView = reader.stringVerify(); + message._to_view = "toView"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.fromView = reader.stringVerify(); + message._from_view = "fromView"; + continue; + } + case 8: { if (wireType !== 0) break; if (value = reader.bool()) - message.includeBundle = value; + message.dryRun = value; else - delete message.includeBundle; + delete message.dryRun; continue; } - case 20: { + case 9: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.force = value; + else + delete message.force; + continue; + } + case 10: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.all = value; + else + delete message.all; + continue; + } + case 11: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.insecure = value; + else + delete message.insecure; + continue; + } + case 12: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.timeoutSecs = value; + else + delete message.timeoutSecs; + continue; + } + case 13: { if (wireType !== 2) break; - message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + if (message.authHeaders === $util.emptyObject) + message.authHeaders = {}; + 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.authHeaders, key); + message.authHeaders[key] = value; + continue; + } + case 14: { + if (wireType !== 2) + break; + message.remoteUrl = reader.stringVerify(); + message._remote_url = "remoteUrl"; + continue; + } + case 15: { + if (wireType !== 2) + break; + message.identity = reader.stringVerify(); + message._identity = "identity"; continue; } } @@ -24350,30 +24599,30 @@ $root.atomic = (function() { }; /** - * Decodes a GetVaultEntryRequest message from the specified reader or buffer, length delimited. + * Decodes a PushChangesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape} GetVaultEntryRequest + * @returns {atomic.PushChangesRequest & atomic.PushChangesRequest.$Shape} PushChangesRequest * @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) { + PushChangesRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a GetVaultEntryRequest message. + * Verifies a PushChangesRequest message. * @function verify - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @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) { + PushChangesRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -24386,99 +24635,171 @@ $root.atomic = (function() { 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 (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.RequestMeta.verify(message.meta, _depth + 1); if (error) - return "view." + error; + return "meta." + error; + } + if (message.remote != null && $Object.hasOwnProperty.call(message, "remote")) + if (!$util.isString(message.remote)) + return "remote: string expected"; + 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) + if (!$util.isString(message.views[i])) + return "views: 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.toView != null && $Object.hasOwnProperty.call(message, "toView")) { + properties._to_view = 1; + if (!$util.isString(message.toView)) + return "toView: string expected"; + } + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) { + properties._from_view = 1; + if (!$util.isString(message.fromView)) + return "fromView: string expected"; + } + 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.all != null && $Object.hasOwnProperty.call(message, "all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; + if (message.insecure != null && $Object.hasOwnProperty.call(message, "insecure")) + if (typeof message.insecure !== "boolean") + return "insecure: boolean expected"; + if (message.timeoutSecs != null && $Object.hasOwnProperty.call(message, "timeoutSecs")) + if (!$util.isInteger(message.timeoutSecs) && !(message.timeoutSecs && $util.isInteger(message.timeoutSecs.low) && $util.isInteger(message.timeoutSecs.high))) + return "timeoutSecs: integer|Long expected"; + if (message.authHeaders != null && $Object.hasOwnProperty.call(message, "authHeaders")) { + if (!$util.isObject(message.authHeaders)) + return "authHeaders: object expected"; + var key = $Object.keys(message.authHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.authHeaders[key[i]])) + return "authHeaders: string{k:string} expected"; + } + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) { + properties._remote_url = 1; + if (!$util.isString(message.remoteUrl)) + return "remoteUrl: string expected"; + } + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) { + properties._identity = 1; + if (!$util.isString(message.identity)) + return "identity: string expected"; } return null; }; /** - * Creates a GetVaultEntryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PushChangesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @static * @param {Object.} object Plain object - * @returns {atomic.GetVaultEntryRequest} GetVaultEntryRequest + * @returns {atomic.PushChangesRequest} PushChangesRequest */ - GetVaultEntryRequest.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.GetVaultEntryRequest) + PushChangesRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PushChangesRequest) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.GetVaultEntryRequest: object expected"); + throw $TypeError(".atomic.PushChangesRequest: object expected"); if (_depth === $undefined) _depth = 0; if (_depth > $util.recursionLimit) throw $Error("max depth exceeded"); - var message = new $root.atomic.GetVaultEntryRequest(); + var message = new $root.atomic.PushChangesRequest(); if (object.repository != null) { if (!$util.isObject(object.repository)) - throw $TypeError(".atomic.GetVaultEntryRequest.repository: object expected"); + throw $TypeError(".atomic.PushChangesRequest.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.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.PushChangesRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.remote != null) + if (typeof object.remote !== "string" || object.remote.length) + message.remote = $String(object.remote); + if (object.views) { + if (!$Array.isArray(object.views)) + throw $TypeError(".atomic.PushChangesRequest.views: array expected"); + message.views = $Array(object.views.length); + for (var i = 0; i < object.views.length; ++i) + message.views[i] = $String(object.views[i]); + } + if (object.expected != null) { + if (!$util.isObject(object.expected)) + throw $TypeError(".atomic.PushChangesRequest.expected: object expected"); + message.expected = $root.atomic.ExpectedState.fromObject(object.expected, _depth + 1); + } + if (object.toView != null) + message.toView = $String(object.toView); + if (object.fromView != null) + message.fromView = $String(object.fromView); + 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.all != null) + if (object.all) + message.all = $Boolean(object.all); + if (object.insecure != null) + if (object.insecure) + message.insecure = $Boolean(object.insecure); + if (object.timeoutSecs != null) + if (typeof object.timeoutSecs === "object" ? object.timeoutSecs.low || object.timeoutSecs.high : $Number(object.timeoutSecs) !== 0) + if ($util.Long) + message.timeoutSecs = $util.Long.fromValue(object.timeoutSecs, true); + else if (typeof object.timeoutSecs === "string") + message.timeoutSecs = $parseInt(object.timeoutSecs, 10); + else if (typeof object.timeoutSecs === "number") + message.timeoutSecs = object.timeoutSecs; + else if (typeof object.timeoutSecs === "object") + message.timeoutSecs = new $util.LongBits(object.timeoutSecs.low >>> 0, object.timeoutSecs.high >>> 0).toNumber(true); + if (object.authHeaders) { + if (!$util.isObject(object.authHeaders)) + throw $TypeError(".atomic.PushChangesRequest.authHeaders: object expected"); + message.authHeaders = {}; + for (var keys = $Object.keys(object.authHeaders), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.authHeaders, keys[i]); + message.authHeaders[keys[i]] = $String(object.authHeaders[keys[i]]); } - 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); } + if (object.remoteUrl != null) + message.remoteUrl = $String(object.remoteUrl); + if (object.identity != null) + message.identity = $String(object.identity); return message; }; /** - * Creates a plain object from a GetVaultEntryRequest message. Also converts values to other types if specified. + * Creates a plain object from a PushChangesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @static - * @param {atomic.GetVaultEntryRequest} message GetVaultEntryRequest + * @param {atomic.PushChangesRequest} message PushChangesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVaultEntryRequest.toObject = function (message, options, _depth) { + PushChangesRequest.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -24486,107 +24807,136 @@ $root.atomic = (function() { if (_depth > $util.recursionLimit) throw $Error("max depth exceeded"); var object = {}; + if (options.arrays || options.defaults) + object.views = []; + if (options.objects || options.defaults) + object.authHeaders = {}; if (options.defaults) { object.repository = null; - object.kind = options.enums === $String ? "VAULT_ENTITY_KIND_UNSPECIFIED" : 0; - object.id = ""; - object.includeBundle = false; - object.view = null; + object.meta = null; + object.remote = ""; + object.dryRun = false; + object.force = false; + object.all = false; + object.insecure = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeoutSecs = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.timeoutSecs = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } 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); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.RequestMeta.toObject(message.meta, options, _depth + 1); + if (message.remote != null && $Object.hasOwnProperty.call(message, "remote")) + object.remote = message.remote; + if (message.views && message.views.length) { + object.views = $Array(message.views.length); + for (var j = 0; j < message.views.length; ++j) + object.views[j] = message.views[j]; + } + if (message.expected != null && $Object.hasOwnProperty.call(message, "expected")) + object.expected = $root.atomic.ExpectedState.toObject(message.expected, options, _depth + 1); + if (message.toView != null && $Object.hasOwnProperty.call(message, "toView")) + object.toView = message.toView; + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) + object.fromView = message.fromView; + 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.all != null && $Object.hasOwnProperty.call(message, "all")) + object.all = message.all; + if (message.insecure != null && $Object.hasOwnProperty.call(message, "insecure")) + object.insecure = message.insecure; + if (message.timeoutSecs != null && $Object.hasOwnProperty.call(message, "timeoutSecs")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.timeoutSecs = typeof message.timeoutSecs === "number" ? $BigInt(message.timeoutSecs) : $util.Long.fromBits(message.timeoutSecs.low >>> 0, message.timeoutSecs.high >>> 0, true).toBigInt(); + else if (typeof message.timeoutSecs === "number") + object.timeoutSecs = options.longs === $String ? $String(message.timeoutSecs) : message.timeoutSecs; + else + object.timeoutSecs = options.longs === $String ? $util.Long.prototype.toString.call(message.timeoutSecs) : options.longs === $Number ? new $util.LongBits(message.timeoutSecs.low >>> 0, message.timeoutSecs.high >>> 0).toNumber(true) : message.timeoutSecs; + var keys2; + if (message.authHeaders && (keys2 = $Object.keys(message.authHeaders)).length) { + object.authHeaders = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.authHeaders, keys2[j]); + object.authHeaders[keys2[j]] = message.authHeaders[keys2[j]]; + } + } + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) + object.remoteUrl = message.remoteUrl; + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) + object.identity = message.identity; return object; }; /** - * Converts this GetVaultEntryRequest to JSON. + * Converts this PushChangesRequest to JSON. * @function toJSON - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @instance * @returns {Object.} JSON object */ - GetVaultEntryRequest.prototype.toJSON = function() { - return GetVaultEntryRequest.toObject(this, $protobuf.util.toJSONOptions); + PushChangesRequest.prototype.toJSON = function() { + return PushChangesRequest.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for GetVaultEntryRequest + * Gets the type url for PushChangesRequest * @function getTypeUrl - * @memberof atomic.GetVaultEntryRequest + * @memberof atomic.PushChangesRequest * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - GetVaultEntryRequest.getTypeUrl = function(prefix) { + PushChangesRequest.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.GetVaultEntryRequest"; + return prefix + "/atomic.PushChangesRequest"; }; - 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; + return PushChangesRequest; })(); - atomic.GetVaultEntryResponse = (function() { + atomic.PushChangesResponse = (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 + * Properties of a PushChangesResponse. + * @typedef {Object} atomic.PushChangesResponse.$Properties + * @property {number|Long|null} [pushedChanges] PushChangesResponse pushedChanges + * @property {Array.|null} [manifests] PushChangesResponse manifests + * @property {atomic.ResponseMeta.$Properties|null} [meta] PushChangesResponse meta + * @property {atomic.PushReport.$Properties|null} [report] PushChangesResponse report + * @property {atomic.PushConflict.$Properties|null} [conflict] PushChangesResponse conflict * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ /** - * Properties of a GetVaultEntryResponse. + * Properties of a PushChangesResponse. * @memberof atomic - * @interface IGetVaultEntryResponse - * @augments atomic.GetVaultEntryResponse.$Properties - * @deprecated Use atomic.GetVaultEntryResponse.$Properties instead. + * @interface IPushChangesResponse + * @augments atomic.PushChangesResponse.$Properties + * @deprecated Use atomic.PushChangesResponse.$Properties instead. */ /** - * Shape of a GetVaultEntryResponse. - * @typedef {atomic.GetVaultEntryResponse.$Properties} atomic.GetVaultEntryResponse.$Shape + * Shape of a PushChangesResponse. + * @typedef {atomic.PushChangesResponse.$Properties} atomic.PushChangesResponse.$Shape */ /** - * Constructs a new GetVaultEntryResponse. + * Constructs a new PushChangesResponse. * @memberof atomic - * @classdesc Represents a GetVaultEntryResponse. + * @classdesc Represents a PushChangesResponse. * @constructor - * @param {atomic.GetVaultEntryResponse.$Properties=} [properties] Properties to set + * @param {atomic.PushChangesResponse.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var GetVaultEntryResponse = function (properties) { + var PushChangesResponse = function (properties) { + this.manifests = []; if (properties) for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null && keys[i] !== "__proto__") @@ -24594,76 +24944,103 @@ $root.atomic = (function() { }; /** - * GetVaultEntryResponse entry. - * @member {atomic.VaultEntry.$Properties|null|undefined} entry - * @memberof atomic.GetVaultEntryResponse + * PushChangesResponse pushedChanges. + * @member {number|Long} pushedChanges + * @memberof atomic.PushChangesResponse * @instance */ - GetVaultEntryResponse.prototype.entry = null; + PushChangesResponse.prototype.pushedChanges = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * GetVaultEntryResponse snapshot. - * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot - * @memberof atomic.GetVaultEntryResponse + * PushChangesResponse manifests. + * @member {Array.} manifests + * @memberof atomic.PushChangesResponse * @instance */ - GetVaultEntryResponse.prototype.snapshot = null; + PushChangesResponse.prototype.manifests = $util.emptyArray; /** - * GetVaultEntryResponse entryBundle. - * @member {atomic.VersionedBytes.$Properties|null|undefined} entryBundle - * @memberof atomic.GetVaultEntryResponse + * PushChangesResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.PushChangesResponse * @instance */ - GetVaultEntryResponse.prototype.entryBundle = null; + PushChangesResponse.prototype.meta = null; + + /** + * PushChangesResponse report. + * @member {atomic.PushReport.$Properties|null|undefined} report + * @memberof atomic.PushChangesResponse + * @instance + */ + PushChangesResponse.prototype.report = null; + + /** + * PushChangesResponse conflict. + * @member {atomic.PushConflict.$Properties|null|undefined} conflict + * @memberof atomic.PushChangesResponse + * @instance + */ + PushChangesResponse.prototype.conflict = 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"]), + $Object.defineProperty(PushChangesResponse.prototype, "_report", { + get: $util.oneOfGetter($oneOfFields = ["report"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PushChangesResponse.prototype, "_conflict", { + get: $util.oneOfGetter($oneOfFields = ["conflict"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new GetVaultEntryResponse instance using the specified properties. + * Creates a new PushChangesResponse instance using the specified properties. * @function create - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @static - * @param {atomic.GetVaultEntryResponse.$Properties=} [properties] Properties to set - * @returns {atomic.GetVaultEntryResponse} GetVaultEntryResponse instance + * @param {atomic.PushChangesResponse.$Properties=} [properties] Properties to set + * @returns {atomic.PushChangesResponse} PushChangesResponse instance * @type {{ - * (properties: atomic.GetVaultEntryResponse.$Shape): atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape; - * (properties?: atomic.GetVaultEntryResponse.$Properties): atomic.GetVaultEntryResponse; + * (properties: atomic.PushChangesResponse.$Shape): atomic.PushChangesResponse & atomic.PushChangesResponse.$Shape; + * (properties?: atomic.PushChangesResponse.$Properties): atomic.PushChangesResponse; * }} */ - GetVaultEntryResponse.create = function(properties) { - return new GetVaultEntryResponse(properties); + PushChangesResponse.create = function(properties) { + return new PushChangesResponse(properties); }; /** - * Encodes the specified GetVaultEntryResponse message. Does not implicitly {@link atomic.GetVaultEntryResponse.verify|verify} messages. + * Encodes the specified PushChangesResponse message. Does not implicitly {@link atomic.PushChangesResponse.verify|verify} messages. * @function encode - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @static - * @param {atomic.GetVaultEntryResponse.$Properties} message GetVaultEntryResponse message or plain object to encode + * @param {atomic.PushChangesResponse.$Properties} message PushChangesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVaultEntryResponse.encode = function (message, writer, _depth) { + PushChangesResponse.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.pushedChanges != null && $Object.hasOwnProperty.call(message, "pushedChanges") && (typeof message.pushedChanges === "object" ? message.pushedChanges.low || message.pushedChanges.high : message.pushedChanges !== 0)) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.pushedChanges); + if (message.manifests != null && message.manifests.length) + for (var i = 0; i < message.manifests.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.manifests[i]); + if (message.report != null && $Object.hasOwnProperty.call(message, "report")) + $root.atomic.PushReport.encode(message.report, writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.conflict != null && $Object.hasOwnProperty.call(message, "conflict")) + $root.atomic.PushConflict.encode(message.conflict, writer.uint32(/* id 4, wireType 2 =*/34).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]); @@ -24671,30 +25048,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified GetVaultEntryResponse message, length delimited. Does not implicitly {@link atomic.GetVaultEntryResponse.verify|verify} messages. + * Encodes the specified PushChangesResponse message, length delimited. Does not implicitly {@link atomic.PushChangesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @static - * @param {atomic.GetVaultEntryResponse.$Properties} message GetVaultEntryResponse message or plain object to encode + * @param {atomic.PushChangesResponse.$Properties} message PushChangesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVaultEntryResponse.encodeDelimited = function(message, writer) { + PushChangesResponse.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a GetVaultEntryResponse message from the specified reader or buffer. + * Decodes a PushChangesResponse message from the specified reader or buffer. * @function decode - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @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 + * @returns {atomic.PushChangesResponse & atomic.PushChangesResponse.$Shape} PushChangesResponse * @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) { + PushChangesResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -24711,7 +25088,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.GetVaultEntryResponse(); + message = _target || new $root.atomic.PushChangesResponse(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -24722,22 +25099,40 @@ $root.atomic = (function() { 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.pushedChanges = value; + else + delete message.pushedChanges; + continue; + } + case 2: { if (wireType !== 2) break; - message.entry = $root.atomic.VaultEntry.decode(reader, reader.size(), $undefined, _depth + 1, message.entry); + if (!(message.manifests && message.manifests.length)) + message.manifests = []; + message.manifests.push(reader.stringVerify()); continue; } - case 20: { + case 100: { if (wireType !== 2) break; - message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + message.meta = $root.atomic.ResponseMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); continue; } - case 21: { + case 3: { if (wireType !== 2) break; - message.entryBundle = $root.atomic.VersionedBytes.decode(reader, reader.size(), $undefined, _depth + 1, message.entryBundle); - message._entry_bundle = "entryBundle"; + message.report = $root.atomic.PushReport.decode(reader, reader.size(), $undefined, _depth + 1, message.report); + message._report = "report"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.conflict = $root.atomic.PushConflict.decode(reader, reader.size(), $undefined, _depth + 1, message.conflict); + message._conflict = "conflict"; continue; } } @@ -24758,30 +25153,30 @@ $root.atomic = (function() { }; /** - * Decodes a GetVaultEntryResponse message from the specified reader or buffer, length delimited. + * Decodes a PushChangesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape} GetVaultEntryResponse + * @returns {atomic.PushChangesResponse & atomic.PushChangesResponse.$Shape} PushChangesResponse * @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) { + PushChangesResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a GetVaultEntryResponse message. + * Verifies a PushChangesResponse message. * @function verify - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @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) { + PushChangesResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -24789,73 +25184,103 @@ $root.atomic = (function() { 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.pushedChanges != null && $Object.hasOwnProperty.call(message, "pushedChanges")) + if (!$util.isInteger(message.pushedChanges) && !(message.pushedChanges && $util.isInteger(message.pushedChanges.low) && $util.isInteger(message.pushedChanges.high))) + return "pushedChanges: integer|Long expected"; + if (message.manifests != null && $Object.hasOwnProperty.call(message, "manifests")) { + if (!$Array.isArray(message.manifests)) + return "manifests: array expected"; + for (var i = 0; i < message.manifests.length; ++i) + if (!$util.isString(message.manifests[i])) + return "manifests: string[] expected"; } - if (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { - var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) { + var error = $root.atomic.ResponseMeta.verify(message.meta, _depth + 1); if (error) - return "snapshot." + error; + return "meta." + error; } - if (message.entryBundle != null && $Object.hasOwnProperty.call(message, "entryBundle")) { - properties._entry_bundle = 1; + if (message.report != null && $Object.hasOwnProperty.call(message, "report")) { + properties._report = 1; { - var error = $root.atomic.VersionedBytes.verify(message.entryBundle, _depth + 1); + var error = $root.atomic.PushReport.verify(message.report, _depth + 1); if (error) - return "entryBundle." + error; + return "report." + error; + } + } + if (message.conflict != null && $Object.hasOwnProperty.call(message, "conflict")) { + properties._conflict = 1; + { + var error = $root.atomic.PushConflict.verify(message.conflict, _depth + 1); + if (error) + return "conflict." + error; } } return null; }; /** - * Creates a GetVaultEntryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a PushChangesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @static * @param {Object.} object Plain object - * @returns {atomic.GetVaultEntryResponse} GetVaultEntryResponse + * @returns {atomic.PushChangesResponse} PushChangesResponse */ - GetVaultEntryResponse.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.GetVaultEntryResponse) + PushChangesResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PushChangesResponse) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.GetVaultEntryResponse: object expected"); + throw $TypeError(".atomic.PushChangesResponse: 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); + var message = new $root.atomic.PushChangesResponse(); + if (object.pushedChanges != null) + if (typeof object.pushedChanges === "object" ? object.pushedChanges.low || object.pushedChanges.high : $Number(object.pushedChanges) !== 0) + if ($util.Long) + message.pushedChanges = $util.Long.fromValue(object.pushedChanges, true); + else if (typeof object.pushedChanges === "string") + message.pushedChanges = $parseInt(object.pushedChanges, 10); + else if (typeof object.pushedChanges === "number") + message.pushedChanges = object.pushedChanges; + else if (typeof object.pushedChanges === "object") + message.pushedChanges = new $util.LongBits(object.pushedChanges.low >>> 0, object.pushedChanges.high >>> 0).toNumber(true); + if (object.manifests) { + if (!$Array.isArray(object.manifests)) + throw $TypeError(".atomic.PushChangesResponse.manifests: array expected"); + message.manifests = $Array(object.manifests.length); + for (var i = 0; i < object.manifests.length; ++i) + message.manifests[i] = $String(object.manifests[i]); } - 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.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.PushChangesResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _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); + if (object.report != null) { + if (!$util.isObject(object.report)) + throw $TypeError(".atomic.PushChangesResponse.report: object expected"); + message.report = $root.atomic.PushReport.fromObject(object.report, _depth + 1); + } + if (object.conflict != null) { + if (!$util.isObject(object.conflict)) + throw $TypeError(".atomic.PushChangesResponse.conflict: object expected"); + message.conflict = $root.atomic.PushConflict.fromObject(object.conflict, _depth + 1); } return message; }; /** - * Creates a plain object from a GetVaultEntryResponse message. Also converts values to other types if specified. + * Creates a plain object from a PushChangesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @static - * @param {atomic.GetVaultEntryResponse} message GetVaultEntryResponse + * @param {atomic.PushChangesResponse} message PushChangesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVaultEntryResponse.toObject = function (message, options, _depth) { + PushChangesResponse.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -24863,104 +25288,107 @@ $root.atomic = (function() { if (_depth > $util.recursionLimit) throw $Error("max depth exceeded"); var object = {}; + if (options.arrays || options.defaults) + object.manifests = []; if (options.defaults) { - object.entry = null; - object.snapshot = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.pushedChanges = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.pushedChanges = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.meta = 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); + if (message.pushedChanges != null && $Object.hasOwnProperty.call(message, "pushedChanges")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.pushedChanges = typeof message.pushedChanges === "number" ? $BigInt(message.pushedChanges) : $util.Long.fromBits(message.pushedChanges.low >>> 0, message.pushedChanges.high >>> 0, true).toBigInt(); + else if (typeof message.pushedChanges === "number") + object.pushedChanges = options.longs === $String ? $String(message.pushedChanges) : message.pushedChanges; + else + object.pushedChanges = options.longs === $String ? $util.Long.prototype.toString.call(message.pushedChanges) : options.longs === $Number ? new $util.LongBits(message.pushedChanges.low >>> 0, message.pushedChanges.high >>> 0).toNumber(true) : message.pushedChanges; + if (message.manifests && message.manifests.length) { + object.manifests = $Array(message.manifests.length); + for (var j = 0; j < message.manifests.length; ++j) + object.manifests[j] = message.manifests[j]; + } + if (message.report != null && $Object.hasOwnProperty.call(message, "report")) + object.report = $root.atomic.PushReport.toObject(message.report, options, _depth + 1); + if (message.conflict != null && $Object.hasOwnProperty.call(message, "conflict")) + object.conflict = $root.atomic.PushConflict.toObject(message.conflict, 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 GetVaultEntryResponse to JSON. + * Converts this PushChangesResponse to JSON. * @function toJSON - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @instance * @returns {Object.} JSON object */ - GetVaultEntryResponse.prototype.toJSON = function() { - return GetVaultEntryResponse.toObject(this, $protobuf.util.toJSONOptions); + PushChangesResponse.prototype.toJSON = function() { + return PushChangesResponse.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for GetVaultEntryResponse + * Gets the type url for PushChangesResponse * @function getTypeUrl - * @memberof atomic.GetVaultEntryResponse + * @memberof atomic.PushChangesResponse * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - GetVaultEntryResponse.getTypeUrl = function(prefix) { + PushChangesResponse.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.GetVaultEntryResponse"; + return prefix + "/atomic.PushChangesResponse"; }; - return GetVaultEntryResponse; + return PushChangesResponse; })(); - atomic.VaultEntry = (function() { + atomic.PushReport = (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 + * Properties of a PushReport. + * @typedef {Object} atomic.PushReport.$Properties + * @property {string|null} [remoteName] PushReport remoteName + * @property {string|null} [remoteUrl] PushReport remoteUrl + * @property {Array.|null} [views] PushReport views + * @property {number|Long|null} [totalStored] PushReport totalStored + * @property {number|Long|null} [viewsDeclared] PushReport viewsDeclared + * @property {Array.|null} [attestations] PushReport attestations + * @property {Array.|null} [provenance] PushReport provenance + * @property {Array.|null} [tags] PushReport tags * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ /** - * Properties of a VaultEntry. + * Properties of a PushReport. * @memberof atomic - * @interface IVaultEntry - * @augments atomic.VaultEntry.$Properties - * @deprecated Use atomic.VaultEntry.$Properties instead. + * @interface IPushReport + * @augments atomic.PushReport.$Properties + * @deprecated Use atomic.PushReport.$Properties instead. */ /** - * Shape of a VaultEntry. - * @typedef {atomic.VaultEntry.$Properties} atomic.VaultEntry.$Shape + * Shape of a PushReport. + * @typedef {atomic.PushReport.$Properties} atomic.PushReport.$Shape */ /** - * Constructs a new VaultEntry. + * Constructs a new PushReport. * @memberof atomic - * @classdesc Represents a VaultEntry. + * @classdesc Represents a PushReport. * @constructor - * @param {atomic.VaultEntry.$Properties=} [properties] Properties to set + * @param {atomic.PushReport.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var VaultEntry = function (properties) { - this.linked = []; + var PushReport = function (properties) { + this.views = []; + this.attestations = []; + this.provenance = []; + this.tags = []; if (properties) for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null && keys[i] !== "__proto__") @@ -24968,433 +25396,738 @@ $root.atomic = (function() { }; /** - * VaultEntry kind. - * @member {atomic.VaultEntityKind} kind - * @memberof atomic.VaultEntry + * PushReport remoteName. + * @member {string} remoteName + * @memberof atomic.PushReport * @instance */ - VaultEntry.prototype.kind = 0; + PushReport.prototype.remoteName = ""; /** - * VaultEntry id. - * @member {string} id - * @memberof atomic.VaultEntry + * PushReport remoteUrl. + * @member {string} remoteUrl + * @memberof atomic.PushReport * @instance */ - VaultEntry.prototype.id = ""; + PushReport.prototype.remoteUrl = ""; /** - * VaultEntry title. - * @member {string} title - * @memberof atomic.VaultEntry + * PushReport views. + * @member {Array.} views + * @memberof atomic.PushReport * @instance */ - VaultEntry.prototype.title = ""; + PushReport.prototype.views = $util.emptyArray; /** - * VaultEntry status. - * @member {atomic.VaultEntityStatus|null|undefined} status - * @memberof atomic.VaultEntry + * PushReport totalStored. + * @member {number|Long} totalStored + * @memberof atomic.PushReport * @instance */ - VaultEntry.prototype.status = null; + PushReport.prototype.totalStored = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * VaultEntry body. - * @member {string|null|undefined} body - * @memberof atomic.VaultEntry + * PushReport viewsDeclared. + * @member {number|Long} viewsDeclared + * @memberof atomic.PushReport * @instance */ - VaultEntry.prototype.body = null; + PushReport.prototype.viewsDeclared = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * VaultEntry createdAt. - * @member {google.protobuf.Timestamp.$Properties|null|undefined} createdAt - * @memberof atomic.VaultEntry + * PushReport attestations. + * @member {Array.} attestations + * @memberof atomic.PushReport * @instance */ - VaultEntry.prototype.createdAt = null; + PushReport.prototype.attestations = $util.emptyArray; /** - * VaultEntry updatedAt. - * @member {google.protobuf.Timestamp.$Properties|null|undefined} updatedAt - * @memberof atomic.VaultEntry + * PushReport provenance. + * @member {Array.} provenance + * @memberof atomic.PushReport * @instance */ - VaultEntry.prototype.updatedAt = null; + PushReport.prototype.provenance = $util.emptyArray; /** - * VaultEntry linked. - * @member {Array.} linked - * @memberof atomic.VaultEntry + * PushReport tags. + * @member {Array.} tags + * @memberof atomic.PushReport * @instance */ - VaultEntry.prototype.linked = $util.emptyArray; + PushReport.prototype.tags = $util.emptyArray; /** - * VaultEntry vaultPath. - * @member {string|null|undefined} vaultPath - * @memberof atomic.VaultEntry - * @instance + * Creates a new PushReport instance using the specified properties. + * @function create + * @memberof atomic.PushReport + * @static + * @param {atomic.PushReport.$Properties=} [properties] Properties to set + * @returns {atomic.PushReport} PushReport instance + * @type {{ + * (properties: atomic.PushReport.$Shape): atomic.PushReport & atomic.PushReport.$Shape; + * (properties?: atomic.PushReport.$Properties): atomic.PushReport; + * }} */ - VaultEntry.prototype.vaultPath = null; + PushReport.create = function(properties) { + return new PushReport(properties); + }; /** - * VaultEntry priority. - * @member {string|null|undefined} priority - * @memberof atomic.VaultEntry - * @instance + * Encodes the specified PushReport message. Does not implicitly {@link atomic.PushReport.verify|verify} messages. + * @function encode + * @memberof atomic.PushReport + * @static + * @param {atomic.PushReport.$Properties} message PushReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - VaultEntry.prototype.priority = null; + PushReport.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.remoteName != null && $Object.hasOwnProperty.call(message, "remoteName") && message.remoteName !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.remoteName); + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl") && message.remoteUrl !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteUrl); + if (message.views != null && message.views.length) + for (var i = 0; i < message.views.length; ++i) + $root.atomic.PushViewReport.encode(message.views[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), _depth + 1).ldelim(); + if (message.totalStored != null && $Object.hasOwnProperty.call(message, "totalStored") && (typeof message.totalStored === "object" ? message.totalStored.low || message.totalStored.high : message.totalStored !== 0)) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.totalStored); + if (message.viewsDeclared != null && $Object.hasOwnProperty.call(message, "viewsDeclared") && (typeof message.viewsDeclared === "object" ? message.viewsDeclared.low || message.viewsDeclared.high : message.viewsDeclared !== 0)) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.viewsDeclared); + if (message.attestations != null && message.attestations.length) + for (var i = 0; i < message.attestations.length; ++i) + $root.atomic.PushSidecar.encode(message.attestations[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), _depth + 1).ldelim(); + if (message.provenance != null && message.provenance.length) + for (var i = 0; i < message.provenance.length; ++i) + $root.atomic.PushSidecar.encode(message.provenance[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.atomic.PushTag.encode(message.tags[i], 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; + }; /** - * VaultEntry manifestKind. - * @member {string|null|undefined} manifestKind - * @memberof atomic.VaultEntry - * @instance + * Encodes the specified PushReport message, length delimited. Does not implicitly {@link atomic.PushReport.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PushReport + * @static + * @param {atomic.PushReport.$Properties} message PushReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - VaultEntry.prototype.manifestKind = null; + PushReport.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; /** - * VaultEntry attested. - * @member {string|null|undefined} attested - * @memberof atomic.VaultEntry - * @instance + * Decodes a PushReport message from the specified reader or buffer. + * @function decode + * @memberof atomic.PushReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PushReport & atomic.PushReport.$Shape} PushReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VaultEntry.prototype.attested = null; + PushReport.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.PushReport(); + 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.remoteName = value; + else + delete message.remoteName; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.remoteUrl = value; + else + delete message.remoteUrl; + continue; + } + case 3: { + if (wireType !== 2) + break; + if (!(message.views && message.views.length)) + message.views = []; + message.views.push($root.atomic.PushViewReport.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 4: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.totalStored = value; + else + delete message.totalStored; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.viewsDeclared = value; + else + delete message.viewsDeclared; + continue; + } + case 6: { + if (wireType !== 2) + break; + if (!(message.attestations && message.attestations.length)) + message.attestations = []; + message.attestations.push($root.atomic.PushSidecar.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 7: { + if (wireType !== 2) + break; + if (!(message.provenance && message.provenance.length)) + message.provenance = []; + message.provenance.push($root.atomic.PushSidecar.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 8: { + if (wireType !== 2) + break; + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.atomic.PushTag.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; + }; /** - * VaultEntry verifies. - * @member {string|null|undefined} verifies - * @memberof atomic.VaultEntry - * @instance + * Decodes a PushReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PushReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PushReport & atomic.PushReport.$Shape} PushReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VaultEntry.prototype.verifies = null; + PushReport.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; /** - * VaultEntry memoryKind. - * @member {string|null|undefined} memoryKind - * @memberof atomic.VaultEntry - * @instance + * Verifies a PushReport message. + * @function verify + * @memberof atomic.PushReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VaultEntry.prototype.memoryKind = null; + PushReport.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.remoteName != null && $Object.hasOwnProperty.call(message, "remoteName")) + if (!$util.isString(message.remoteName)) + return "remoteName: string expected"; + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) + if (!$util.isString(message.remoteUrl)) + return "remoteUrl: string expected"; + 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.PushViewReport.verify(message.views[i], _depth + 1); + if (error) + return "views." + error; + } + } + if (message.totalStored != null && $Object.hasOwnProperty.call(message, "totalStored")) + if (!$util.isInteger(message.totalStored) && !(message.totalStored && $util.isInteger(message.totalStored.low) && $util.isInteger(message.totalStored.high))) + return "totalStored: integer|Long expected"; + if (message.viewsDeclared != null && $Object.hasOwnProperty.call(message, "viewsDeclared")) + if (!$util.isInteger(message.viewsDeclared) && !(message.viewsDeclared && $util.isInteger(message.viewsDeclared.low) && $util.isInteger(message.viewsDeclared.high))) + return "viewsDeclared: integer|Long expected"; + if (message.attestations != null && $Object.hasOwnProperty.call(message, "attestations")) { + if (!$Array.isArray(message.attestations)) + return "attestations: array expected"; + for (var i = 0; i < message.attestations.length; ++i) { + var error = $root.atomic.PushSidecar.verify(message.attestations[i], _depth + 1); + if (error) + return "attestations." + error; + } + } + if (message.provenance != null && $Object.hasOwnProperty.call(message, "provenance")) { + if (!$Array.isArray(message.provenance)) + return "provenance: array expected"; + for (var i = 0; i < message.provenance.length; ++i) { + var error = $root.atomic.PushSidecar.verify(message.provenance[i], _depth + 1); + if (error) + return "provenance." + error; + } + } + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) { + if (!$Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.atomic.PushTag.verify(message.tags[i], _depth + 1); + if (error) + return "tags." + error; + } + } + return null; + }; /** - * VaultEntry memoryStatus. - * @member {string|null|undefined} memoryStatus - * @memberof atomic.VaultEntry - * @instance + * Creates a PushReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PushReport + * @static + * @param {Object.} object Plain object + * @returns {atomic.PushReport} PushReport */ - VaultEntry.prototype.memoryStatus = null; + PushReport.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PushReport) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PushReport: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PushReport(); + if (object.remoteName != null) + if (typeof object.remoteName !== "string" || object.remoteName.length) + message.remoteName = $String(object.remoteName); + if (object.remoteUrl != null) + if (typeof object.remoteUrl !== "string" || object.remoteUrl.length) + message.remoteUrl = $String(object.remoteUrl); + if (object.views) { + if (!$Array.isArray(object.views)) + throw $TypeError(".atomic.PushReport.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.PushReport.views: object expected"); + message.views[i] = $root.atomic.PushViewReport.fromObject(object.views[i], _depth + 1); + } + } + if (object.totalStored != null) + if (typeof object.totalStored === "object" ? object.totalStored.low || object.totalStored.high : $Number(object.totalStored) !== 0) + if ($util.Long) + message.totalStored = $util.Long.fromValue(object.totalStored, true); + else if (typeof object.totalStored === "string") + message.totalStored = $parseInt(object.totalStored, 10); + else if (typeof object.totalStored === "number") + message.totalStored = object.totalStored; + else if (typeof object.totalStored === "object") + message.totalStored = new $util.LongBits(object.totalStored.low >>> 0, object.totalStored.high >>> 0).toNumber(true); + if (object.viewsDeclared != null) + if (typeof object.viewsDeclared === "object" ? object.viewsDeclared.low || object.viewsDeclared.high : $Number(object.viewsDeclared) !== 0) + if ($util.Long) + message.viewsDeclared = $util.Long.fromValue(object.viewsDeclared, true); + else if (typeof object.viewsDeclared === "string") + message.viewsDeclared = $parseInt(object.viewsDeclared, 10); + else if (typeof object.viewsDeclared === "number") + message.viewsDeclared = object.viewsDeclared; + else if (typeof object.viewsDeclared === "object") + message.viewsDeclared = new $util.LongBits(object.viewsDeclared.low >>> 0, object.viewsDeclared.high >>> 0).toNumber(true); + if (object.attestations) { + if (!$Array.isArray(object.attestations)) + throw $TypeError(".atomic.PushReport.attestations: array expected"); + message.attestations = $Array(object.attestations.length); + for (var i = 0; i < object.attestations.length; ++i) { + if (!$util.isObject(object.attestations[i])) + throw $TypeError(".atomic.PushReport.attestations: object expected"); + message.attestations[i] = $root.atomic.PushSidecar.fromObject(object.attestations[i], _depth + 1); + } + } + if (object.provenance) { + if (!$Array.isArray(object.provenance)) + throw $TypeError(".atomic.PushReport.provenance: array expected"); + message.provenance = $Array(object.provenance.length); + for (var i = 0; i < object.provenance.length; ++i) { + if (!$util.isObject(object.provenance[i])) + throw $TypeError(".atomic.PushReport.provenance: object expected"); + message.provenance[i] = $root.atomic.PushSidecar.fromObject(object.provenance[i], _depth + 1); + } + } + if (object.tags) { + if (!$Array.isArray(object.tags)) + throw $TypeError(".atomic.PushReport.tags: array expected"); + message.tags = $Array(object.tags.length); + for (var i = 0; i < object.tags.length; ++i) { + if (!$util.isObject(object.tags[i])) + throw $TypeError(".atomic.PushReport.tags: object expected"); + message.tags[i] = $root.atomic.PushTag.fromObject(object.tags[i], _depth + 1); + } + } + return message; + }; /** - * VaultEntry aboutCount. - * @member {number|null|undefined} aboutCount - * @memberof atomic.VaultEntry - * @instance + * Creates a plain object from a PushReport message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PushReport + * @static + * @param {atomic.PushReport} message PushReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - VaultEntry.prototype.aboutCount = null; + PushReport.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 = []; + object.attestations = []; + object.provenance = []; + object.tags = []; + } + if (options.defaults) { + object.remoteName = ""; + object.remoteUrl = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.totalStored = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.totalStored = 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.viewsDeclared = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.viewsDeclared = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + if (message.remoteName != null && $Object.hasOwnProperty.call(message, "remoteName")) + object.remoteName = message.remoteName; + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) + object.remoteUrl = message.remoteUrl; + 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.PushViewReport.toObject(message.views[j], options, _depth + 1); + } + if (message.totalStored != null && $Object.hasOwnProperty.call(message, "totalStored")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.totalStored = typeof message.totalStored === "number" ? $BigInt(message.totalStored) : $util.Long.fromBits(message.totalStored.low >>> 0, message.totalStored.high >>> 0, true).toBigInt(); + else if (typeof message.totalStored === "number") + object.totalStored = options.longs === $String ? $String(message.totalStored) : message.totalStored; + else + object.totalStored = options.longs === $String ? $util.Long.prototype.toString.call(message.totalStored) : options.longs === $Number ? new $util.LongBits(message.totalStored.low >>> 0, message.totalStored.high >>> 0).toNumber(true) : message.totalStored; + if (message.viewsDeclared != null && $Object.hasOwnProperty.call(message, "viewsDeclared")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.viewsDeclared = typeof message.viewsDeclared === "number" ? $BigInt(message.viewsDeclared) : $util.Long.fromBits(message.viewsDeclared.low >>> 0, message.viewsDeclared.high >>> 0, true).toBigInt(); + else if (typeof message.viewsDeclared === "number") + object.viewsDeclared = options.longs === $String ? $String(message.viewsDeclared) : message.viewsDeclared; + else + object.viewsDeclared = options.longs === $String ? $util.Long.prototype.toString.call(message.viewsDeclared) : options.longs === $Number ? new $util.LongBits(message.viewsDeclared.low >>> 0, message.viewsDeclared.high >>> 0).toNumber(true) : message.viewsDeclared; + if (message.attestations && message.attestations.length) { + object.attestations = $Array(message.attestations.length); + for (var j = 0; j < message.attestations.length; ++j) + object.attestations[j] = $root.atomic.PushSidecar.toObject(message.attestations[j], options, _depth + 1); + } + if (message.provenance && message.provenance.length) { + object.provenance = $Array(message.provenance.length); + for (var j = 0; j < message.provenance.length; ++j) + object.provenance[j] = $root.atomic.PushSidecar.toObject(message.provenance[j], options, _depth + 1); + } + if (message.tags && message.tags.length) { + object.tags = $Array(message.tags.length); + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.atomic.PushTag.toObject(message.tags[j], options, _depth + 1); + } + return object; + }; /** - * VaultEntry contentSize. - * @member {number|Long|null|undefined} contentSize - * @memberof atomic.VaultEntry + * Converts this PushReport to JSON. + * @function toJSON + * @memberof atomic.PushReport * @instance + * @returns {Object.} JSON object */ - VaultEntry.prototype.contentSize = null; + PushReport.prototype.toJSON = function() { + return PushReport.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * VaultEntry updatedAtLabel. - * @member {string|null|undefined} updatedAtLabel - * @memberof atomic.VaultEntry - * @instance + * Gets the type url for PushReport + * @function getTypeUrl + * @memberof atomic.PushReport + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PushReport.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PushReport"; + }; + + return PushReport; + })(); + + atomic.PushViewReport = (function() { + + /** + * Properties of a PushViewReport. + * @typedef {Object} atomic.PushViewReport.$Properties + * @property {string|null} [remoteName] PushViewReport remoteName + * @property {string|null} [scope] PushViewReport scope + * @property {string|null} [parent] PushViewReport parent + * @property {boolean|null} [existsOnRemote] PushViewReport existsOnRemote + * @property {number|Long|null} [remoteChangeCount] PushViewReport remoteChangeCount + * @property {boolean|null} [noop] PushViewReport noop + * @property {boolean|null} [shrink] PushViewReport shrink + * @property {boolean|null} [forced] PushViewReport forced + * @property {Array.|null} [toStore] PushViewReport toStore + * @property {number|Long|null} [logCount] PushViewReport logCount + * @property {boolean|null} [declared] PushViewReport declared + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - VaultEntry.prototype.updatedAtLabel = null; /** - * VaultEntry entryType. - * @member {string|null|undefined} entryType - * @memberof atomic.VaultEntry - * @instance + * Properties of a PushViewReport. + * @memberof atomic + * @interface IPushViewReport + * @augments atomic.PushViewReport.$Properties + * @deprecated Use atomic.PushViewReport.$Properties instead. */ - VaultEntry.prototype.entryType = null; /** - * VaultEntry startedAt. - * @member {string|null|undefined} startedAt - * @memberof atomic.VaultEntry - * @instance + * Shape of a PushViewReport. + * @typedef {atomic.PushViewReport.$Properties} atomic.PushViewReport.$Shape */ - VaultEntry.prototype.startedAt = null; /** - * VaultEntry turns. - * @member {number|null|undefined} turns - * @memberof atomic.VaultEntry + * Constructs a new PushViewReport. + * @memberof atomic + * @classdesc Represents a PushViewReport. + * @constructor + * @param {atomic.PushViewReport.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PushViewReport = function (properties) { + this.toStore = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * PushViewReport remoteName. + * @member {string} remoteName + * @memberof atomic.PushViewReport * @instance */ - VaultEntry.prototype.turns = null; + PushViewReport.prototype.remoteName = ""; /** - * VaultEntry assignee. - * @member {string|null|undefined} assignee - * @memberof atomic.VaultEntry + * PushViewReport scope. + * @member {string} scope + * @memberof atomic.PushViewReport * @instance */ - VaultEntry.prototype.assignee = null; + PushViewReport.prototype.scope = ""; /** - * VaultEntry statusLabel. - * @member {string|null|undefined} statusLabel - * @memberof atomic.VaultEntry + * PushViewReport parent. + * @member {string|null|undefined} parent + * @memberof atomic.PushViewReport * @instance */ - VaultEntry.prototype.statusLabel = null; + PushViewReport.prototype.parent = null; /** - * VaultEntry developer. - * @member {string|null|undefined} developer - * @memberof atomic.VaultEntry + * PushViewReport existsOnRemote. + * @member {boolean} existsOnRemote + * @memberof atomic.PushViewReport * @instance */ - VaultEntry.prototype.developer = null; + PushViewReport.prototype.existsOnRemote = false; /** - * VaultEntry goalDir. - * @member {string|null|undefined} goalDir - * @memberof atomic.VaultEntry + * PushViewReport remoteChangeCount. + * @member {number|Long} remoteChangeCount + * @memberof atomic.PushViewReport * @instance */ - VaultEntry.prototype.goalDir = null; + PushViewReport.prototype.remoteChangeCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * VaultEntry goalFile. - * @member {string|null|undefined} goalFile - * @memberof atomic.VaultEntry + * PushViewReport noop. + * @member {boolean} noop + * @memberof atomic.PushViewReport * @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) - }); + PushViewReport.prototype.noop = false; - // 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) - }); + /** + * PushViewReport shrink. + * @member {boolean} shrink + * @memberof atomic.PushViewReport + * @instance + */ + PushViewReport.prototype.shrink = false; - // Virtual OneOf for proto3 optional field - $Object.defineProperty(VaultEntry.prototype, "_turns", { - get: $util.oneOfGetter($oneOfFields = ["turns"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * PushViewReport forced. + * @member {boolean} forced + * @memberof atomic.PushViewReport + * @instance + */ + PushViewReport.prototype.forced = false; - // Virtual OneOf for proto3 optional field - $Object.defineProperty(VaultEntry.prototype, "_assignee", { - get: $util.oneOfGetter($oneOfFields = ["assignee"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * PushViewReport toStore. + * @member {Array.} toStore + * @memberof atomic.PushViewReport + * @instance + */ + PushViewReport.prototype.toStore = $util.emptyArray; - // Virtual OneOf for proto3 optional field - $Object.defineProperty(VaultEntry.prototype, "_status_label", { - get: $util.oneOfGetter($oneOfFields = ["statusLabel"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * PushViewReport logCount. + * @member {number|Long} logCount + * @memberof atomic.PushViewReport + * @instance + */ + PushViewReport.prototype.logCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - // Virtual OneOf for proto3 optional field - $Object.defineProperty(VaultEntry.prototype, "_developer", { - get: $util.oneOfGetter($oneOfFields = ["developer"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * PushViewReport declared. + * @member {boolean} declared + * @memberof atomic.PushViewReport + * @instance + */ + PushViewReport.prototype.declared = false; - // Virtual OneOf for proto3 optional field - $Object.defineProperty(VaultEntry.prototype, "_goal_dir", { - get: $util.oneOfGetter($oneOfFields = ["goalDir"]), - set: $util.oneOfSetter($oneOfFields) - }); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; // Virtual OneOf for proto3 optional field - $Object.defineProperty(VaultEntry.prototype, "_goal_file", { - get: $util.oneOfGetter($oneOfFields = ["goalFile"]), + $Object.defineProperty(PushViewReport.prototype, "_parent", { + get: $util.oneOfGetter($oneOfFields = ["parent"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new VaultEntry instance using the specified properties. + * Creates a new PushViewReport instance using the specified properties. * @function create - * @memberof atomic.VaultEntry + * @memberof atomic.PushViewReport * @static - * @param {atomic.VaultEntry.$Properties=} [properties] Properties to set - * @returns {atomic.VaultEntry} VaultEntry instance + * @param {atomic.PushViewReport.$Properties=} [properties] Properties to set + * @returns {atomic.PushViewReport} PushViewReport instance * @type {{ - * (properties: atomic.VaultEntry.$Shape): atomic.VaultEntry & atomic.VaultEntry.$Shape; - * (properties?: atomic.VaultEntry.$Properties): atomic.VaultEntry; + * (properties: atomic.PushViewReport.$Shape): atomic.PushViewReport & atomic.PushViewReport.$Shape; + * (properties?: atomic.PushViewReport.$Properties): atomic.PushViewReport; * }} */ - VaultEntry.create = function(properties) { - return new VaultEntry(properties); + PushViewReport.create = function(properties) { + return new PushViewReport(properties); }; /** - * Encodes the specified VaultEntry message. Does not implicitly {@link atomic.VaultEntry.verify|verify} messages. + * Encodes the specified PushViewReport message. Does not implicitly {@link atomic.PushViewReport.verify|verify} messages. * @function encode - * @memberof atomic.VaultEntry + * @memberof atomic.PushViewReport * @static - * @param {atomic.VaultEntry.$Properties} message VaultEntry message or plain object to encode + * @param {atomic.PushViewReport.$Properties} message PushViewReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VaultEntry.encode = function (message, writer, _depth) { + PushViewReport.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.remoteName != null && $Object.hasOwnProperty.call(message, "remoteName") && message.remoteName !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.remoteName); + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope") && message.scope !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scope); + if (message.parent != null && $Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); + if (message.existsOnRemote != null && $Object.hasOwnProperty.call(message, "existsOnRemote") && message.existsOnRemote !== false) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.existsOnRemote); + if (message.remoteChangeCount != null && $Object.hasOwnProperty.call(message, "remoteChangeCount") && (typeof message.remoteChangeCount === "object" ? message.remoteChangeCount.low || message.remoteChangeCount.high : message.remoteChangeCount !== 0)) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.remoteChangeCount); + if (message.noop != null && $Object.hasOwnProperty.call(message, "noop") && message.noop !== false) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.noop); + if (message.shrink != null && $Object.hasOwnProperty.call(message, "shrink") && message.shrink !== false) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.shrink); + if (message.forced != null && $Object.hasOwnProperty.call(message, "forced") && message.forced !== false) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.forced); + if (message.toStore != null && message.toStore.length) + for (var i = 0; i < message.toStore.length; ++i) + $root.atomic.PushChange.encode(message.toStore[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), _depth + 1).ldelim(); + if (message.logCount != null && $Object.hasOwnProperty.call(message, "logCount") && (typeof message.logCount === "object" ? message.logCount.low || message.logCount.high : message.logCount !== 0)) + writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.logCount); + if (message.declared != null && $Object.hasOwnProperty.call(message, "declared") && message.declared !== false) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.declared); if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) for (var i = 0; i < message.$unknowns.length; ++i) writer.raw(message.$unknowns[i]); @@ -25402,30 +26135,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified VaultEntry message, length delimited. Does not implicitly {@link atomic.VaultEntry.verify|verify} messages. + * Encodes the specified PushViewReport message, length delimited. Does not implicitly {@link atomic.PushViewReport.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.VaultEntry + * @memberof atomic.PushViewReport * @static - * @param {atomic.VaultEntry.$Properties} message VaultEntry message or plain object to encode + * @param {atomic.PushViewReport.$Properties} message PushViewReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VaultEntry.encodeDelimited = function(message, writer) { + PushViewReport.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a VaultEntry message from the specified reader or buffer. + * Decodes a PushViewReport message from the specified reader or buffer. * @function decode - * @memberof atomic.VaultEntry + * @memberof atomic.PushViewReport * @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 + * @returns {atomic.PushViewReport & atomic.PushViewReport.$Shape} PushViewReport * @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) { + PushViewReport.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -25442,7 +26175,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.VaultEntry(); + message = _target || new $root.atomic.PushViewReport(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -25453,192 +26186,99 @@ $root.atomic = (function() { var wireType = tag & 7; switch (tag >>>= 3) { case 1: { - if (wireType !== 0) + if (wireType !== 2) break; - if (value = reader.int32()) - message.kind = value; + if ((value = reader.stringVerify()).length) + message.remoteName = value; else - delete message.kind; + delete message.remoteName; continue; } case 2: { if (wireType !== 2) break; if ((value = reader.stringVerify()).length) - message.id = value; + message.scope = value; else - delete message.id; + delete message.scope; continue; } case 3: { if (wireType !== 2) break; - if ((value = reader.stringVerify()).length) - message.title = value; - else - delete message.title; + message.parent = reader.stringVerify(); + message._parent = "parent"; continue; } case 4: { if (wireType !== 0) break; - message.status = reader.int32(); - message._status = "status"; + if (value = reader.bool()) + message.existsOnRemote = value; + else + delete message.existsOnRemote; continue; } case 5: { - if (wireType !== 2) + if (wireType !== 0) break; - message.body = reader.stringVerify(); - message._body = "body"; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.remoteChangeCount = value; + else + delete message.remoteChangeCount; continue; } case 6: { - if (wireType !== 2) + if (wireType !== 0) break; - message.createdAt = $root.google.protobuf.Timestamp.decode(reader, reader.size(), $undefined, _depth + 1, message.createdAt); - message._created_at = "createdAt"; + if (value = reader.bool()) + message.noop = value; + else + delete message.noop; continue; } case 7: { - if (wireType !== 2) + if (wireType !== 0) break; - message.updatedAt = $root.google.protobuf.Timestamp.decode(reader, reader.size(), $undefined, _depth + 1, message.updatedAt); - message._updated_at = "updatedAt"; + if (value = reader.bool()) + message.shrink = value; + else + delete message.shrink; continue; } case 8: { - if (wireType !== 2) + if (wireType !== 0) break; - if (!(message.linked && message.linked.length)) - message.linked = []; - message.linked.push(reader.stringVerify()); + if (value = reader.bool()) + message.forced = value; + else + delete message.forced; continue; } case 9: { if (wireType !== 2) break; - message.vaultPath = reader.stringVerify(); - message._vault_path = "vaultPath"; + if (!(message.toStore && message.toStore.length)) + message.toStore = []; + message.toStore.push($root.atomic.PushChange.decode(reader, reader.size(), $undefined, _depth + 1)); 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"; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.logCount = value; + else + delete message.logCount; continue; } - case 21: { + case 11: { 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"; + if (value = reader.bool()) + message.declared = value; + else + delete message.declared; continue; } } @@ -25659,30 +26299,30 @@ $root.atomic = (function() { }; /** - * Decodes a VaultEntry message from the specified reader or buffer, length delimited. + * Decodes a PushViewReport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.VaultEntry + * @memberof atomic.PushViewReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.VaultEntry & atomic.VaultEntry.$Shape} VaultEntry + * @returns {atomic.PushViewReport & atomic.PushViewReport.$Shape} PushViewReport * @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) { + PushViewReport.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a VaultEntry message. + * Verifies a PushViewReport message. * @function verify - * @memberof atomic.VaultEntry + * @memberof atomic.PushViewReport * @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) { + PushViewReport.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -25690,311 +26330,13504 @@ $root.atomic = (function() { 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.remoteName != null && $Object.hasOwnProperty.call(message, "remoteName")) + if (!$util.isString(message.remoteName)) + return "remoteName: string expected"; + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope")) + if (!$util.isString(message.scope)) + return "scope: string expected"; + if (message.parent != null && $Object.hasOwnProperty.call(message, "parent")) { + properties._parent = 1; + if (!$util.isString(message.parent)) + return "parent: string expected"; } - 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 (message.existsOnRemote != null && $Object.hasOwnProperty.call(message, "existsOnRemote")) + if (typeof message.existsOnRemote !== "boolean") + return "existsOnRemote: boolean expected"; + if (message.remoteChangeCount != null && $Object.hasOwnProperty.call(message, "remoteChangeCount")) + if (!$util.isInteger(message.remoteChangeCount) && !(message.remoteChangeCount && $util.isInteger(message.remoteChangeCount.low) && $util.isInteger(message.remoteChangeCount.high))) + return "remoteChangeCount: integer|Long expected"; + if (message.noop != null && $Object.hasOwnProperty.call(message, "noop")) + if (typeof message.noop !== "boolean") + return "noop: boolean expected"; + if (message.shrink != null && $Object.hasOwnProperty.call(message, "shrink")) + if (typeof message.shrink !== "boolean") + return "shrink: boolean expected"; + if (message.forced != null && $Object.hasOwnProperty.call(message, "forced")) + if (typeof message.forced !== "boolean") + return "forced: boolean expected"; + if (message.toStore != null && $Object.hasOwnProperty.call(message, "toStore")) { + if (!$Array.isArray(message.toStore)) + return "toStore: array expected"; + for (var i = 0; i < message.toStore.length; ++i) { + var error = $root.atomic.PushChange.verify(message.toStore[i], _depth + 1); if (error) - return "updatedAt." + error; + return "toStore." + 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.logCount != null && $Object.hasOwnProperty.call(message, "logCount")) + if (!$util.isInteger(message.logCount) && !(message.logCount && $util.isInteger(message.logCount.low) && $util.isInteger(message.logCount.high))) + return "logCount: integer|Long expected"; + if (message.declared != null && $Object.hasOwnProperty.call(message, "declared")) + if (typeof message.declared !== "boolean") + return "declared: boolean expected"; + return null; + }; + + /** + * Creates a PushViewReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PushViewReport + * @static + * @param {Object.} object Plain object + * @returns {atomic.PushViewReport} PushViewReport + */ + PushViewReport.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PushViewReport) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PushViewReport: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PushViewReport(); + if (object.remoteName != null) + if (typeof object.remoteName !== "string" || object.remoteName.length) + message.remoteName = $String(object.remoteName); + if (object.scope != null) + if (typeof object.scope !== "string" || object.scope.length) + message.scope = $String(object.scope); + if (object.parent != null) + message.parent = $String(object.parent); + if (object.existsOnRemote != null) + if (object.existsOnRemote) + message.existsOnRemote = $Boolean(object.existsOnRemote); + if (object.remoteChangeCount != null) + if (typeof object.remoteChangeCount === "object" ? object.remoteChangeCount.low || object.remoteChangeCount.high : $Number(object.remoteChangeCount) !== 0) + if ($util.Long) + message.remoteChangeCount = $util.Long.fromValue(object.remoteChangeCount, true); + else if (typeof object.remoteChangeCount === "string") + message.remoteChangeCount = $parseInt(object.remoteChangeCount, 10); + else if (typeof object.remoteChangeCount === "number") + message.remoteChangeCount = object.remoteChangeCount; + else if (typeof object.remoteChangeCount === "object") + message.remoteChangeCount = new $util.LongBits(object.remoteChangeCount.low >>> 0, object.remoteChangeCount.high >>> 0).toNumber(true); + if (object.noop != null) + if (object.noop) + message.noop = $Boolean(object.noop); + if (object.shrink != null) + if (object.shrink) + message.shrink = $Boolean(object.shrink); + if (object.forced != null) + if (object.forced) + message.forced = $Boolean(object.forced); + if (object.toStore) { + if (!$Array.isArray(object.toStore)) + throw $TypeError(".atomic.PushViewReport.toStore: array expected"); + message.toStore = $Array(object.toStore.length); + for (var i = 0; i < object.toStore.length; ++i) { + if (!$util.isObject(object.toStore[i])) + throw $TypeError(".atomic.PushViewReport.toStore: object expected"); + message.toStore[i] = $root.atomic.PushChange.fromObject(object.toStore[i], _depth + 1); + } + } + if (object.logCount != null) + if (typeof object.logCount === "object" ? object.logCount.low || object.logCount.high : $Number(object.logCount) !== 0) + if ($util.Long) + message.logCount = $util.Long.fromValue(object.logCount, true); + else if (typeof object.logCount === "string") + message.logCount = $parseInt(object.logCount, 10); + else if (typeof object.logCount === "number") + message.logCount = object.logCount; + else if (typeof object.logCount === "object") + message.logCount = new $util.LongBits(object.logCount.low >>> 0, object.logCount.high >>> 0).toNumber(true); + if (object.declared != null) + if (object.declared) + message.declared = $Boolean(object.declared); + return message; + }; + + /** + * Creates a plain object from a PushViewReport message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PushViewReport + * @static + * @param {atomic.PushViewReport} message PushViewReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushViewReport.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.toStore = []; + if (options.defaults) { + object.remoteName = ""; + object.scope = ""; + object.existsOnRemote = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.remoteChangeCount = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.remoteChangeCount = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.noop = false; + object.shrink = false; + object.forced = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.logCount = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.logCount = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.declared = false; + } + if (message.remoteName != null && $Object.hasOwnProperty.call(message, "remoteName")) + object.remoteName = message.remoteName; + if (message.scope != null && $Object.hasOwnProperty.call(message, "scope")) + object.scope = message.scope; + if (message.parent != null && $Object.hasOwnProperty.call(message, "parent")) + object.parent = message.parent; + if (message.existsOnRemote != null && $Object.hasOwnProperty.call(message, "existsOnRemote")) + object.existsOnRemote = message.existsOnRemote; + if (message.remoteChangeCount != null && $Object.hasOwnProperty.call(message, "remoteChangeCount")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.remoteChangeCount = typeof message.remoteChangeCount === "number" ? $BigInt(message.remoteChangeCount) : $util.Long.fromBits(message.remoteChangeCount.low >>> 0, message.remoteChangeCount.high >>> 0, true).toBigInt(); + else if (typeof message.remoteChangeCount === "number") + object.remoteChangeCount = options.longs === $String ? $String(message.remoteChangeCount) : message.remoteChangeCount; + else + object.remoteChangeCount = options.longs === $String ? $util.Long.prototype.toString.call(message.remoteChangeCount) : options.longs === $Number ? new $util.LongBits(message.remoteChangeCount.low >>> 0, message.remoteChangeCount.high >>> 0).toNumber(true) : message.remoteChangeCount; + if (message.noop != null && $Object.hasOwnProperty.call(message, "noop")) + object.noop = message.noop; + if (message.shrink != null && $Object.hasOwnProperty.call(message, "shrink")) + object.shrink = message.shrink; + if (message.forced != null && $Object.hasOwnProperty.call(message, "forced")) + object.forced = message.forced; + if (message.toStore && message.toStore.length) { + object.toStore = $Array(message.toStore.length); + for (var j = 0; j < message.toStore.length; ++j) + object.toStore[j] = $root.atomic.PushChange.toObject(message.toStore[j], options, _depth + 1); + } + if (message.logCount != null && $Object.hasOwnProperty.call(message, "logCount")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.logCount = typeof message.logCount === "number" ? $BigInt(message.logCount) : $util.Long.fromBits(message.logCount.low >>> 0, message.logCount.high >>> 0, true).toBigInt(); + else if (typeof message.logCount === "number") + object.logCount = options.longs === $String ? $String(message.logCount) : message.logCount; + else + object.logCount = options.longs === $String ? $util.Long.prototype.toString.call(message.logCount) : options.longs === $Number ? new $util.LongBits(message.logCount.low >>> 0, message.logCount.high >>> 0).toNumber(true) : message.logCount; + if (message.declared != null && $Object.hasOwnProperty.call(message, "declared")) + object.declared = message.declared; + return object; + }; + + /** + * Converts this PushViewReport to JSON. + * @function toJSON + * @memberof atomic.PushViewReport + * @instance + * @returns {Object.} JSON object + */ + PushViewReport.prototype.toJSON = function() { + return PushViewReport.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PushViewReport + * @function getTypeUrl + * @memberof atomic.PushViewReport + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PushViewReport.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PushViewReport"; + }; + + return PushViewReport; + })(); + + atomic.PushChange = (function() { + + /** + * Properties of a PushChange. + * @typedef {Object} atomic.PushChange.$Properties + * @property {atomic.Hash.$Properties|null} [hash] PushChange hash + * @property {string|null} [message] PushChange message + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PushChange. + * @memberof atomic + * @interface IPushChange + * @augments atomic.PushChange.$Properties + * @deprecated Use atomic.PushChange.$Properties instead. + */ + + /** + * Shape of a PushChange. + * @typedef {atomic.PushChange.$Properties} atomic.PushChange.$Shape + */ + + /** + * Constructs a new PushChange. + * @memberof atomic + * @classdesc Represents a PushChange. + * @constructor + * @param {atomic.PushChange.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PushChange = 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]]; + }; + + /** + * PushChange hash. + * @member {atomic.Hash.$Properties|null|undefined} hash + * @memberof atomic.PushChange + * @instance + */ + PushChange.prototype.hash = null; + + /** + * PushChange message. + * @member {string|null|undefined} message + * @memberof atomic.PushChange + * @instance + */ + PushChange.prototype.message = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PushChange.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PushChange instance using the specified properties. + * @function create + * @memberof atomic.PushChange + * @static + * @param {atomic.PushChange.$Properties=} [properties] Properties to set + * @returns {atomic.PushChange} PushChange instance + * @type {{ + * (properties: atomic.PushChange.$Shape): atomic.PushChange & atomic.PushChange.$Shape; + * (properties?: atomic.PushChange.$Properties): atomic.PushChange; + * }} + */ + PushChange.create = function(properties) { + return new PushChange(properties); + }; + + /** + * Encodes the specified PushChange message. Does not implicitly {@link atomic.PushChange.verify|verify} messages. + * @function encode + * @memberof atomic.PushChange + * @static + * @param {atomic.PushChange.$Properties} message PushChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushChange.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.$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 PushChange message, length delimited. Does not implicitly {@link atomic.PushChange.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PushChange + * @static + * @param {atomic.PushChange.$Properties} message PushChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushChange.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PushChange message from the specified reader or buffer. + * @function decode + * @memberof atomic.PushChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PushChange & atomic.PushChange.$Shape} PushChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushChange.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.PushChange(); + 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; + } + } + 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 PushChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PushChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PushChange & atomic.PushChange.$Shape} PushChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushChange.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PushChange message. + * @function verify + * @memberof atomic.PushChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushChange.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"; + } + return null; + }; + + /** + * Creates a PushChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PushChange + * @static + * @param {Object.} object Plain object + * @returns {atomic.PushChange} PushChange + */ + PushChange.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PushChange) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PushChange: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PushChange(); + if (object.hash != null) { + if (!$util.isObject(object.hash)) + throw $TypeError(".atomic.PushChange.hash: object expected"); + message.hash = $root.atomic.Hash.fromObject(object.hash, _depth + 1); + } + if (object.message != null) + message.message = $String(object.message); + return message; + }; + + /** + * Creates a plain object from a PushChange message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PushChange + * @static + * @param {atomic.PushChange} message PushChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushChange.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.hash = null; + 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; + return object; + }; + + /** + * Converts this PushChange to JSON. + * @function toJSON + * @memberof atomic.PushChange + * @instance + * @returns {Object.} JSON object + */ + PushChange.prototype.toJSON = function() { + return PushChange.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PushChange + * @function getTypeUrl + * @memberof atomic.PushChange + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PushChange.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PushChange"; + }; + + return PushChange; + })(); + + atomic.PushSidecar = (function() { + + /** + * Properties of a PushSidecar. + * @typedef {Object} atomic.PushSidecar.$Properties + * @property {atomic.Hash.$Properties|null} [hash] PushSidecar hash + * @property {string|null} [cost] PushSidecar cost + * @property {number|Long|null} [covered] PushSidecar covered + * @property {number|Long|null} [nodes] PushSidecar nodes + * @property {number|Long|null} [explained] PushSidecar explained + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PushSidecar. + * @memberof atomic + * @interface IPushSidecar + * @augments atomic.PushSidecar.$Properties + * @deprecated Use atomic.PushSidecar.$Properties instead. + */ + + /** + * Shape of a PushSidecar. + * @typedef {atomic.PushSidecar.$Properties} atomic.PushSidecar.$Shape + */ + + /** + * Constructs a new PushSidecar. + * @memberof atomic + * @classdesc Represents a PushSidecar. + * @constructor + * @param {atomic.PushSidecar.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PushSidecar = 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]]; + }; + + /** + * PushSidecar hash. + * @member {atomic.Hash.$Properties|null|undefined} hash + * @memberof atomic.PushSidecar + * @instance + */ + PushSidecar.prototype.hash = null; + + /** + * PushSidecar cost. + * @member {string|null|undefined} cost + * @memberof atomic.PushSidecar + * @instance + */ + PushSidecar.prototype.cost = null; + + /** + * PushSidecar covered. + * @member {number|Long} covered + * @memberof atomic.PushSidecar + * @instance + */ + PushSidecar.prototype.covered = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PushSidecar nodes. + * @member {number|Long} nodes + * @memberof atomic.PushSidecar + * @instance + */ + PushSidecar.prototype.nodes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PushSidecar explained. + * @member {number|Long} explained + * @memberof atomic.PushSidecar + * @instance + */ + PushSidecar.prototype.explained = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PushSidecar.prototype, "_cost", { + get: $util.oneOfGetter($oneOfFields = ["cost"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PushSidecar instance using the specified properties. + * @function create + * @memberof atomic.PushSidecar + * @static + * @param {atomic.PushSidecar.$Properties=} [properties] Properties to set + * @returns {atomic.PushSidecar} PushSidecar instance + * @type {{ + * (properties: atomic.PushSidecar.$Shape): atomic.PushSidecar & atomic.PushSidecar.$Shape; + * (properties?: atomic.PushSidecar.$Properties): atomic.PushSidecar; + * }} + */ + PushSidecar.create = function(properties) { + return new PushSidecar(properties); + }; + + /** + * Encodes the specified PushSidecar message. Does not implicitly {@link atomic.PushSidecar.verify|verify} messages. + * @function encode + * @memberof atomic.PushSidecar + * @static + * @param {atomic.PushSidecar.$Properties} message PushSidecar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushSidecar.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.cost != null && $Object.hasOwnProperty.call(message, "cost")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cost); + if (message.covered != null && $Object.hasOwnProperty.call(message, "covered") && (typeof message.covered === "object" ? message.covered.low || message.covered.high : message.covered !== 0)) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.covered); + if (message.nodes != null && $Object.hasOwnProperty.call(message, "nodes") && (typeof message.nodes === "object" ? message.nodes.low || message.nodes.high : message.nodes !== 0)) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.nodes); + if (message.explained != null && $Object.hasOwnProperty.call(message, "explained") && (typeof message.explained === "object" ? message.explained.low || message.explained.high : message.explained !== 0)) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.explained); + 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 PushSidecar message, length delimited. Does not implicitly {@link atomic.PushSidecar.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PushSidecar + * @static + * @param {atomic.PushSidecar.$Properties} message PushSidecar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushSidecar.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PushSidecar message from the specified reader or buffer. + * @function decode + * @memberof atomic.PushSidecar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PushSidecar & atomic.PushSidecar.$Shape} PushSidecar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushSidecar.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.PushSidecar(); + 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.cost = reader.stringVerify(); + message._cost = "cost"; + continue; + } + case 3: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.covered = value; + else + delete message.covered; + continue; + } + case 4: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.nodes = value; + else + delete message.nodes; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.explained = value; + else + delete message.explained; + 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 PushSidecar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PushSidecar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PushSidecar & atomic.PushSidecar.$Shape} PushSidecar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushSidecar.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PushSidecar message. + * @function verify + * @memberof atomic.PushSidecar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushSidecar.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.cost != null && $Object.hasOwnProperty.call(message, "cost")) { + properties._cost = 1; + if (!$util.isString(message.cost)) + return "cost: string expected"; + } + if (message.covered != null && $Object.hasOwnProperty.call(message, "covered")) + if (!$util.isInteger(message.covered) && !(message.covered && $util.isInteger(message.covered.low) && $util.isInteger(message.covered.high))) + return "covered: integer|Long expected"; + if (message.nodes != null && $Object.hasOwnProperty.call(message, "nodes")) + if (!$util.isInteger(message.nodes) && !(message.nodes && $util.isInteger(message.nodes.low) && $util.isInteger(message.nodes.high))) + return "nodes: integer|Long expected"; + if (message.explained != null && $Object.hasOwnProperty.call(message, "explained")) + if (!$util.isInteger(message.explained) && !(message.explained && $util.isInteger(message.explained.low) && $util.isInteger(message.explained.high))) + return "explained: integer|Long expected"; + return null; + }; + + /** + * Creates a PushSidecar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PushSidecar + * @static + * @param {Object.} object Plain object + * @returns {atomic.PushSidecar} PushSidecar + */ + PushSidecar.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PushSidecar) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PushSidecar: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PushSidecar(); + if (object.hash != null) { + if (!$util.isObject(object.hash)) + throw $TypeError(".atomic.PushSidecar.hash: object expected"); + message.hash = $root.atomic.Hash.fromObject(object.hash, _depth + 1); + } + if (object.cost != null) + message.cost = $String(object.cost); + if (object.covered != null) + if (typeof object.covered === "object" ? object.covered.low || object.covered.high : $Number(object.covered) !== 0) + if ($util.Long) + message.covered = $util.Long.fromValue(object.covered, true); + else if (typeof object.covered === "string") + message.covered = $parseInt(object.covered, 10); + else if (typeof object.covered === "number") + message.covered = object.covered; + else if (typeof object.covered === "object") + message.covered = new $util.LongBits(object.covered.low >>> 0, object.covered.high >>> 0).toNumber(true); + if (object.nodes != null) + if (typeof object.nodes === "object" ? object.nodes.low || object.nodes.high : $Number(object.nodes) !== 0) + if ($util.Long) + message.nodes = $util.Long.fromValue(object.nodes, true); + else if (typeof object.nodes === "string") + message.nodes = $parseInt(object.nodes, 10); + else if (typeof object.nodes === "number") + message.nodes = object.nodes; + else if (typeof object.nodes === "object") + message.nodes = new $util.LongBits(object.nodes.low >>> 0, object.nodes.high >>> 0).toNumber(true); + if (object.explained != null) + if (typeof object.explained === "object" ? object.explained.low || object.explained.high : $Number(object.explained) !== 0) + if ($util.Long) + message.explained = $util.Long.fromValue(object.explained, true); + else if (typeof object.explained === "string") + message.explained = $parseInt(object.explained, 10); + else if (typeof object.explained === "number") + message.explained = object.explained; + else if (typeof object.explained === "object") + message.explained = new $util.LongBits(object.explained.low >>> 0, object.explained.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a PushSidecar message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PushSidecar + * @static + * @param {atomic.PushSidecar} message PushSidecar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushSidecar.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.hash = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.covered = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.covered = 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.nodes = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.nodes = 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.explained = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.explained = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) + object.hash = $root.atomic.Hash.toObject(message.hash, options, _depth + 1); + if (message.cost != null && $Object.hasOwnProperty.call(message, "cost")) + object.cost = message.cost; + if (message.covered != null && $Object.hasOwnProperty.call(message, "covered")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.covered = typeof message.covered === "number" ? $BigInt(message.covered) : $util.Long.fromBits(message.covered.low >>> 0, message.covered.high >>> 0, true).toBigInt(); + else if (typeof message.covered === "number") + object.covered = options.longs === $String ? $String(message.covered) : message.covered; + else + object.covered = options.longs === $String ? $util.Long.prototype.toString.call(message.covered) : options.longs === $Number ? new $util.LongBits(message.covered.low >>> 0, message.covered.high >>> 0).toNumber(true) : message.covered; + if (message.nodes != null && $Object.hasOwnProperty.call(message, "nodes")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.nodes = typeof message.nodes === "number" ? $BigInt(message.nodes) : $util.Long.fromBits(message.nodes.low >>> 0, message.nodes.high >>> 0, true).toBigInt(); + else if (typeof message.nodes === "number") + object.nodes = options.longs === $String ? $String(message.nodes) : message.nodes; + else + object.nodes = options.longs === $String ? $util.Long.prototype.toString.call(message.nodes) : options.longs === $Number ? new $util.LongBits(message.nodes.low >>> 0, message.nodes.high >>> 0).toNumber(true) : message.nodes; + if (message.explained != null && $Object.hasOwnProperty.call(message, "explained")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.explained = typeof message.explained === "number" ? $BigInt(message.explained) : $util.Long.fromBits(message.explained.low >>> 0, message.explained.high >>> 0, true).toBigInt(); + else if (typeof message.explained === "number") + object.explained = options.longs === $String ? $String(message.explained) : message.explained; + else + object.explained = options.longs === $String ? $util.Long.prototype.toString.call(message.explained) : options.longs === $Number ? new $util.LongBits(message.explained.low >>> 0, message.explained.high >>> 0).toNumber(true) : message.explained; + return object; + }; + + /** + * Converts this PushSidecar to JSON. + * @function toJSON + * @memberof atomic.PushSidecar + * @instance + * @returns {Object.} JSON object + */ + PushSidecar.prototype.toJSON = function() { + return PushSidecar.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PushSidecar + * @function getTypeUrl + * @memberof atomic.PushSidecar + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PushSidecar.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PushSidecar"; + }; + + return PushSidecar; + })(); + + atomic.PushTag = (function() { + + /** + * Properties of a PushTag. + * @typedef {Object} atomic.PushTag.$Properties + * @property {atomic.Hash.$Properties|null} [hash] PushTag hash + * @property {string|null} [name] PushTag name + * @property {string|null} [kind] PushTag kind + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PushTag. + * @memberof atomic + * @interface IPushTag + * @augments atomic.PushTag.$Properties + * @deprecated Use atomic.PushTag.$Properties instead. + */ + + /** + * Shape of a PushTag. + * @typedef {atomic.PushTag.$Properties} atomic.PushTag.$Shape + */ + + /** + * Constructs a new PushTag. + * @memberof atomic + * @classdesc Represents a PushTag. + * @constructor + * @param {atomic.PushTag.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PushTag = 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]]; + }; + + /** + * PushTag hash. + * @member {atomic.Hash.$Properties|null|undefined} hash + * @memberof atomic.PushTag + * @instance + */ + PushTag.prototype.hash = null; + + /** + * PushTag name. + * @member {string} name + * @memberof atomic.PushTag + * @instance + */ + PushTag.prototype.name = ""; + + /** + * PushTag kind. + * @member {string} kind + * @memberof atomic.PushTag + * @instance + */ + PushTag.prototype.kind = ""; + + /** + * Creates a new PushTag instance using the specified properties. + * @function create + * @memberof atomic.PushTag + * @static + * @param {atomic.PushTag.$Properties=} [properties] Properties to set + * @returns {atomic.PushTag} PushTag instance + * @type {{ + * (properties: atomic.PushTag.$Shape): atomic.PushTag & atomic.PushTag.$Shape; + * (properties?: atomic.PushTag.$Properties): atomic.PushTag; + * }} + */ + PushTag.create = function(properties) { + return new PushTag(properties); + }; + + /** + * Encodes the specified PushTag message. Does not implicitly {@link atomic.PushTag.verify|verify} messages. + * @function encode + * @memberof atomic.PushTag + * @static + * @param {atomic.PushTag.$Properties} message PushTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushTag.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.name != null && $Object.hasOwnProperty.call(message, "name") && message.name !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind") && message.kind !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kind); + 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 PushTag message, length delimited. Does not implicitly {@link atomic.PushTag.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PushTag + * @static + * @param {atomic.PushTag.$Properties} message PushTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushTag.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PushTag message from the specified reader or buffer. + * @function decode + * @memberof atomic.PushTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PushTag & atomic.PushTag.$Shape} PushTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushTag.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.PushTag(); + 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; + if ((value = reader.stringVerify()).length) + message.name = value; + else + delete message.name; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.kind = value; + else + delete message.kind; + 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 PushTag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PushTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PushTag & atomic.PushTag.$Shape} PushTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushTag.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PushTag message. + * @function verify + * @memberof atomic.PushTag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushTag.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.hash != null && $Object.hasOwnProperty.call(message, "hash")) { + var error = $root.atomic.Hash.verify(message.hash, _depth + 1); + if (error) + return "hash." + error; + } + 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"; + return null; + }; + + /** + * Creates a PushTag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PushTag + * @static + * @param {Object.} object Plain object + * @returns {atomic.PushTag} PushTag + */ + PushTag.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PushTag) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PushTag: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PushTag(); + if (object.hash != null) { + if (!$util.isObject(object.hash)) + throw $TypeError(".atomic.PushTag.hash: object expected"); + message.hash = $root.atomic.Hash.fromObject(object.hash, _depth + 1); + } + 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); + return message; + }; + + /** + * Creates a plain object from a PushTag message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PushTag + * @static + * @param {atomic.PushTag} message PushTag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushTag.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.hash = null; + object.name = ""; + object.kind = ""; + } + if (message.hash != null && $Object.hasOwnProperty.call(message, "hash")) + object.hash = $root.atomic.Hash.toObject(message.hash, options, _depth + 1); + 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; + return object; + }; + + /** + * Converts this PushTag to JSON. + * @function toJSON + * @memberof atomic.PushTag + * @instance + * @returns {Object.} JSON object + */ + PushTag.prototype.toJSON = function() { + return PushTag.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PushTag + * @function getTypeUrl + * @memberof atomic.PushTag + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PushTag.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PushTag"; + }; + + return PushTag; + })(); + + atomic.PushConflict = (function() { + + /** + * Properties of a PushConflict. + * @typedef {Object} atomic.PushConflict.$Properties + * @property {string|null} [view] PushConflict view + * @property {boolean|null} [identityMismatch] PushConflict identityMismatch + * @property {string|null} [description] PushConflict description + * @property {atomic.ManifestState.$Properties|null} [local] PushConflict local + * @property {atomic.ManifestState.$Properties|null} [remote] PushConflict remote + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PushConflict. + * @memberof atomic + * @interface IPushConflict + * @augments atomic.PushConflict.$Properties + * @deprecated Use atomic.PushConflict.$Properties instead. + */ + + /** + * Shape of a PushConflict. + * @typedef {atomic.PushConflict.$Properties} atomic.PushConflict.$Shape + */ + + /** + * Constructs a new PushConflict. + * @memberof atomic + * @classdesc Represents a PushConflict. + * @constructor + * @param {atomic.PushConflict.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PushConflict = 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]]; + }; + + /** + * PushConflict view. + * @member {string} view + * @memberof atomic.PushConflict + * @instance + */ + PushConflict.prototype.view = ""; + + /** + * PushConflict identityMismatch. + * @member {boolean} identityMismatch + * @memberof atomic.PushConflict + * @instance + */ + PushConflict.prototype.identityMismatch = false; + + /** + * PushConflict description. + * @member {string} description + * @memberof atomic.PushConflict + * @instance + */ + PushConflict.prototype.description = ""; + + /** + * PushConflict local. + * @member {atomic.ManifestState.$Properties|null|undefined} local + * @memberof atomic.PushConflict + * @instance + */ + PushConflict.prototype.local = null; + + /** + * PushConflict remote. + * @member {atomic.ManifestState.$Properties|null|undefined} remote + * @memberof atomic.PushConflict + * @instance + */ + PushConflict.prototype.remote = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PushConflict.prototype, "_local", { + get: $util.oneOfGetter($oneOfFields = ["local"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PushConflict.prototype, "_remote", { + get: $util.oneOfGetter($oneOfFields = ["remote"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PushConflict instance using the specified properties. + * @function create + * @memberof atomic.PushConflict + * @static + * @param {atomic.PushConflict.$Properties=} [properties] Properties to set + * @returns {atomic.PushConflict} PushConflict instance + * @type {{ + * (properties: atomic.PushConflict.$Shape): atomic.PushConflict & atomic.PushConflict.$Shape; + * (properties?: atomic.PushConflict.$Properties): atomic.PushConflict; + * }} + */ + PushConflict.create = function(properties) { + return new PushConflict(properties); + }; + + /** + * Encodes the specified PushConflict message. Does not implicitly {@link atomic.PushConflict.verify|verify} messages. + * @function encode + * @memberof atomic.PushConflict + * @static + * @param {atomic.PushConflict.$Properties} message PushConflict message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushConflict.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.identityMismatch != null && $Object.hasOwnProperty.call(message, "identityMismatch") && message.identityMismatch !== false) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.identityMismatch); + if (message.description != null && $Object.hasOwnProperty.call(message, "description") && message.description !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.local != null && $Object.hasOwnProperty.call(message, "local")) + $root.atomic.ManifestState.encode(message.local, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.remote != null && $Object.hasOwnProperty.call(message, "remote")) + $root.atomic.ManifestState.encode(message.remote, 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 PushConflict message, length delimited. Does not implicitly {@link atomic.PushConflict.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PushConflict + * @static + * @param {atomic.PushConflict.$Properties} message PushConflict message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushConflict.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PushConflict message from the specified reader or buffer. + * @function decode + * @memberof atomic.PushConflict + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PushConflict & atomic.PushConflict.$Shape} PushConflict + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushConflict.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.PushConflict(); + 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 !== 0) + break; + if (value = reader.bool()) + message.identityMismatch = value; + else + delete message.identityMismatch; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.description = value; + else + delete message.description; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.local = $root.atomic.ManifestState.decode(reader, reader.size(), $undefined, _depth + 1, message.local); + message._local = "local"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.remote = $root.atomic.ManifestState.decode(reader, reader.size(), $undefined, _depth + 1, message.remote); + message._remote = "remote"; + 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 PushConflict message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PushConflict + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PushConflict & atomic.PushConflict.$Shape} PushConflict + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushConflict.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PushConflict message. + * @function verify + * @memberof atomic.PushConflict + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushConflict.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.identityMismatch != null && $Object.hasOwnProperty.call(message, "identityMismatch")) + if (typeof message.identityMismatch !== "boolean") + return "identityMismatch: boolean expected"; + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.local != null && $Object.hasOwnProperty.call(message, "local")) { + properties._local = 1; + { + var error = $root.atomic.ManifestState.verify(message.local, _depth + 1); + if (error) + return "local." + error; + } + } + if (message.remote != null && $Object.hasOwnProperty.call(message, "remote")) { + properties._remote = 1; + { + var error = $root.atomic.ManifestState.verify(message.remote, _depth + 1); + if (error) + return "remote." + error; + } + } + return null; + }; + + /** + * Creates a PushConflict message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PushConflict + * @static + * @param {Object.} object Plain object + * @returns {atomic.PushConflict} PushConflict + */ + PushConflict.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PushConflict) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PushConflict: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PushConflict(); + if (object.view != null) + if (typeof object.view !== "string" || object.view.length) + message.view = $String(object.view); + if (object.identityMismatch != null) + if (object.identityMismatch) + message.identityMismatch = $Boolean(object.identityMismatch); + if (object.description != null) + if (typeof object.description !== "string" || object.description.length) + message.description = $String(object.description); + if (object.local != null) { + if (!$util.isObject(object.local)) + throw $TypeError(".atomic.PushConflict.local: object expected"); + message.local = $root.atomic.ManifestState.fromObject(object.local, _depth + 1); + } + if (object.remote != null) { + if (!$util.isObject(object.remote)) + throw $TypeError(".atomic.PushConflict.remote: object expected"); + message.remote = $root.atomic.ManifestState.fromObject(object.remote, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a PushConflict message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PushConflict + * @static + * @param {atomic.PushConflict} message PushConflict + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushConflict.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 = ""; + object.identityMismatch = false; + object.description = ""; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + if (message.identityMismatch != null && $Object.hasOwnProperty.call(message, "identityMismatch")) + object.identityMismatch = message.identityMismatch; + if (message.description != null && $Object.hasOwnProperty.call(message, "description")) + object.description = message.description; + if (message.local != null && $Object.hasOwnProperty.call(message, "local")) + object.local = $root.atomic.ManifestState.toObject(message.local, options, _depth + 1); + if (message.remote != null && $Object.hasOwnProperty.call(message, "remote")) + object.remote = $root.atomic.ManifestState.toObject(message.remote, options, _depth + 1); + return object; + }; + + /** + * Converts this PushConflict to JSON. + * @function toJSON + * @memberof atomic.PushConflict + * @instance + * @returns {Object.} JSON object + */ + PushConflict.prototype.toJSON = function() { + return PushConflict.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PushConflict + * @function getTypeUrl + * @memberof atomic.PushConflict + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PushConflict.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PushConflict"; + }; + + return PushConflict; + })(); + + atomic.ManifestState = (function() { + + /** + * Properties of a ManifestState. + * @typedef {Object} atomic.ManifestState.$Properties + * @property {string|null} [view] ManifestState view + * @property {string|null} [state] ManifestState state + * @property {number|Long|null} [changeCount] ManifestState changeCount + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ManifestState. + * @memberof atomic + * @interface IManifestState + * @augments atomic.ManifestState.$Properties + * @deprecated Use atomic.ManifestState.$Properties instead. + */ + + /** + * Shape of a ManifestState. + * @typedef {atomic.ManifestState.$Properties} atomic.ManifestState.$Shape + */ + + /** + * Constructs a new ManifestState. + * @memberof atomic + * @classdesc Represents a ManifestState. + * @constructor + * @param {atomic.ManifestState.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ManifestState = 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]]; + }; + + /** + * ManifestState view. + * @member {string} view + * @memberof atomic.ManifestState + * @instance + */ + ManifestState.prototype.view = ""; + + /** + * ManifestState state. + * @member {string} state + * @memberof atomic.ManifestState + * @instance + */ + ManifestState.prototype.state = ""; + + /** + * ManifestState changeCount. + * @member {number|Long} changeCount + * @memberof atomic.ManifestState + * @instance + */ + ManifestState.prototype.changeCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new ManifestState instance using the specified properties. + * @function create + * @memberof atomic.ManifestState + * @static + * @param {atomic.ManifestState.$Properties=} [properties] Properties to set + * @returns {atomic.ManifestState} ManifestState instance + * @type {{ + * (properties: atomic.ManifestState.$Shape): atomic.ManifestState & atomic.ManifestState.$Shape; + * (properties?: atomic.ManifestState.$Properties): atomic.ManifestState; + * }} + */ + ManifestState.create = function(properties) { + return new ManifestState(properties); + }; + + /** + * Encodes the specified ManifestState message. Does not implicitly {@link atomic.ManifestState.verify|verify} messages. + * @function encode + * @memberof atomic.ManifestState + * @static + * @param {atomic.ManifestState.$Properties} message ManifestState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManifestState.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.state != null && $Object.hasOwnProperty.call(message, "state") && message.state !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.state); + 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 3, wireType 0 =*/24).uint64(message.changeCount); + 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 ManifestState message, length delimited. Does not implicitly {@link atomic.ManifestState.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ManifestState + * @static + * @param {atomic.ManifestState.$Properties} message ManifestState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManifestState.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ManifestState message from the specified reader or buffer. + * @function decode + * @memberof atomic.ManifestState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ManifestState & atomic.ManifestState.$Shape} ManifestState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManifestState.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.ManifestState(); + 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; + if ((value = reader.stringVerify()).length) + message.state = value; + else + delete message.state; + continue; + } + case 3: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.changeCount = value; + else + delete message.changeCount; + 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 ManifestState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ManifestState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ManifestState & atomic.ManifestState.$Shape} ManifestState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManifestState.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ManifestState message. + * @function verify + * @memberof atomic.ManifestState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManifestState.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")) + if (!$util.isString(message.view)) + return "view: string expected"; + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) + if (!$util.isString(message.state)) + return "state: string expected"; + 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"; + return null; + }; + + /** + * Creates a ManifestState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ManifestState + * @static + * @param {Object.} object Plain object + * @returns {atomic.ManifestState} ManifestState + */ + ManifestState.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ManifestState) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ManifestState: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ManifestState(); + if (object.view != null) + if (typeof object.view !== "string" || object.view.length) + message.view = $String(object.view); + if (object.state != null) + if (typeof object.state !== "string" || object.state.length) + message.state = $String(object.state); + 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); + return message; + }; + + /** + * Creates a plain object from a ManifestState message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ManifestState + * @static + * @param {atomic.ManifestState} message ManifestState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManifestState.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 = ""; + object.state = ""; + 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; + } + if (message.view != null && $Object.hasOwnProperty.call(message, "view")) + object.view = message.view; + if (message.state != null && $Object.hasOwnProperty.call(message, "state")) + object.state = message.state; + 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; + return object; + }; + + /** + * Converts this ManifestState to JSON. + * @function toJSON + * @memberof atomic.ManifestState + * @instance + * @returns {Object.} JSON object + */ + ManifestState.prototype.toJSON = function() { + return ManifestState.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ManifestState + * @function getTypeUrl + * @memberof atomic.ManifestState + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ManifestState.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ManifestState"; + }; + + return ManifestState; + })(); + + atomic.PullChangesRequest = (function() { + + /** + * Properties of a PullChangesRequest. + * @typedef {Object} atomic.PullChangesRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] PullChangesRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] PullChangesRequest meta + * @property {string|null} [remote] PullChangesRequest remote + * @property {boolean|null} [importSidecars] PullChangesRequest importSidecars + * @property {string|null} [toView] PullChangesRequest toView + * @property {string|null} [fromView] PullChangesRequest fromView + * @property {boolean|null} [dryRun] PullChangesRequest dryRun + * @property {boolean|null} [all] PullChangesRequest all + * @property {boolean|null} [insecure] PullChangesRequest insecure + * @property {number|Long|null} [timeoutSecs] PullChangesRequest timeoutSecs + * @property {string|null} [identity] PullChangesRequest identity + * @property {boolean|null} [downloadOnly] PullChangesRequest downloadOnly + * @property {Object.|null} [authHeaders] PullChangesRequest authHeaders + * @property {string|null} [remoteUrl] PullChangesRequest remoteUrl + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PullChangesRequest. + * @memberof atomic + * @interface IPullChangesRequest + * @augments atomic.PullChangesRequest.$Properties + * @deprecated Use atomic.PullChangesRequest.$Properties instead. + */ + + /** + * Shape of a PullChangesRequest. + * @typedef {atomic.PullChangesRequest.$Properties} atomic.PullChangesRequest.$Shape + */ + + /** + * Constructs a new PullChangesRequest. + * @memberof atomic + * @classdesc Represents a PullChangesRequest. + * @constructor + * @param {atomic.PullChangesRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PullChangesRequest = function (properties) { + this.authHeaders = {}; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * PullChangesRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.repository = null; + + /** + * PullChangesRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.meta = null; + + /** + * PullChangesRequest remote. + * @member {string} remote + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.remote = ""; + + /** + * PullChangesRequest importSidecars. + * @member {boolean} importSidecars + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.importSidecars = false; + + /** + * PullChangesRequest toView. + * @member {string|null|undefined} toView + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.toView = null; + + /** + * PullChangesRequest fromView. + * @member {string|null|undefined} fromView + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.fromView = null; + + /** + * PullChangesRequest dryRun. + * @member {boolean} dryRun + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.dryRun = false; + + /** + * PullChangesRequest all. + * @member {boolean} all + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.all = false; + + /** + * PullChangesRequest insecure. + * @member {boolean} insecure + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.insecure = false; + + /** + * PullChangesRequest timeoutSecs. + * @member {number|Long} timeoutSecs + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.timeoutSecs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullChangesRequest identity. + * @member {string|null|undefined} identity + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.identity = null; + + /** + * PullChangesRequest downloadOnly. + * @member {boolean} downloadOnly + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.downloadOnly = false; + + /** + * PullChangesRequest authHeaders. + * @member {Object.} authHeaders + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.authHeaders = $util.emptyObject; + + /** + * PullChangesRequest remoteUrl. + * @member {string|null|undefined} remoteUrl + * @memberof atomic.PullChangesRequest + * @instance + */ + PullChangesRequest.prototype.remoteUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullChangesRequest.prototype, "_to_view", { + get: $util.oneOfGetter($oneOfFields = ["toView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullChangesRequest.prototype, "_from_view", { + get: $util.oneOfGetter($oneOfFields = ["fromView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullChangesRequest.prototype, "_identity", { + get: $util.oneOfGetter($oneOfFields = ["identity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullChangesRequest.prototype, "_remote_url", { + get: $util.oneOfGetter($oneOfFields = ["remoteUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PullChangesRequest instance using the specified properties. + * @function create + * @memberof atomic.PullChangesRequest + * @static + * @param {atomic.PullChangesRequest.$Properties=} [properties] Properties to set + * @returns {atomic.PullChangesRequest} PullChangesRequest instance + * @type {{ + * (properties: atomic.PullChangesRequest.$Shape): atomic.PullChangesRequest & atomic.PullChangesRequest.$Shape; + * (properties?: atomic.PullChangesRequest.$Properties): atomic.PullChangesRequest; + * }} + */ + PullChangesRequest.create = function(properties) { + return new PullChangesRequest(properties); + }; + + /** + * Encodes the specified PullChangesRequest message. Does not implicitly {@link atomic.PullChangesRequest.verify|verify} messages. + * @function encode + * @memberof atomic.PullChangesRequest + * @static + * @param {atomic.PullChangesRequest.$Properties} message PullChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullChangesRequest.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.remote != null && $Object.hasOwnProperty.call(message, "remote") && message.remote !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.remote); + if (message.importSidecars != null && $Object.hasOwnProperty.call(message, "importSidecars") && message.importSidecars !== false) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.importSidecars); + if (message.toView != null && $Object.hasOwnProperty.call(message, "toView")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.toView); + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.fromView); + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun") && message.dryRun !== false) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.dryRun); + if (message.all != null && $Object.hasOwnProperty.call(message, "all") && message.all !== false) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.all); + if (message.insecure != null && $Object.hasOwnProperty.call(message, "insecure") && message.insecure !== false) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.insecure); + if (message.timeoutSecs != null && $Object.hasOwnProperty.call(message, "timeoutSecs") && (typeof message.timeoutSecs === "object" ? message.timeoutSecs.low || message.timeoutSecs.high : message.timeoutSecs !== 0)) + writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.timeoutSecs); + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.identity); + if (message.downloadOnly != null && $Object.hasOwnProperty.call(message, "downloadOnly") && message.downloadOnly !== false) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.downloadOnly); + if (message.authHeaders != null && $Object.hasOwnProperty.call(message, "authHeaders")) + for (var keys = $Object.keys(message.authHeaders), i = 0; i < keys.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.authHeaders[keys[i]]).ldelim(); + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.remoteUrl); + 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 PullChangesRequest message, length delimited. Does not implicitly {@link atomic.PullChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PullChangesRequest + * @static + * @param {atomic.PullChangesRequest.$Properties} message PullChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullChangesRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PullChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.PullChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PullChangesRequest & atomic.PullChangesRequest.$Shape} PullChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullChangesRequest.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.PullChangesRequest(); + 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.remote = value; + else + delete message.remote; + continue; + } + case 4: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.importSidecars = value; + else + delete message.importSidecars; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.toView = reader.stringVerify(); + message._to_view = "toView"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.fromView = reader.stringVerify(); + message._from_view = "fromView"; + continue; + } + case 7: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.dryRun = value; + else + delete message.dryRun; + continue; + } + case 8: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.all = value; + else + delete message.all; + continue; + } + case 9: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.insecure = value; + else + delete message.insecure; + continue; + } + case 10: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.timeoutSecs = value; + else + delete message.timeoutSecs; + continue; + } + case 11: { + if (wireType !== 2) + break; + message.identity = reader.stringVerify(); + message._identity = "identity"; + continue; + } + case 12: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.downloadOnly = value; + else + delete message.downloadOnly; + continue; + } + case 13: { + if (wireType !== 2) + break; + if (message.authHeaders === $util.emptyObject) + message.authHeaders = {}; + 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.authHeaders, key); + message.authHeaders[key] = value; + continue; + } + case 14: { + if (wireType !== 2) + break; + message.remoteUrl = reader.stringVerify(); + message._remote_url = "remoteUrl"; + 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 PullChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PullChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PullChangesRequest & atomic.PullChangesRequest.$Shape} PullChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullChangesRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PullChangesRequest message. + * @function verify + * @memberof atomic.PullChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullChangesRequest.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.remote != null && $Object.hasOwnProperty.call(message, "remote")) + if (!$util.isString(message.remote)) + return "remote: string expected"; + if (message.importSidecars != null && $Object.hasOwnProperty.call(message, "importSidecars")) + if (typeof message.importSidecars !== "boolean") + return "importSidecars: boolean expected"; + if (message.toView != null && $Object.hasOwnProperty.call(message, "toView")) { + properties._to_view = 1; + if (!$util.isString(message.toView)) + return "toView: string expected"; + } + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) { + properties._from_view = 1; + if (!$util.isString(message.fromView)) + return "fromView: string expected"; + } + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun")) + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + if (message.all != null && $Object.hasOwnProperty.call(message, "all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; + if (message.insecure != null && $Object.hasOwnProperty.call(message, "insecure")) + if (typeof message.insecure !== "boolean") + return "insecure: boolean expected"; + if (message.timeoutSecs != null && $Object.hasOwnProperty.call(message, "timeoutSecs")) + if (!$util.isInteger(message.timeoutSecs) && !(message.timeoutSecs && $util.isInteger(message.timeoutSecs.low) && $util.isInteger(message.timeoutSecs.high))) + return "timeoutSecs: integer|Long expected"; + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) { + properties._identity = 1; + if (!$util.isString(message.identity)) + return "identity: string expected"; + } + if (message.downloadOnly != null && $Object.hasOwnProperty.call(message, "downloadOnly")) + if (typeof message.downloadOnly !== "boolean") + return "downloadOnly: boolean expected"; + if (message.authHeaders != null && $Object.hasOwnProperty.call(message, "authHeaders")) { + if (!$util.isObject(message.authHeaders)) + return "authHeaders: object expected"; + var key = $Object.keys(message.authHeaders); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.authHeaders[key[i]])) + return "authHeaders: string{k:string} expected"; + } + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) { + properties._remote_url = 1; + if (!$util.isString(message.remoteUrl)) + return "remoteUrl: string expected"; + } + return null; + }; + + /** + * Creates a PullChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PullChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.PullChangesRequest} PullChangesRequest + */ + PullChangesRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PullChangesRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PullChangesRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PullChangesRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.PullChangesRequest.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.PullChangesRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.remote != null) + if (typeof object.remote !== "string" || object.remote.length) + message.remote = $String(object.remote); + if (object.importSidecars != null) + if (object.importSidecars) + message.importSidecars = $Boolean(object.importSidecars); + if (object.toView != null) + message.toView = $String(object.toView); + if (object.fromView != null) + message.fromView = $String(object.fromView); + if (object.dryRun != null) + if (object.dryRun) + message.dryRun = $Boolean(object.dryRun); + if (object.all != null) + if (object.all) + message.all = $Boolean(object.all); + if (object.insecure != null) + if (object.insecure) + message.insecure = $Boolean(object.insecure); + if (object.timeoutSecs != null) + if (typeof object.timeoutSecs === "object" ? object.timeoutSecs.low || object.timeoutSecs.high : $Number(object.timeoutSecs) !== 0) + if ($util.Long) + message.timeoutSecs = $util.Long.fromValue(object.timeoutSecs, true); + else if (typeof object.timeoutSecs === "string") + message.timeoutSecs = $parseInt(object.timeoutSecs, 10); + else if (typeof object.timeoutSecs === "number") + message.timeoutSecs = object.timeoutSecs; + else if (typeof object.timeoutSecs === "object") + message.timeoutSecs = new $util.LongBits(object.timeoutSecs.low >>> 0, object.timeoutSecs.high >>> 0).toNumber(true); + if (object.identity != null) + message.identity = $String(object.identity); + if (object.downloadOnly != null) + if (object.downloadOnly) + message.downloadOnly = $Boolean(object.downloadOnly); + if (object.authHeaders) { + if (!$util.isObject(object.authHeaders)) + throw $TypeError(".atomic.PullChangesRequest.authHeaders: object expected"); + message.authHeaders = {}; + for (var keys = $Object.keys(object.authHeaders), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.authHeaders, keys[i]); + message.authHeaders[keys[i]] = $String(object.authHeaders[keys[i]]); + } + } + if (object.remoteUrl != null) + message.remoteUrl = $String(object.remoteUrl); + return message; + }; + + /** + * Creates a plain object from a PullChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PullChangesRequest + * @static + * @param {atomic.PullChangesRequest} message PullChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullChangesRequest.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.objects || options.defaults) + object.authHeaders = {}; + if (options.defaults) { + object.repository = null; + object.meta = null; + object.remote = ""; + object.importSidecars = false; + object.dryRun = false; + object.all = false; + object.insecure = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeoutSecs = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.timeoutSecs = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.downloadOnly = 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.remote != null && $Object.hasOwnProperty.call(message, "remote")) + object.remote = message.remote; + if (message.importSidecars != null && $Object.hasOwnProperty.call(message, "importSidecars")) + object.importSidecars = message.importSidecars; + if (message.toView != null && $Object.hasOwnProperty.call(message, "toView")) + object.toView = message.toView; + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) + object.fromView = message.fromView; + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun")) + object.dryRun = message.dryRun; + if (message.all != null && $Object.hasOwnProperty.call(message, "all")) + object.all = message.all; + if (message.insecure != null && $Object.hasOwnProperty.call(message, "insecure")) + object.insecure = message.insecure; + if (message.timeoutSecs != null && $Object.hasOwnProperty.call(message, "timeoutSecs")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.timeoutSecs = typeof message.timeoutSecs === "number" ? $BigInt(message.timeoutSecs) : $util.Long.fromBits(message.timeoutSecs.low >>> 0, message.timeoutSecs.high >>> 0, true).toBigInt(); + else if (typeof message.timeoutSecs === "number") + object.timeoutSecs = options.longs === $String ? $String(message.timeoutSecs) : message.timeoutSecs; + else + object.timeoutSecs = options.longs === $String ? $util.Long.prototype.toString.call(message.timeoutSecs) : options.longs === $Number ? new $util.LongBits(message.timeoutSecs.low >>> 0, message.timeoutSecs.high >>> 0).toNumber(true) : message.timeoutSecs; + if (message.identity != null && $Object.hasOwnProperty.call(message, "identity")) + object.identity = message.identity; + if (message.downloadOnly != null && $Object.hasOwnProperty.call(message, "downloadOnly")) + object.downloadOnly = message.downloadOnly; + var keys2; + if (message.authHeaders && (keys2 = $Object.keys(message.authHeaders)).length) { + object.authHeaders = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.authHeaders, keys2[j]); + object.authHeaders[keys2[j]] = message.authHeaders[keys2[j]]; + } + } + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) + object.remoteUrl = message.remoteUrl; + return object; + }; + + /** + * Converts this PullChangesRequest to JSON. + * @function toJSON + * @memberof atomic.PullChangesRequest + * @instance + * @returns {Object.} JSON object + */ + PullChangesRequest.prototype.toJSON = function() { + return PullChangesRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PullChangesRequest + * @function getTypeUrl + * @memberof atomic.PullChangesRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PullChangesRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PullChangesRequest"; + }; + + return PullChangesRequest; + })(); + + atomic.PullChangesResponse = (function() { + + /** + * Properties of a PullChangesResponse. + * @typedef {Object} atomic.PullChangesResponse.$Properties + * @property {number|Long|null} [appliedChanges] PullChangesResponse appliedChanges + * @property {Array.|null} [updatedViews] PullChangesResponse updatedViews + * @property {atomic.ResponseMeta.$Properties|null} [meta] PullChangesResponse meta + * @property {atomic.PullReport.$Properties|null} [report] PullChangesResponse report + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PullChangesResponse. + * @memberof atomic + * @interface IPullChangesResponse + * @augments atomic.PullChangesResponse.$Properties + * @deprecated Use atomic.PullChangesResponse.$Properties instead. + */ + + /** + * Shape of a PullChangesResponse. + * @typedef {atomic.PullChangesResponse.$Properties} atomic.PullChangesResponse.$Shape + */ + + /** + * Constructs a new PullChangesResponse. + * @memberof atomic + * @classdesc Represents a PullChangesResponse. + * @constructor + * @param {atomic.PullChangesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PullChangesResponse = function (properties) { + this.updatedViews = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * PullChangesResponse appliedChanges. + * @member {number|Long} appliedChanges + * @memberof atomic.PullChangesResponse + * @instance + */ + PullChangesResponse.prototype.appliedChanges = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullChangesResponse updatedViews. + * @member {Array.} updatedViews + * @memberof atomic.PullChangesResponse + * @instance + */ + PullChangesResponse.prototype.updatedViews = $util.emptyArray; + + /** + * PullChangesResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.PullChangesResponse + * @instance + */ + PullChangesResponse.prototype.meta = null; + + /** + * PullChangesResponse report. + * @member {atomic.PullReport.$Properties|null|undefined} report + * @memberof atomic.PullChangesResponse + * @instance + */ + PullChangesResponse.prototype.report = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullChangesResponse.prototype, "_report", { + get: $util.oneOfGetter($oneOfFields = ["report"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PullChangesResponse instance using the specified properties. + * @function create + * @memberof atomic.PullChangesResponse + * @static + * @param {atomic.PullChangesResponse.$Properties=} [properties] Properties to set + * @returns {atomic.PullChangesResponse} PullChangesResponse instance + * @type {{ + * (properties: atomic.PullChangesResponse.$Shape): atomic.PullChangesResponse & atomic.PullChangesResponse.$Shape; + * (properties?: atomic.PullChangesResponse.$Properties): atomic.PullChangesResponse; + * }} + */ + PullChangesResponse.create = function(properties) { + return new PullChangesResponse(properties); + }; + + /** + * Encodes the specified PullChangesResponse message. Does not implicitly {@link atomic.PullChangesResponse.verify|verify} messages. + * @function encode + * @memberof atomic.PullChangesResponse + * @static + * @param {atomic.PullChangesResponse.$Properties} message PullChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullChangesResponse.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.appliedChanges != null && $Object.hasOwnProperty.call(message, "appliedChanges") && (typeof message.appliedChanges === "object" ? message.appliedChanges.low || message.appliedChanges.high : message.appliedChanges !== 0)) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.appliedChanges); + if (message.updatedViews != null && message.updatedViews.length) + for (var i = 0; i < message.updatedViews.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.updatedViews[i]); + if (message.report != null && $Object.hasOwnProperty.call(message, "report")) + $root.atomic.PullReport.encode(message.report, writer.uint32(/* id 3, wireType 2 =*/26).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 PullChangesResponse message, length delimited. Does not implicitly {@link atomic.PullChangesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PullChangesResponse + * @static + * @param {atomic.PullChangesResponse.$Properties} message PullChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullChangesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PullChangesResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.PullChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PullChangesResponse & atomic.PullChangesResponse.$Shape} PullChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullChangesResponse.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.PullChangesResponse(); + 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.appliedChanges = value; + else + delete message.appliedChanges; + continue; + } + case 2: { + if (wireType !== 2) + break; + if (!(message.updatedViews && message.updatedViews.length)) + message.updatedViews = []; + message.updatedViews.push(reader.stringVerify()); + continue; + } + case 100: { + if (wireType !== 2) + break; + message.meta = $root.atomic.ResponseMeta.decode(reader, reader.size(), $undefined, _depth + 1, message.meta); + continue; + } + case 3: { + if (wireType !== 2) + break; + message.report = $root.atomic.PullReport.decode(reader, reader.size(), $undefined, _depth + 1, message.report); + message._report = "report"; + 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 PullChangesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PullChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PullChangesResponse & atomic.PullChangesResponse.$Shape} PullChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullChangesResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PullChangesResponse message. + * @function verify + * @memberof atomic.PullChangesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullChangesResponse.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.appliedChanges != null && $Object.hasOwnProperty.call(message, "appliedChanges")) + if (!$util.isInteger(message.appliedChanges) && !(message.appliedChanges && $util.isInteger(message.appliedChanges.low) && $util.isInteger(message.appliedChanges.high))) + return "appliedChanges: integer|Long expected"; + if (message.updatedViews != null && $Object.hasOwnProperty.call(message, "updatedViews")) { + if (!$Array.isArray(message.updatedViews)) + return "updatedViews: array expected"; + for (var i = 0; i < message.updatedViews.length; ++i) + if (!$util.isString(message.updatedViews[i])) + return "updatedViews: 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; + } + if (message.report != null && $Object.hasOwnProperty.call(message, "report")) { + properties._report = 1; + { + var error = $root.atomic.PullReport.verify(message.report, _depth + 1); + if (error) + return "report." + error; + } + } + return null; + }; + + /** + * Creates a PullChangesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PullChangesResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.PullChangesResponse} PullChangesResponse + */ + PullChangesResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PullChangesResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PullChangesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PullChangesResponse(); + if (object.appliedChanges != null) + if (typeof object.appliedChanges === "object" ? object.appliedChanges.low || object.appliedChanges.high : $Number(object.appliedChanges) !== 0) + if ($util.Long) + message.appliedChanges = $util.Long.fromValue(object.appliedChanges, true); + else if (typeof object.appliedChanges === "string") + message.appliedChanges = $parseInt(object.appliedChanges, 10); + else if (typeof object.appliedChanges === "number") + message.appliedChanges = object.appliedChanges; + else if (typeof object.appliedChanges === "object") + message.appliedChanges = new $util.LongBits(object.appliedChanges.low >>> 0, object.appliedChanges.high >>> 0).toNumber(true); + if (object.updatedViews) { + if (!$Array.isArray(object.updatedViews)) + throw $TypeError(".atomic.PullChangesResponse.updatedViews: array expected"); + message.updatedViews = $Array(object.updatedViews.length); + for (var i = 0; i < object.updatedViews.length; ++i) + message.updatedViews[i] = $String(object.updatedViews[i]); + } + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.PullChangesResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _depth + 1); + } + if (object.report != null) { + if (!$util.isObject(object.report)) + throw $TypeError(".atomic.PullChangesResponse.report: object expected"); + message.report = $root.atomic.PullReport.fromObject(object.report, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a PullChangesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PullChangesResponse + * @static + * @param {atomic.PullChangesResponse} message PullChangesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullChangesResponse.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.updatedViews = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.appliedChanges = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.appliedChanges = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.meta = null; + } + if (message.appliedChanges != null && $Object.hasOwnProperty.call(message, "appliedChanges")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.appliedChanges = typeof message.appliedChanges === "number" ? $BigInt(message.appliedChanges) : $util.Long.fromBits(message.appliedChanges.low >>> 0, message.appliedChanges.high >>> 0, true).toBigInt(); + else if (typeof message.appliedChanges === "number") + object.appliedChanges = options.longs === $String ? $String(message.appliedChanges) : message.appliedChanges; + else + object.appliedChanges = options.longs === $String ? $util.Long.prototype.toString.call(message.appliedChanges) : options.longs === $Number ? new $util.LongBits(message.appliedChanges.low >>> 0, message.appliedChanges.high >>> 0).toNumber(true) : message.appliedChanges; + if (message.updatedViews && message.updatedViews.length) { + object.updatedViews = $Array(message.updatedViews.length); + for (var j = 0; j < message.updatedViews.length; ++j) + object.updatedViews[j] = message.updatedViews[j]; + } + if (message.report != null && $Object.hasOwnProperty.call(message, "report")) + object.report = $root.atomic.PullReport.toObject(message.report, 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 PullChangesResponse to JSON. + * @function toJSON + * @memberof atomic.PullChangesResponse + * @instance + * @returns {Object.} JSON object + */ + PullChangesResponse.prototype.toJSON = function() { + return PullChangesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PullChangesResponse + * @function getTypeUrl + * @memberof atomic.PullChangesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PullChangesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PullChangesResponse"; + }; + + return PullChangesResponse; + })(); + + atomic.PullReport = (function() { + + /** + * Properties of a PullReport. + * @typedef {Object} atomic.PullReport.$Properties + * @property {string|null} [remoteName] PullReport remoteName + * @property {string|null} [remoteUrl] PullReport remoteUrl + * @property {string|null} [remoteView] PullReport remoteView + * @property {string|null} [localView] PullReport localView + * @property {number|Long|null} [localViewChanges] PullReport localViewChanges + * @property {number|Long|null} [graphObjects] PullReport graphObjects + * @property {number|Long|null} [remoteChanges] PullReport remoteChanges + * @property {string|null} [remoteState] PullReport remoteState + * @property {Array.|null} [localOnly] PullReport localOnly + * @property {Array.|null} [downloads] PullReport downloads + * @property {number|Long|null} [changesDownloaded] PullReport changesDownloaded + * @property {number|Long|null} [bytesTransferred] PullReport bytesTransferred + * @property {boolean|null} [applied] PullReport applied + * @property {number|Long|null} [appliedChanges] PullReport appliedChanges + * @property {Array.|null} [applyErrors] PullReport applyErrors + * @property {Array.|null} [sidecars] PullReport sidecars + * @property {boolean|null} [setIdVerified] PullReport setIdVerified + * @property {string|null} [setIdWarning] PullReport setIdWarning + * @property {boolean|null} [materialized] PullReport materialized + * @property {number|Long|null} [filesWritten] PullReport filesWritten + * @property {string|null} [materializeError] PullReport materializeError + * @property {Array.|null} [tags] PullReport tags + * @property {Array.|null} [warnings] PullReport warnings + * @property {string|null} [localTip] PullReport localTip + * @property {boolean|null} [vaultBootstrapped] PullReport vaultBootstrapped + * @property {number|Long|null} [reconciledViews] PullReport reconciledViews + * @property {boolean|null} [downloadOnly] PullReport downloadOnly + * @property {number|Long|null} [changesFailed] PullReport changesFailed + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PullReport. + * @memberof atomic + * @interface IPullReport + * @augments atomic.PullReport.$Properties + * @deprecated Use atomic.PullReport.$Properties instead. + */ + + /** + * Shape of a PullReport. + * @typedef {atomic.PullReport.$Properties} atomic.PullReport.$Shape + */ + + /** + * Constructs a new PullReport. + * @memberof atomic + * @classdesc Represents a PullReport. + * @constructor + * @param {atomic.PullReport.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PullReport = function (properties) { + this.localOnly = []; + this.downloads = []; + this.applyErrors = []; + this.sidecars = []; + this.tags = []; + 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]]; + }; + + /** + * PullReport remoteName. + * @member {string} remoteName + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.remoteName = ""; + + /** + * PullReport remoteUrl. + * @member {string} remoteUrl + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.remoteUrl = ""; + + /** + * PullReport remoteView. + * @member {string} remoteView + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.remoteView = ""; + + /** + * PullReport localView. + * @member {string} localView + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.localView = ""; + + /** + * PullReport localViewChanges. + * @member {number|Long} localViewChanges + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.localViewChanges = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullReport graphObjects. + * @member {number|Long} graphObjects + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.graphObjects = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullReport remoteChanges. + * @member {number|Long} remoteChanges + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.remoteChanges = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullReport remoteState. + * @member {string|null|undefined} remoteState + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.remoteState = null; + + /** + * PullReport localOnly. + * @member {Array.} localOnly + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.localOnly = $util.emptyArray; + + /** + * PullReport downloads. + * @member {Array.} downloads + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.downloads = $util.emptyArray; + + /** + * PullReport changesDownloaded. + * @member {number|Long} changesDownloaded + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.changesDownloaded = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullReport bytesTransferred. + * @member {number|Long} bytesTransferred + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.bytesTransferred = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullReport applied. + * @member {boolean} applied + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.applied = false; + + /** + * PullReport appliedChanges. + * @member {number|Long} appliedChanges + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.appliedChanges = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullReport applyErrors. + * @member {Array.} applyErrors + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.applyErrors = $util.emptyArray; + + /** + * PullReport sidecars. + * @member {Array.} sidecars + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.sidecars = $util.emptyArray; + + /** + * PullReport setIdVerified. + * @member {boolean} setIdVerified + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.setIdVerified = false; + + /** + * PullReport setIdWarning. + * @member {string|null|undefined} setIdWarning + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.setIdWarning = null; + + /** + * PullReport materialized. + * @member {boolean} materialized + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.materialized = false; + + /** + * PullReport filesWritten. + * @member {number|Long} filesWritten + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.filesWritten = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullReport materializeError. + * @member {string|null|undefined} materializeError + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.materializeError = null; + + /** + * PullReport tags. + * @member {Array.} tags + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.tags = $util.emptyArray; + + /** + * PullReport warnings. + * @member {Array.} warnings + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.warnings = $util.emptyArray; + + /** + * PullReport localTip. + * @member {string|null|undefined} localTip + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.localTip = null; + + /** + * PullReport vaultBootstrapped. + * @member {boolean} vaultBootstrapped + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.vaultBootstrapped = false; + + /** + * PullReport reconciledViews. + * @member {number|Long} reconciledViews + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.reconciledViews = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullReport downloadOnly. + * @member {boolean} downloadOnly + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.downloadOnly = false; + + /** + * PullReport changesFailed. + * @member {number|Long} changesFailed + * @memberof atomic.PullReport + * @instance + */ + PullReport.prototype.changesFailed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullReport.prototype, "_remote_state", { + get: $util.oneOfGetter($oneOfFields = ["remoteState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullReport.prototype, "_set_id_warning", { + get: $util.oneOfGetter($oneOfFields = ["setIdWarning"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullReport.prototype, "_materialize_error", { + get: $util.oneOfGetter($oneOfFields = ["materializeError"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullReport.prototype, "_local_tip", { + get: $util.oneOfGetter($oneOfFields = ["localTip"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PullReport instance using the specified properties. + * @function create + * @memberof atomic.PullReport + * @static + * @param {atomic.PullReport.$Properties=} [properties] Properties to set + * @returns {atomic.PullReport} PullReport instance + * @type {{ + * (properties: atomic.PullReport.$Shape): atomic.PullReport & atomic.PullReport.$Shape; + * (properties?: atomic.PullReport.$Properties): atomic.PullReport; + * }} + */ + PullReport.create = function(properties) { + return new PullReport(properties); + }; + + /** + * Encodes the specified PullReport message. Does not implicitly {@link atomic.PullReport.verify|verify} messages. + * @function encode + * @memberof atomic.PullReport + * @static + * @param {atomic.PullReport.$Properties} message PullReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullReport.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.remoteName != null && $Object.hasOwnProperty.call(message, "remoteName") && message.remoteName !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.remoteName); + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl") && message.remoteUrl !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.remoteUrl); + if (message.remoteView != null && $Object.hasOwnProperty.call(message, "remoteView") && message.remoteView !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.remoteView); + if (message.localView != null && $Object.hasOwnProperty.call(message, "localView") && message.localView !== "") + writer.uint32(/* id 4, wireType 2 =*/34).string(message.localView); + if (message.localViewChanges != null && $Object.hasOwnProperty.call(message, "localViewChanges") && (typeof message.localViewChanges === "object" ? message.localViewChanges.low || message.localViewChanges.high : message.localViewChanges !== 0)) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.localViewChanges); + if (message.graphObjects != null && $Object.hasOwnProperty.call(message, "graphObjects") && (typeof message.graphObjects === "object" ? message.graphObjects.low || message.graphObjects.high : message.graphObjects !== 0)) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.graphObjects); + if (message.remoteChanges != null && $Object.hasOwnProperty.call(message, "remoteChanges") && (typeof message.remoteChanges === "object" ? message.remoteChanges.low || message.remoteChanges.high : message.remoteChanges !== 0)) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.remoteChanges); + if (message.remoteState != null && $Object.hasOwnProperty.call(message, "remoteState")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.remoteState); + if (message.localOnly != null && message.localOnly.length) + for (var i = 0; i < message.localOnly.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.localOnly[i]); + if (message.downloads != null && message.downloads.length) + for (var i = 0; i < message.downloads.length; ++i) + $root.atomic.PullDownload.encode(message.downloads[i], writer.uint32(/* id 10, wireType 2 =*/82).fork(), _depth + 1).ldelim(); + if (message.changesDownloaded != null && $Object.hasOwnProperty.call(message, "changesDownloaded") && (typeof message.changesDownloaded === "object" ? message.changesDownloaded.low || message.changesDownloaded.high : message.changesDownloaded !== 0)) + writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.changesDownloaded); + if (message.bytesTransferred != null && $Object.hasOwnProperty.call(message, "bytesTransferred") && (typeof message.bytesTransferred === "object" ? message.bytesTransferred.low || message.bytesTransferred.high : message.bytesTransferred !== 0)) + writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.bytesTransferred); + if (message.applied != null && $Object.hasOwnProperty.call(message, "applied") && message.applied !== false) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.applied); + if (message.appliedChanges != null && $Object.hasOwnProperty.call(message, "appliedChanges") && (typeof message.appliedChanges === "object" ? message.appliedChanges.low || message.appliedChanges.high : message.appliedChanges !== 0)) + writer.uint32(/* id 14, wireType 0 =*/112).uint64(message.appliedChanges); + if (message.applyErrors != null && message.applyErrors.length) + for (var i = 0; i < message.applyErrors.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.applyErrors[i]); + if (message.sidecars != null && message.sidecars.length) + for (var i = 0; i < message.sidecars.length; ++i) + $root.atomic.PullSidecar.encode(message.sidecars[i], writer.uint32(/* id 16, wireType 2 =*/130).fork(), _depth + 1).ldelim(); + if (message.setIdVerified != null && $Object.hasOwnProperty.call(message, "setIdVerified") && message.setIdVerified !== false) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.setIdVerified); + if (message.setIdWarning != null && $Object.hasOwnProperty.call(message, "setIdWarning")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.setIdWarning); + if (message.materialized != null && $Object.hasOwnProperty.call(message, "materialized") && message.materialized !== false) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.materialized); + 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 20, wireType 0 =*/160).uint64(message.filesWritten); + if (message.materializeError != null && $Object.hasOwnProperty.call(message, "materializeError")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.materializeError); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.atomic.PullTag.encode(message.tags[i], writer.uint32(/* id 22, wireType 2 =*/178).fork(), _depth + 1).ldelim(); + if (message.warnings != null && message.warnings.length) + for (var i = 0; i < message.warnings.length; ++i) + $root.atomic.PullWarning.encode(message.warnings[i], writer.uint32(/* id 23, wireType 2 =*/186).fork(), _depth + 1).ldelim(); + if (message.localTip != null && $Object.hasOwnProperty.call(message, "localTip")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.localTip); + if (message.vaultBootstrapped != null && $Object.hasOwnProperty.call(message, "vaultBootstrapped") && message.vaultBootstrapped !== false) + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.vaultBootstrapped); + if (message.reconciledViews != null && $Object.hasOwnProperty.call(message, "reconciledViews") && (typeof message.reconciledViews === "object" ? message.reconciledViews.low || message.reconciledViews.high : message.reconciledViews !== 0)) + writer.uint32(/* id 26, wireType 0 =*/208).uint64(message.reconciledViews); + if (message.downloadOnly != null && $Object.hasOwnProperty.call(message, "downloadOnly") && message.downloadOnly !== false) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.downloadOnly); + if (message.changesFailed != null && $Object.hasOwnProperty.call(message, "changesFailed") && (typeof message.changesFailed === "object" ? message.changesFailed.low || message.changesFailed.high : message.changesFailed !== 0)) + writer.uint32(/* id 28, wireType 0 =*/224).uint64(message.changesFailed); + 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 PullReport message, length delimited. Does not implicitly {@link atomic.PullReport.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PullReport + * @static + * @param {atomic.PullReport.$Properties} message PullReport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullReport.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PullReport message from the specified reader or buffer. + * @function decode + * @memberof atomic.PullReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PullReport & atomic.PullReport.$Shape} PullReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullReport.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.PullReport(); + 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.remoteName = value; + else + delete message.remoteName; + continue; + } + case 2: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.remoteUrl = value; + else + delete message.remoteUrl; + continue; + } + case 3: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.remoteView = value; + else + delete message.remoteView; + continue; + } + case 4: { + if (wireType !== 2) + break; + if ((value = reader.stringVerify()).length) + message.localView = value; + else + delete message.localView; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.localViewChanges = value; + else + delete message.localViewChanges; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.graphObjects = value; + else + delete message.graphObjects; + continue; + } + case 7: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.remoteChanges = value; + else + delete message.remoteChanges; + continue; + } + case 8: { + if (wireType !== 2) + break; + message.remoteState = reader.stringVerify(); + message._remote_state = "remoteState"; + continue; + } + case 9: { + if (wireType !== 2) + break; + if (!(message.localOnly && message.localOnly.length)) + message.localOnly = []; + message.localOnly.push(reader.stringVerify()); + continue; + } + case 10: { + if (wireType !== 2) + break; + if (!(message.downloads && message.downloads.length)) + message.downloads = []; + message.downloads.push($root.atomic.PullDownload.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 11: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.changesDownloaded = value; + else + delete message.changesDownloaded; + continue; + } + case 12: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.bytesTransferred = value; + else + delete message.bytesTransferred; + continue; + } + case 13: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.applied = value; + else + delete message.applied; + continue; + } + case 14: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.appliedChanges = value; + else + delete message.appliedChanges; + continue; + } + case 15: { + if (wireType !== 2) + break; + if (!(message.applyErrors && message.applyErrors.length)) + message.applyErrors = []; + message.applyErrors.push(reader.stringVerify()); + continue; + } + case 16: { + if (wireType !== 2) + break; + if (!(message.sidecars && message.sidecars.length)) + message.sidecars = []; + message.sidecars.push($root.atomic.PullSidecar.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 17: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.setIdVerified = value; + else + delete message.setIdVerified; + continue; + } + case 18: { + if (wireType !== 2) + break; + message.setIdWarning = reader.stringVerify(); + message._set_id_warning = "setIdWarning"; + continue; + } + case 19: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.materialized = value; + else + delete message.materialized; + continue; + } + case 20: { + 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 21: { + if (wireType !== 2) + break; + message.materializeError = reader.stringVerify(); + message._materialize_error = "materializeError"; + continue; + } + case 22: { + if (wireType !== 2) + break; + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.atomic.PullTag.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 23: { + if (wireType !== 2) + break; + if (!(message.warnings && message.warnings.length)) + message.warnings = []; + message.warnings.push($root.atomic.PullWarning.decode(reader, reader.size(), $undefined, _depth + 1)); + continue; + } + case 24: { + if (wireType !== 2) + break; + message.localTip = reader.stringVerify(); + message._local_tip = "localTip"; + continue; + } + case 25: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.vaultBootstrapped = value; + else + delete message.vaultBootstrapped; + continue; + } + case 26: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.reconciledViews = value; + else + delete message.reconciledViews; + continue; + } + case 27: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.downloadOnly = value; + else + delete message.downloadOnly; + continue; + } + case 28: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.changesFailed = value; + else + delete message.changesFailed; + 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 PullReport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PullReport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PullReport & atomic.PullReport.$Shape} PullReport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullReport.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PullReport message. + * @function verify + * @memberof atomic.PullReport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullReport.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.remoteName != null && $Object.hasOwnProperty.call(message, "remoteName")) + if (!$util.isString(message.remoteName)) + return "remoteName: string expected"; + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) + if (!$util.isString(message.remoteUrl)) + return "remoteUrl: string expected"; + if (message.remoteView != null && $Object.hasOwnProperty.call(message, "remoteView")) + if (!$util.isString(message.remoteView)) + return "remoteView: string expected"; + if (message.localView != null && $Object.hasOwnProperty.call(message, "localView")) + if (!$util.isString(message.localView)) + return "localView: string expected"; + if (message.localViewChanges != null && $Object.hasOwnProperty.call(message, "localViewChanges")) + if (!$util.isInteger(message.localViewChanges) && !(message.localViewChanges && $util.isInteger(message.localViewChanges.low) && $util.isInteger(message.localViewChanges.high))) + return "localViewChanges: integer|Long expected"; + if (message.graphObjects != null && $Object.hasOwnProperty.call(message, "graphObjects")) + if (!$util.isInteger(message.graphObjects) && !(message.graphObjects && $util.isInteger(message.graphObjects.low) && $util.isInteger(message.graphObjects.high))) + return "graphObjects: integer|Long expected"; + if (message.remoteChanges != null && $Object.hasOwnProperty.call(message, "remoteChanges")) + if (!$util.isInteger(message.remoteChanges) && !(message.remoteChanges && $util.isInteger(message.remoteChanges.low) && $util.isInteger(message.remoteChanges.high))) + return "remoteChanges: integer|Long expected"; + if (message.remoteState != null && $Object.hasOwnProperty.call(message, "remoteState")) { + properties._remote_state = 1; + if (!$util.isString(message.remoteState)) + return "remoteState: string expected"; + } + if (message.localOnly != null && $Object.hasOwnProperty.call(message, "localOnly")) { + if (!$Array.isArray(message.localOnly)) + return "localOnly: array expected"; + for (var i = 0; i < message.localOnly.length; ++i) + if (!$util.isString(message.localOnly[i])) + return "localOnly: string[] expected"; + } + if (message.downloads != null && $Object.hasOwnProperty.call(message, "downloads")) { + if (!$Array.isArray(message.downloads)) + return "downloads: array expected"; + for (var i = 0; i < message.downloads.length; ++i) { + var error = $root.atomic.PullDownload.verify(message.downloads[i], _depth + 1); + if (error) + return "downloads." + error; + } + } + if (message.changesDownloaded != null && $Object.hasOwnProperty.call(message, "changesDownloaded")) + if (!$util.isInteger(message.changesDownloaded) && !(message.changesDownloaded && $util.isInteger(message.changesDownloaded.low) && $util.isInteger(message.changesDownloaded.high))) + return "changesDownloaded: integer|Long expected"; + if (message.bytesTransferred != null && $Object.hasOwnProperty.call(message, "bytesTransferred")) + if (!$util.isInteger(message.bytesTransferred) && !(message.bytesTransferred && $util.isInteger(message.bytesTransferred.low) && $util.isInteger(message.bytesTransferred.high))) + return "bytesTransferred: integer|Long expected"; + if (message.applied != null && $Object.hasOwnProperty.call(message, "applied")) + if (typeof message.applied !== "boolean") + return "applied: boolean expected"; + if (message.appliedChanges != null && $Object.hasOwnProperty.call(message, "appliedChanges")) + if (!$util.isInteger(message.appliedChanges) && !(message.appliedChanges && $util.isInteger(message.appliedChanges.low) && $util.isInteger(message.appliedChanges.high))) + return "appliedChanges: integer|Long expected"; + if (message.applyErrors != null && $Object.hasOwnProperty.call(message, "applyErrors")) { + if (!$Array.isArray(message.applyErrors)) + return "applyErrors: array expected"; + for (var i = 0; i < message.applyErrors.length; ++i) + if (!$util.isString(message.applyErrors[i])) + return "applyErrors: string[] expected"; + } + if (message.sidecars != null && $Object.hasOwnProperty.call(message, "sidecars")) { + if (!$Array.isArray(message.sidecars)) + return "sidecars: array expected"; + for (var i = 0; i < message.sidecars.length; ++i) { + var error = $root.atomic.PullSidecar.verify(message.sidecars[i], _depth + 1); + if (error) + return "sidecars." + error; + } + } + if (message.setIdVerified != null && $Object.hasOwnProperty.call(message, "setIdVerified")) + if (typeof message.setIdVerified !== "boolean") + return "setIdVerified: boolean expected"; + if (message.setIdWarning != null && $Object.hasOwnProperty.call(message, "setIdWarning")) { + properties._set_id_warning = 1; + if (!$util.isString(message.setIdWarning)) + return "setIdWarning: string expected"; + } + if (message.materialized != null && $Object.hasOwnProperty.call(message, "materialized")) + if (typeof message.materialized !== "boolean") + return "materialized: boolean expected"; + 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.materializeError != null && $Object.hasOwnProperty.call(message, "materializeError")) { + properties._materialize_error = 1; + if (!$util.isString(message.materializeError)) + return "materializeError: string expected"; + } + if (message.tags != null && $Object.hasOwnProperty.call(message, "tags")) { + if (!$Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.atomic.PullTag.verify(message.tags[i], _depth + 1); + if (error) + return "tags." + 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) { + var error = $root.atomic.PullWarning.verify(message.warnings[i], _depth + 1); + if (error) + return "warnings." + error; + } + } + if (message.localTip != null && $Object.hasOwnProperty.call(message, "localTip")) { + properties._local_tip = 1; + if (!$util.isString(message.localTip)) + return "localTip: string expected"; + } + if (message.vaultBootstrapped != null && $Object.hasOwnProperty.call(message, "vaultBootstrapped")) + if (typeof message.vaultBootstrapped !== "boolean") + return "vaultBootstrapped: boolean expected"; + if (message.reconciledViews != null && $Object.hasOwnProperty.call(message, "reconciledViews")) + if (!$util.isInteger(message.reconciledViews) && !(message.reconciledViews && $util.isInteger(message.reconciledViews.low) && $util.isInteger(message.reconciledViews.high))) + return "reconciledViews: integer|Long expected"; + if (message.downloadOnly != null && $Object.hasOwnProperty.call(message, "downloadOnly")) + if (typeof message.downloadOnly !== "boolean") + return "downloadOnly: boolean expected"; + if (message.changesFailed != null && $Object.hasOwnProperty.call(message, "changesFailed")) + if (!$util.isInteger(message.changesFailed) && !(message.changesFailed && $util.isInteger(message.changesFailed.low) && $util.isInteger(message.changesFailed.high))) + return "changesFailed: integer|Long expected"; + return null; + }; + + /** + * Creates a PullReport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PullReport + * @static + * @param {Object.} object Plain object + * @returns {atomic.PullReport} PullReport + */ + PullReport.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PullReport) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PullReport: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PullReport(); + if (object.remoteName != null) + if (typeof object.remoteName !== "string" || object.remoteName.length) + message.remoteName = $String(object.remoteName); + if (object.remoteUrl != null) + if (typeof object.remoteUrl !== "string" || object.remoteUrl.length) + message.remoteUrl = $String(object.remoteUrl); + if (object.remoteView != null) + if (typeof object.remoteView !== "string" || object.remoteView.length) + message.remoteView = $String(object.remoteView); + if (object.localView != null) + if (typeof object.localView !== "string" || object.localView.length) + message.localView = $String(object.localView); + if (object.localViewChanges != null) + if (typeof object.localViewChanges === "object" ? object.localViewChanges.low || object.localViewChanges.high : $Number(object.localViewChanges) !== 0) + if ($util.Long) + message.localViewChanges = $util.Long.fromValue(object.localViewChanges, true); + else if (typeof object.localViewChanges === "string") + message.localViewChanges = $parseInt(object.localViewChanges, 10); + else if (typeof object.localViewChanges === "number") + message.localViewChanges = object.localViewChanges; + else if (typeof object.localViewChanges === "object") + message.localViewChanges = new $util.LongBits(object.localViewChanges.low >>> 0, object.localViewChanges.high >>> 0).toNumber(true); + if (object.graphObjects != null) + if (typeof object.graphObjects === "object" ? object.graphObjects.low || object.graphObjects.high : $Number(object.graphObjects) !== 0) + if ($util.Long) + message.graphObjects = $util.Long.fromValue(object.graphObjects, true); + else if (typeof object.graphObjects === "string") + message.graphObjects = $parseInt(object.graphObjects, 10); + else if (typeof object.graphObjects === "number") + message.graphObjects = object.graphObjects; + else if (typeof object.graphObjects === "object") + message.graphObjects = new $util.LongBits(object.graphObjects.low >>> 0, object.graphObjects.high >>> 0).toNumber(true); + if (object.remoteChanges != null) + if (typeof object.remoteChanges === "object" ? object.remoteChanges.low || object.remoteChanges.high : $Number(object.remoteChanges) !== 0) + if ($util.Long) + message.remoteChanges = $util.Long.fromValue(object.remoteChanges, true); + else if (typeof object.remoteChanges === "string") + message.remoteChanges = $parseInt(object.remoteChanges, 10); + else if (typeof object.remoteChanges === "number") + message.remoteChanges = object.remoteChanges; + else if (typeof object.remoteChanges === "object") + message.remoteChanges = new $util.LongBits(object.remoteChanges.low >>> 0, object.remoteChanges.high >>> 0).toNumber(true); + if (object.remoteState != null) + message.remoteState = $String(object.remoteState); + if (object.localOnly) { + if (!$Array.isArray(object.localOnly)) + throw $TypeError(".atomic.PullReport.localOnly: array expected"); + message.localOnly = $Array(object.localOnly.length); + for (var i = 0; i < object.localOnly.length; ++i) + message.localOnly[i] = $String(object.localOnly[i]); + } + if (object.downloads) { + if (!$Array.isArray(object.downloads)) + throw $TypeError(".atomic.PullReport.downloads: array expected"); + message.downloads = $Array(object.downloads.length); + for (var i = 0; i < object.downloads.length; ++i) { + if (!$util.isObject(object.downloads[i])) + throw $TypeError(".atomic.PullReport.downloads: object expected"); + message.downloads[i] = $root.atomic.PullDownload.fromObject(object.downloads[i], _depth + 1); + } + } + if (object.changesDownloaded != null) + if (typeof object.changesDownloaded === "object" ? object.changesDownloaded.low || object.changesDownloaded.high : $Number(object.changesDownloaded) !== 0) + if ($util.Long) + message.changesDownloaded = $util.Long.fromValue(object.changesDownloaded, true); + else if (typeof object.changesDownloaded === "string") + message.changesDownloaded = $parseInt(object.changesDownloaded, 10); + else if (typeof object.changesDownloaded === "number") + message.changesDownloaded = object.changesDownloaded; + else if (typeof object.changesDownloaded === "object") + message.changesDownloaded = new $util.LongBits(object.changesDownloaded.low >>> 0, object.changesDownloaded.high >>> 0).toNumber(true); + if (object.bytesTransferred != null) + if (typeof object.bytesTransferred === "object" ? object.bytesTransferred.low || object.bytesTransferred.high : $Number(object.bytesTransferred) !== 0) + if ($util.Long) + message.bytesTransferred = $util.Long.fromValue(object.bytesTransferred, true); + else if (typeof object.bytesTransferred === "string") + message.bytesTransferred = $parseInt(object.bytesTransferred, 10); + else if (typeof object.bytesTransferred === "number") + message.bytesTransferred = object.bytesTransferred; + else if (typeof object.bytesTransferred === "object") + message.bytesTransferred = new $util.LongBits(object.bytesTransferred.low >>> 0, object.bytesTransferred.high >>> 0).toNumber(true); + if (object.applied != null) + if (object.applied) + message.applied = $Boolean(object.applied); + if (object.appliedChanges != null) + if (typeof object.appliedChanges === "object" ? object.appliedChanges.low || object.appliedChanges.high : $Number(object.appliedChanges) !== 0) + if ($util.Long) + message.appliedChanges = $util.Long.fromValue(object.appliedChanges, true); + else if (typeof object.appliedChanges === "string") + message.appliedChanges = $parseInt(object.appliedChanges, 10); + else if (typeof object.appliedChanges === "number") + message.appliedChanges = object.appliedChanges; + else if (typeof object.appliedChanges === "object") + message.appliedChanges = new $util.LongBits(object.appliedChanges.low >>> 0, object.appliedChanges.high >>> 0).toNumber(true); + if (object.applyErrors) { + if (!$Array.isArray(object.applyErrors)) + throw $TypeError(".atomic.PullReport.applyErrors: array expected"); + message.applyErrors = $Array(object.applyErrors.length); + for (var i = 0; i < object.applyErrors.length; ++i) + message.applyErrors[i] = $String(object.applyErrors[i]); + } + if (object.sidecars) { + if (!$Array.isArray(object.sidecars)) + throw $TypeError(".atomic.PullReport.sidecars: array expected"); + message.sidecars = $Array(object.sidecars.length); + for (var i = 0; i < object.sidecars.length; ++i) { + if (!$util.isObject(object.sidecars[i])) + throw $TypeError(".atomic.PullReport.sidecars: object expected"); + message.sidecars[i] = $root.atomic.PullSidecar.fromObject(object.sidecars[i], _depth + 1); + } + } + if (object.setIdVerified != null) + if (object.setIdVerified) + message.setIdVerified = $Boolean(object.setIdVerified); + if (object.setIdWarning != null) + message.setIdWarning = $String(object.setIdWarning); + if (object.materialized != null) + if (object.materialized) + message.materialized = $Boolean(object.materialized); + 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.materializeError != null) + message.materializeError = $String(object.materializeError); + if (object.tags) { + if (!$Array.isArray(object.tags)) + throw $TypeError(".atomic.PullReport.tags: array expected"); + message.tags = $Array(object.tags.length); + for (var i = 0; i < object.tags.length; ++i) { + if (!$util.isObject(object.tags[i])) + throw $TypeError(".atomic.PullReport.tags: object expected"); + message.tags[i] = $root.atomic.PullTag.fromObject(object.tags[i], _depth + 1); + } + } + if (object.warnings) { + if (!$Array.isArray(object.warnings)) + throw $TypeError(".atomic.PullReport.warnings: array expected"); + message.warnings = $Array(object.warnings.length); + for (var i = 0; i < object.warnings.length; ++i) { + if (!$util.isObject(object.warnings[i])) + throw $TypeError(".atomic.PullReport.warnings: object expected"); + message.warnings[i] = $root.atomic.PullWarning.fromObject(object.warnings[i], _depth + 1); + } + } + if (object.localTip != null) + message.localTip = $String(object.localTip); + if (object.vaultBootstrapped != null) + if (object.vaultBootstrapped) + message.vaultBootstrapped = $Boolean(object.vaultBootstrapped); + if (object.reconciledViews != null) + if (typeof object.reconciledViews === "object" ? object.reconciledViews.low || object.reconciledViews.high : $Number(object.reconciledViews) !== 0) + if ($util.Long) + message.reconciledViews = $util.Long.fromValue(object.reconciledViews, true); + else if (typeof object.reconciledViews === "string") + message.reconciledViews = $parseInt(object.reconciledViews, 10); + else if (typeof object.reconciledViews === "number") + message.reconciledViews = object.reconciledViews; + else if (typeof object.reconciledViews === "object") + message.reconciledViews = new $util.LongBits(object.reconciledViews.low >>> 0, object.reconciledViews.high >>> 0).toNumber(true); + if (object.downloadOnly != null) + if (object.downloadOnly) + message.downloadOnly = $Boolean(object.downloadOnly); + if (object.changesFailed != null) + if (typeof object.changesFailed === "object" ? object.changesFailed.low || object.changesFailed.high : $Number(object.changesFailed) !== 0) + if ($util.Long) + message.changesFailed = $util.Long.fromValue(object.changesFailed, true); + else if (typeof object.changesFailed === "string") + message.changesFailed = $parseInt(object.changesFailed, 10); + else if (typeof object.changesFailed === "number") + message.changesFailed = object.changesFailed; + else if (typeof object.changesFailed === "object") + message.changesFailed = new $util.LongBits(object.changesFailed.low >>> 0, object.changesFailed.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a PullReport message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PullReport + * @static + * @param {atomic.PullReport} message PullReport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullReport.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.localOnly = []; + object.downloads = []; + object.applyErrors = []; + object.sidecars = []; + object.tags = []; + object.warnings = []; + } + if (options.defaults) { + object.remoteName = ""; + object.remoteUrl = ""; + object.remoteView = ""; + object.localView = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.localViewChanges = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.localViewChanges = 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.graphObjects = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.graphObjects = 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.remoteChanges = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.remoteChanges = 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.changesDownloaded = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.changesDownloaded = 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.bytesTransferred = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.bytesTransferred = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.applied = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.appliedChanges = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.appliedChanges = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.setIdVerified = false; + object.materialized = false; + 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.vaultBootstrapped = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.reconciledViews = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.reconciledViews = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + object.downloadOnly = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.changesFailed = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.changesFailed = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + if (message.remoteName != null && $Object.hasOwnProperty.call(message, "remoteName")) + object.remoteName = message.remoteName; + if (message.remoteUrl != null && $Object.hasOwnProperty.call(message, "remoteUrl")) + object.remoteUrl = message.remoteUrl; + if (message.remoteView != null && $Object.hasOwnProperty.call(message, "remoteView")) + object.remoteView = message.remoteView; + if (message.localView != null && $Object.hasOwnProperty.call(message, "localView")) + object.localView = message.localView; + if (message.localViewChanges != null && $Object.hasOwnProperty.call(message, "localViewChanges")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.localViewChanges = typeof message.localViewChanges === "number" ? $BigInt(message.localViewChanges) : $util.Long.fromBits(message.localViewChanges.low >>> 0, message.localViewChanges.high >>> 0, true).toBigInt(); + else if (typeof message.localViewChanges === "number") + object.localViewChanges = options.longs === $String ? $String(message.localViewChanges) : message.localViewChanges; + else + object.localViewChanges = options.longs === $String ? $util.Long.prototype.toString.call(message.localViewChanges) : options.longs === $Number ? new $util.LongBits(message.localViewChanges.low >>> 0, message.localViewChanges.high >>> 0).toNumber(true) : message.localViewChanges; + if (message.graphObjects != null && $Object.hasOwnProperty.call(message, "graphObjects")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.graphObjects = typeof message.graphObjects === "number" ? $BigInt(message.graphObjects) : $util.Long.fromBits(message.graphObjects.low >>> 0, message.graphObjects.high >>> 0, true).toBigInt(); + else if (typeof message.graphObjects === "number") + object.graphObjects = options.longs === $String ? $String(message.graphObjects) : message.graphObjects; + else + object.graphObjects = options.longs === $String ? $util.Long.prototype.toString.call(message.graphObjects) : options.longs === $Number ? new $util.LongBits(message.graphObjects.low >>> 0, message.graphObjects.high >>> 0).toNumber(true) : message.graphObjects; + if (message.remoteChanges != null && $Object.hasOwnProperty.call(message, "remoteChanges")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.remoteChanges = typeof message.remoteChanges === "number" ? $BigInt(message.remoteChanges) : $util.Long.fromBits(message.remoteChanges.low >>> 0, message.remoteChanges.high >>> 0, true).toBigInt(); + else if (typeof message.remoteChanges === "number") + object.remoteChanges = options.longs === $String ? $String(message.remoteChanges) : message.remoteChanges; + else + object.remoteChanges = options.longs === $String ? $util.Long.prototype.toString.call(message.remoteChanges) : options.longs === $Number ? new $util.LongBits(message.remoteChanges.low >>> 0, message.remoteChanges.high >>> 0).toNumber(true) : message.remoteChanges; + if (message.remoteState != null && $Object.hasOwnProperty.call(message, "remoteState")) + object.remoteState = message.remoteState; + if (message.localOnly && message.localOnly.length) { + object.localOnly = $Array(message.localOnly.length); + for (var j = 0; j < message.localOnly.length; ++j) + object.localOnly[j] = message.localOnly[j]; + } + if (message.downloads && message.downloads.length) { + object.downloads = $Array(message.downloads.length); + for (var j = 0; j < message.downloads.length; ++j) + object.downloads[j] = $root.atomic.PullDownload.toObject(message.downloads[j], options, _depth + 1); + } + if (message.changesDownloaded != null && $Object.hasOwnProperty.call(message, "changesDownloaded")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.changesDownloaded = typeof message.changesDownloaded === "number" ? $BigInt(message.changesDownloaded) : $util.Long.fromBits(message.changesDownloaded.low >>> 0, message.changesDownloaded.high >>> 0, true).toBigInt(); + else if (typeof message.changesDownloaded === "number") + object.changesDownloaded = options.longs === $String ? $String(message.changesDownloaded) : message.changesDownloaded; + else + object.changesDownloaded = options.longs === $String ? $util.Long.prototype.toString.call(message.changesDownloaded) : options.longs === $Number ? new $util.LongBits(message.changesDownloaded.low >>> 0, message.changesDownloaded.high >>> 0).toNumber(true) : message.changesDownloaded; + if (message.bytesTransferred != null && $Object.hasOwnProperty.call(message, "bytesTransferred")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.bytesTransferred = typeof message.bytesTransferred === "number" ? $BigInt(message.bytesTransferred) : $util.Long.fromBits(message.bytesTransferred.low >>> 0, message.bytesTransferred.high >>> 0, true).toBigInt(); + else if (typeof message.bytesTransferred === "number") + object.bytesTransferred = options.longs === $String ? $String(message.bytesTransferred) : message.bytesTransferred; + else + object.bytesTransferred = options.longs === $String ? $util.Long.prototype.toString.call(message.bytesTransferred) : options.longs === $Number ? new $util.LongBits(message.bytesTransferred.low >>> 0, message.bytesTransferred.high >>> 0).toNumber(true) : message.bytesTransferred; + if (message.applied != null && $Object.hasOwnProperty.call(message, "applied")) + object.applied = message.applied; + if (message.appliedChanges != null && $Object.hasOwnProperty.call(message, "appliedChanges")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.appliedChanges = typeof message.appliedChanges === "number" ? $BigInt(message.appliedChanges) : $util.Long.fromBits(message.appliedChanges.low >>> 0, message.appliedChanges.high >>> 0, true).toBigInt(); + else if (typeof message.appliedChanges === "number") + object.appliedChanges = options.longs === $String ? $String(message.appliedChanges) : message.appliedChanges; + else + object.appliedChanges = options.longs === $String ? $util.Long.prototype.toString.call(message.appliedChanges) : options.longs === $Number ? new $util.LongBits(message.appliedChanges.low >>> 0, message.appliedChanges.high >>> 0).toNumber(true) : message.appliedChanges; + if (message.applyErrors && message.applyErrors.length) { + object.applyErrors = $Array(message.applyErrors.length); + for (var j = 0; j < message.applyErrors.length; ++j) + object.applyErrors[j] = message.applyErrors[j]; + } + if (message.sidecars && message.sidecars.length) { + object.sidecars = $Array(message.sidecars.length); + for (var j = 0; j < message.sidecars.length; ++j) + object.sidecars[j] = $root.atomic.PullSidecar.toObject(message.sidecars[j], options, _depth + 1); + } + if (message.setIdVerified != null && $Object.hasOwnProperty.call(message, "setIdVerified")) + object.setIdVerified = message.setIdVerified; + if (message.setIdWarning != null && $Object.hasOwnProperty.call(message, "setIdWarning")) + object.setIdWarning = message.setIdWarning; + if (message.materialized != null && $Object.hasOwnProperty.call(message, "materialized")) + object.materialized = message.materialized; + 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.materializeError != null && $Object.hasOwnProperty.call(message, "materializeError")) + object.materializeError = message.materializeError; + if (message.tags && message.tags.length) { + object.tags = $Array(message.tags.length); + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.atomic.PullTag.toObject(message.tags[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] = $root.atomic.PullWarning.toObject(message.warnings[j], options, _depth + 1); + } + if (message.localTip != null && $Object.hasOwnProperty.call(message, "localTip")) + object.localTip = message.localTip; + if (message.vaultBootstrapped != null && $Object.hasOwnProperty.call(message, "vaultBootstrapped")) + object.vaultBootstrapped = message.vaultBootstrapped; + if (message.reconciledViews != null && $Object.hasOwnProperty.call(message, "reconciledViews")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.reconciledViews = typeof message.reconciledViews === "number" ? $BigInt(message.reconciledViews) : $util.Long.fromBits(message.reconciledViews.low >>> 0, message.reconciledViews.high >>> 0, true).toBigInt(); + else if (typeof message.reconciledViews === "number") + object.reconciledViews = options.longs === $String ? $String(message.reconciledViews) : message.reconciledViews; + else + object.reconciledViews = options.longs === $String ? $util.Long.prototype.toString.call(message.reconciledViews) : options.longs === $Number ? new $util.LongBits(message.reconciledViews.low >>> 0, message.reconciledViews.high >>> 0).toNumber(true) : message.reconciledViews; + if (message.downloadOnly != null && $Object.hasOwnProperty.call(message, "downloadOnly")) + object.downloadOnly = message.downloadOnly; + if (message.changesFailed != null && $Object.hasOwnProperty.call(message, "changesFailed")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.changesFailed = typeof message.changesFailed === "number" ? $BigInt(message.changesFailed) : $util.Long.fromBits(message.changesFailed.low >>> 0, message.changesFailed.high >>> 0, true).toBigInt(); + else if (typeof message.changesFailed === "number") + object.changesFailed = options.longs === $String ? $String(message.changesFailed) : message.changesFailed; + else + object.changesFailed = options.longs === $String ? $util.Long.prototype.toString.call(message.changesFailed) : options.longs === $Number ? new $util.LongBits(message.changesFailed.low >>> 0, message.changesFailed.high >>> 0).toNumber(true) : message.changesFailed; + return object; + }; + + /** + * Converts this PullReport to JSON. + * @function toJSON + * @memberof atomic.PullReport + * @instance + * @returns {Object.} JSON object + */ + PullReport.prototype.toJSON = function() { + return PullReport.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PullReport + * @function getTypeUrl + * @memberof atomic.PullReport + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PullReport.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PullReport"; + }; + + return PullReport; + })(); + + atomic.PullDownload = (function() { + + /** + * Properties of a PullDownload. + * @typedef {Object} atomic.PullDownload.$Properties + * @property {atomic.Hash.$Properties|null} [hash] PullDownload hash + * @property {string|null} [message] PullDownload message + * @property {boolean|null} [ok] PullDownload ok + * @property {string|null} [error] PullDownload error + * @property {number|Long|null} [index] PullDownload index + * @property {number|Long|null} [total] PullDownload total + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PullDownload. + * @memberof atomic + * @interface IPullDownload + * @augments atomic.PullDownload.$Properties + * @deprecated Use atomic.PullDownload.$Properties instead. + */ + + /** + * Shape of a PullDownload. + * @typedef {atomic.PullDownload.$Properties} atomic.PullDownload.$Shape + */ + + /** + * Constructs a new PullDownload. + * @memberof atomic + * @classdesc Represents a PullDownload. + * @constructor + * @param {atomic.PullDownload.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PullDownload = 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]]; + }; + + /** + * PullDownload hash. + * @member {atomic.Hash.$Properties|null|undefined} hash + * @memberof atomic.PullDownload + * @instance + */ + PullDownload.prototype.hash = null; + + /** + * PullDownload message. + * @member {string|null|undefined} message + * @memberof atomic.PullDownload + * @instance + */ + PullDownload.prototype.message = null; + + /** + * PullDownload ok. + * @member {boolean} ok + * @memberof atomic.PullDownload + * @instance + */ + PullDownload.prototype.ok = false; + + /** + * PullDownload error. + * @member {string|null|undefined} error + * @memberof atomic.PullDownload + * @instance + */ + PullDownload.prototype.error = null; + + /** + * PullDownload index. + * @member {number|Long} index + * @memberof atomic.PullDownload + * @instance + */ + PullDownload.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullDownload total. + * @member {number|Long} total + * @memberof atomic.PullDownload + * @instance + */ + PullDownload.prototype.total = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullDownload.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullDownload.prototype, "_error", { + get: $util.oneOfGetter($oneOfFields = ["error"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PullDownload instance using the specified properties. + * @function create + * @memberof atomic.PullDownload + * @static + * @param {atomic.PullDownload.$Properties=} [properties] Properties to set + * @returns {atomic.PullDownload} PullDownload instance + * @type {{ + * (properties: atomic.PullDownload.$Shape): atomic.PullDownload & atomic.PullDownload.$Shape; + * (properties?: atomic.PullDownload.$Properties): atomic.PullDownload; + * }} + */ + PullDownload.create = function(properties) { + return new PullDownload(properties); + }; + + /** + * Encodes the specified PullDownload message. Does not implicitly {@link atomic.PullDownload.verify|verify} messages. + * @function encode + * @memberof atomic.PullDownload + * @static + * @param {atomic.PullDownload.$Properties} message PullDownload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullDownload.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.ok != null && $Object.hasOwnProperty.call(message, "ok") && message.ok !== false) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ok); + if (message.error != null && $Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.error); + if (message.index != null && $Object.hasOwnProperty.call(message, "index") && (typeof message.index === "object" ? message.index.low || message.index.high : message.index !== 0)) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.index); + if (message.total != null && $Object.hasOwnProperty.call(message, "total") && (typeof message.total === "object" ? message.total.low || message.total.high : message.total !== 0)) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.total); + 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 PullDownload message, length delimited. Does not implicitly {@link atomic.PullDownload.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PullDownload + * @static + * @param {atomic.PullDownload.$Properties} message PullDownload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullDownload.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PullDownload message from the specified reader or buffer. + * @function decode + * @memberof atomic.PullDownload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PullDownload & atomic.PullDownload.$Shape} PullDownload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullDownload.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.PullDownload(); + 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 !== 0) + break; + if (value = reader.bool()) + message.ok = value; + else + delete message.ok; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.error = reader.stringVerify(); + message._error = "error"; + continue; + } + case 5: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.index = value; + else + delete message.index; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.total = value; + else + delete message.total; + 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 PullDownload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PullDownload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PullDownload & atomic.PullDownload.$Shape} PullDownload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullDownload.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PullDownload message. + * @function verify + * @memberof atomic.PullDownload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullDownload.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.ok != null && $Object.hasOwnProperty.call(message, "ok")) + if (typeof message.ok !== "boolean") + return "ok: boolean expected"; + if (message.error != null && $Object.hasOwnProperty.call(message, "error")) { + properties._error = 1; + if (!$util.isString(message.error)) + return "error: string expected"; + } + if (message.index != null && $Object.hasOwnProperty.call(message, "index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.total != null && $Object.hasOwnProperty.call(message, "total")) + if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) + return "total: integer|Long expected"; + return null; + }; + + /** + * Creates a PullDownload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PullDownload + * @static + * @param {Object.} object Plain object + * @returns {atomic.PullDownload} PullDownload + */ + PullDownload.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PullDownload) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PullDownload: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PullDownload(); + if (object.hash != null) { + if (!$util.isObject(object.hash)) + throw $TypeError(".atomic.PullDownload.hash: object expected"); + message.hash = $root.atomic.Hash.fromObject(object.hash, _depth + 1); + } + if (object.message != null) + message.message = $String(object.message); + if (object.ok != null) + if (object.ok) + message.ok = $Boolean(object.ok); + if (object.error != null) + message.error = $String(object.error); + if (object.index != null) + if (typeof object.index === "object" ? object.index.low || object.index.high : $Number(object.index) !== 0) + if ($util.Long) + message.index = $util.Long.fromValue(object.index, true); + else if (typeof object.index === "string") + message.index = $parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(true); + if (object.total != null) + if (typeof object.total === "object" ? object.total.low || object.total.high : $Number(object.total) !== 0) + if ($util.Long) + message.total = $util.Long.fromValue(object.total, true); + else if (typeof object.total === "string") + message.total = $parseInt(object.total, 10); + else if (typeof object.total === "number") + message.total = object.total; + else if (typeof object.total === "object") + message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a PullDownload message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PullDownload + * @static + * @param {atomic.PullDownload} message PullDownload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullDownload.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.hash = null; + object.ok = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.index = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.index = 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.total = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.total = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + 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.ok != null && $Object.hasOwnProperty.call(message, "ok")) + object.ok = message.ok; + if (message.error != null && $Object.hasOwnProperty.call(message, "error")) + object.error = message.error; + if (message.index != null && $Object.hasOwnProperty.call(message, "index")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.index = typeof message.index === "number" ? $BigInt(message.index) : $util.Long.fromBits(message.index.low >>> 0, message.index.high >>> 0, true).toBigInt(); + else if (typeof message.index === "number") + object.index = options.longs === $String ? $String(message.index) : message.index; + else + object.index = options.longs === $String ? $util.Long.prototype.toString.call(message.index) : options.longs === $Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber(true) : message.index; + if (message.total != null && $Object.hasOwnProperty.call(message, "total")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.total = typeof message.total === "number" ? $BigInt(message.total) : $util.Long.fromBits(message.total.low >>> 0, message.total.high >>> 0, true).toBigInt(); + else if (typeof message.total === "number") + object.total = options.longs === $String ? $String(message.total) : message.total; + else + object.total = options.longs === $String ? $util.Long.prototype.toString.call(message.total) : options.longs === $Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber(true) : message.total; + return object; + }; + + /** + * Converts this PullDownload to JSON. + * @function toJSON + * @memberof atomic.PullDownload + * @instance + * @returns {Object.} JSON object + */ + PullDownload.prototype.toJSON = function() { + return PullDownload.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PullDownload + * @function getTypeUrl + * @memberof atomic.PullDownload + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PullDownload.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PullDownload"; + }; + + return PullDownload; + })(); + + atomic.PullSidecar = (function() { + + /** + * Properties of a PullSidecar. + * @typedef {Object} atomic.PullSidecar.$Properties + * @property {string|null} [kind] PullSidecar kind + * @property {number|Long|null} [count] PullSidecar count + * @property {string|null} [detail] PullSidecar detail + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PullSidecar. + * @memberof atomic + * @interface IPullSidecar + * @augments atomic.PullSidecar.$Properties + * @deprecated Use atomic.PullSidecar.$Properties instead. + */ + + /** + * Shape of a PullSidecar. + * @typedef {atomic.PullSidecar.$Properties} atomic.PullSidecar.$Shape + */ + + /** + * Constructs a new PullSidecar. + * @memberof atomic + * @classdesc Represents a PullSidecar. + * @constructor + * @param {atomic.PullSidecar.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PullSidecar = 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]]; + }; + + /** + * PullSidecar kind. + * @member {string} kind + * @memberof atomic.PullSidecar + * @instance + */ + PullSidecar.prototype.kind = ""; + + /** + * PullSidecar count. + * @member {number|Long} count + * @memberof atomic.PullSidecar + * @instance + */ + PullSidecar.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PullSidecar detail. + * @member {string|null|undefined} detail + * @memberof atomic.PullSidecar + * @instance + */ + PullSidecar.prototype.detail = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(PullSidecar.prototype, "_detail", { + get: $util.oneOfGetter($oneOfFields = ["detail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PullSidecar instance using the specified properties. + * @function create + * @memberof atomic.PullSidecar + * @static + * @param {atomic.PullSidecar.$Properties=} [properties] Properties to set + * @returns {atomic.PullSidecar} PullSidecar instance + * @type {{ + * (properties: atomic.PullSidecar.$Shape): atomic.PullSidecar & atomic.PullSidecar.$Shape; + * (properties?: atomic.PullSidecar.$Properties): atomic.PullSidecar; + * }} + */ + PullSidecar.create = function(properties) { + return new PullSidecar(properties); + }; + + /** + * Encodes the specified PullSidecar message. Does not implicitly {@link atomic.PullSidecar.verify|verify} messages. + * @function encode + * @memberof atomic.PullSidecar + * @static + * @param {atomic.PullSidecar.$Properties} message PullSidecar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullSidecar.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 !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.count != null && $Object.hasOwnProperty.call(message, "count") && (typeof message.count === "object" ? message.count.low || message.count.high : message.count !== 0)) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.count); + if (message.detail != null && $Object.hasOwnProperty.call(message, "detail")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.detail); + 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 PullSidecar message, length delimited. Does not implicitly {@link atomic.PullSidecar.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PullSidecar + * @static + * @param {atomic.PullSidecar.$Properties} message PullSidecar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullSidecar.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PullSidecar message from the specified reader or buffer. + * @function decode + * @memberof atomic.PullSidecar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PullSidecar & atomic.PullSidecar.$Shape} PullSidecar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullSidecar.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.PullSidecar(); + 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.kind = value; + else + delete message.kind; + continue; + } + case 2: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.count = value; + else + delete message.count; + continue; + } + case 3: { + if (wireType !== 2) + break; + message.detail = reader.stringVerify(); + message._detail = "detail"; + 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 PullSidecar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PullSidecar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PullSidecar & atomic.PullSidecar.$Shape} PullSidecar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullSidecar.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PullSidecar message. + * @function verify + * @memberof atomic.PullSidecar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullSidecar.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 (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.count != null && $Object.hasOwnProperty.call(message, "count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.detail != null && $Object.hasOwnProperty.call(message, "detail")) { + properties._detail = 1; + if (!$util.isString(message.detail)) + return "detail: string expected"; + } + return null; + }; + + /** + * Creates a PullSidecar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PullSidecar + * @static + * @param {Object.} object Plain object + * @returns {atomic.PullSidecar} PullSidecar + */ + PullSidecar.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PullSidecar) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PullSidecar: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PullSidecar(); + if (object.kind != null) + if (typeof object.kind !== "string" || object.kind.length) + message.kind = $String(object.kind); + if (object.count != null) + if (typeof object.count === "object" ? object.count.low || object.count.high : $Number(object.count) !== 0) + if ($util.Long) + message.count = $util.Long.fromValue(object.count, true); + else if (typeof object.count === "string") + message.count = $parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(true); + if (object.detail != null) + message.detail = $String(object.detail); + return message; + }; + + /** + * Creates a plain object from a PullSidecar message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PullSidecar + * @static + * @param {atomic.PullSidecar} message PullSidecar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullSidecar.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.kind = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.count = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.count = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + } + if (message.kind != null && $Object.hasOwnProperty.call(message, "kind")) + object.kind = message.kind; + if (message.count != null && $Object.hasOwnProperty.call(message, "count")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.count = typeof message.count === "number" ? $BigInt(message.count) : $util.Long.fromBits(message.count.low >>> 0, message.count.high >>> 0, true).toBigInt(); + else if (typeof message.count === "number") + object.count = options.longs === $String ? $String(message.count) : message.count; + else + object.count = options.longs === $String ? $util.Long.prototype.toString.call(message.count) : options.longs === $Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber(true) : message.count; + if (message.detail != null && $Object.hasOwnProperty.call(message, "detail")) + object.detail = message.detail; + return object; + }; + + /** + * Converts this PullSidecar to JSON. + * @function toJSON + * @memberof atomic.PullSidecar + * @instance + * @returns {Object.} JSON object + */ + PullSidecar.prototype.toJSON = function() { + return PullSidecar.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PullSidecar + * @function getTypeUrl + * @memberof atomic.PullSidecar + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PullSidecar.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PullSidecar"; + }; + + return PullSidecar; + })(); + + atomic.PullTag = (function() { + + /** + * Properties of a PullTag. + * @typedef {Object} atomic.PullTag.$Properties + * @property {string|null} [name] PullTag name + * @property {string|null} [kind] PullTag kind + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PullTag. + * @memberof atomic + * @interface IPullTag + * @augments atomic.PullTag.$Properties + * @deprecated Use atomic.PullTag.$Properties instead. + */ + + /** + * Shape of a PullTag. + * @typedef {atomic.PullTag.$Properties} atomic.PullTag.$Shape + */ + + /** + * Constructs a new PullTag. + * @memberof atomic + * @classdesc Represents a PullTag. + * @constructor + * @param {atomic.PullTag.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PullTag = 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]]; + }; + + /** + * PullTag name. + * @member {string} name + * @memberof atomic.PullTag + * @instance + */ + PullTag.prototype.name = ""; + + /** + * PullTag kind. + * @member {string} kind + * @memberof atomic.PullTag + * @instance + */ + PullTag.prototype.kind = ""; + + /** + * Creates a new PullTag instance using the specified properties. + * @function create + * @memberof atomic.PullTag + * @static + * @param {atomic.PullTag.$Properties=} [properties] Properties to set + * @returns {atomic.PullTag} PullTag instance + * @type {{ + * (properties: atomic.PullTag.$Shape): atomic.PullTag & atomic.PullTag.$Shape; + * (properties?: atomic.PullTag.$Properties): atomic.PullTag; + * }} + */ + PullTag.create = function(properties) { + return new PullTag(properties); + }; + + /** + * Encodes the specified PullTag message. Does not implicitly {@link atomic.PullTag.verify|verify} messages. + * @function encode + * @memberof atomic.PullTag + * @static + * @param {atomic.PullTag.$Properties} message PullTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullTag.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.kind != null && $Object.hasOwnProperty.call(message, "kind") && message.kind !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kind); + 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 PullTag message, length delimited. Does not implicitly {@link atomic.PullTag.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PullTag + * @static + * @param {atomic.PullTag.$Properties} message PullTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullTag.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PullTag message from the specified reader or buffer. + * @function decode + * @memberof atomic.PullTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PullTag & atomic.PullTag.$Shape} PullTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullTag.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.PullTag(); + 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; + if ((value = reader.stringVerify()).length) + message.kind = value; + else + delete message.kind; + 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 PullTag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PullTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PullTag & atomic.PullTag.$Shape} PullTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullTag.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PullTag message. + * @function verify + * @memberof atomic.PullTag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullTag.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.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"; + return null; + }; + + /** + * Creates a PullTag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PullTag + * @static + * @param {Object.} object Plain object + * @returns {atomic.PullTag} PullTag + */ + PullTag.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PullTag) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PullTag: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PullTag(); + 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); + return message; + }; + + /** + * Creates a plain object from a PullTag message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PullTag + * @static + * @param {atomic.PullTag} message PullTag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullTag.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.kind = ""; + } + 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; + return object; + }; + + /** + * Converts this PullTag to JSON. + * @function toJSON + * @memberof atomic.PullTag + * @instance + * @returns {Object.} JSON object + */ + PullTag.prototype.toJSON = function() { + return PullTag.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PullTag + * @function getTypeUrl + * @memberof atomic.PullTag + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PullTag.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PullTag"; + }; + + return PullTag; + })(); + + atomic.PullWarning = (function() { + + /** + * Properties of a PullWarning. + * @typedef {Object} atomic.PullWarning.$Properties + * @property {string|null} [text] PullWarning text + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PullWarning. + * @memberof atomic + * @interface IPullWarning + * @augments atomic.PullWarning.$Properties + * @deprecated Use atomic.PullWarning.$Properties instead. + */ + + /** + * Shape of a PullWarning. + * @typedef {atomic.PullWarning.$Properties} atomic.PullWarning.$Shape + */ + + /** + * Constructs a new PullWarning. + * @memberof atomic + * @classdesc Represents a PullWarning. + * @constructor + * @param {atomic.PullWarning.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PullWarning = 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]]; + }; + + /** + * PullWarning text. + * @member {string} text + * @memberof atomic.PullWarning + * @instance + */ + PullWarning.prototype.text = ""; + + /** + * Creates a new PullWarning instance using the specified properties. + * @function create + * @memberof atomic.PullWarning + * @static + * @param {atomic.PullWarning.$Properties=} [properties] Properties to set + * @returns {atomic.PullWarning} PullWarning instance + * @type {{ + * (properties: atomic.PullWarning.$Shape): atomic.PullWarning & atomic.PullWarning.$Shape; + * (properties?: atomic.PullWarning.$Properties): atomic.PullWarning; + * }} + */ + PullWarning.create = function(properties) { + return new PullWarning(properties); + }; + + /** + * Encodes the specified PullWarning message. Does not implicitly {@link atomic.PullWarning.verify|verify} messages. + * @function encode + * @memberof atomic.PullWarning + * @static + * @param {atomic.PullWarning.$Properties} message PullWarning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullWarning.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.text != null && $Object.hasOwnProperty.call(message, "text") && message.text !== "") + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + 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 PullWarning message, length delimited. Does not implicitly {@link atomic.PullWarning.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PullWarning + * @static + * @param {atomic.PullWarning.$Properties} message PullWarning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullWarning.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PullWarning message from the specified reader or buffer. + * @function decode + * @memberof atomic.PullWarning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PullWarning & atomic.PullWarning.$Shape} PullWarning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullWarning.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.PullWarning(); + 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.text = value; + else + delete message.text; + 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 PullWarning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PullWarning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PullWarning & atomic.PullWarning.$Shape} PullWarning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullWarning.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PullWarning message. + * @function verify + * @memberof atomic.PullWarning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullWarning.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.text != null && $Object.hasOwnProperty.call(message, "text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates a PullWarning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PullWarning + * @static + * @param {Object.} object Plain object + * @returns {atomic.PullWarning} PullWarning + */ + PullWarning.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PullWarning) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PullWarning: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.PullWarning(); + if (object.text != null) + if (typeof object.text !== "string" || object.text.length) + message.text = $String(object.text); + return message; + }; + + /** + * Creates a plain object from a PullWarning message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PullWarning + * @static + * @param {atomic.PullWarning} message PullWarning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullWarning.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.text = ""; + if (message.text != null && $Object.hasOwnProperty.call(message, "text")) + object.text = message.text; + return object; + }; + + /** + * Converts this PullWarning to JSON. + * @function toJSON + * @memberof atomic.PullWarning + * @instance + * @returns {Object.} JSON object + */ + PullWarning.prototype.toJSON = function() { + return PullWarning.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PullWarning + * @function getTypeUrl + * @memberof atomic.PullWarning + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PullWarning.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PullWarning"; + }; + + return PullWarning; + })(); + + atomic.ListRemotesRequest = (function() { + + /** + * Properties of a ListRemotesRequest. + * @typedef {Object} atomic.ListRemotesRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] ListRemotesRequest repository + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ListRemotesRequest. + * @memberof atomic + * @interface IListRemotesRequest + * @augments atomic.ListRemotesRequest.$Properties + * @deprecated Use atomic.ListRemotesRequest.$Properties instead. + */ + + /** + * Shape of a ListRemotesRequest. + * @typedef {atomic.ListRemotesRequest.$Properties} atomic.ListRemotesRequest.$Shape + */ + + /** + * Constructs a new ListRemotesRequest. + * @memberof atomic + * @classdesc Represents a ListRemotesRequest. + * @constructor + * @param {atomic.ListRemotesRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ListRemotesRequest = 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]]; + }; + + /** + * ListRemotesRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.ListRemotesRequest + * @instance + */ + ListRemotesRequest.prototype.repository = null; + + /** + * Creates a new ListRemotesRequest instance using the specified properties. + * @function create + * @memberof atomic.ListRemotesRequest + * @static + * @param {atomic.ListRemotesRequest.$Properties=} [properties] Properties to set + * @returns {atomic.ListRemotesRequest} ListRemotesRequest instance + * @type {{ + * (properties: atomic.ListRemotesRequest.$Shape): atomic.ListRemotesRequest & atomic.ListRemotesRequest.$Shape; + * (properties?: atomic.ListRemotesRequest.$Properties): atomic.ListRemotesRequest; + * }} + */ + ListRemotesRequest.create = function(properties) { + return new ListRemotesRequest(properties); + }; + + /** + * Encodes the specified ListRemotesRequest message. Does not implicitly {@link atomic.ListRemotesRequest.verify|verify} messages. + * @function encode + * @memberof atomic.ListRemotesRequest + * @static + * @param {atomic.ListRemotesRequest.$Properties} message ListRemotesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRemotesRequest.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 ListRemotesRequest message, length delimited. Does not implicitly {@link atomic.ListRemotesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ListRemotesRequest + * @static + * @param {atomic.ListRemotesRequest.$Properties} message ListRemotesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRemotesRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ListRemotesRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.ListRemotesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ListRemotesRequest & atomic.ListRemotesRequest.$Shape} ListRemotesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRemotesRequest.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.ListRemotesRequest(); + 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 ListRemotesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ListRemotesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ListRemotesRequest & atomic.ListRemotesRequest.$Shape} ListRemotesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRemotesRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ListRemotesRequest message. + * @function verify + * @memberof atomic.ListRemotesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRemotesRequest.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 ListRemotesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ListRemotesRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.ListRemotesRequest} ListRemotesRequest + */ + ListRemotesRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ListRemotesRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ListRemotesRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ListRemotesRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.ListRemotesRequest.repository: object expected"); + message.repository = $root.atomic.RepositoryRef.fromObject(object.repository, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ListRemotesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ListRemotesRequest + * @static + * @param {atomic.ListRemotesRequest} message ListRemotesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRemotesRequest.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 ListRemotesRequest to JSON. + * @function toJSON + * @memberof atomic.ListRemotesRequest + * @instance + * @returns {Object.} JSON object + */ + ListRemotesRequest.prototype.toJSON = function() { + return ListRemotesRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ListRemotesRequest + * @function getTypeUrl + * @memberof atomic.ListRemotesRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ListRemotesRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ListRemotesRequest"; + }; + + return ListRemotesRequest; + })(); + + atomic.ListRemotesResponse = (function() { + + /** + * Properties of a ListRemotesResponse. + * @typedef {Object} atomic.ListRemotesResponse.$Properties + * @property {Array.|null} [remotes] ListRemotesResponse remotes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ListRemotesResponse. + * @memberof atomic + * @interface IListRemotesResponse + * @augments atomic.ListRemotesResponse.$Properties + * @deprecated Use atomic.ListRemotesResponse.$Properties instead. + */ + + /** + * Shape of a ListRemotesResponse. + * @typedef {atomic.ListRemotesResponse.$Properties} atomic.ListRemotesResponse.$Shape + */ + + /** + * Constructs a new ListRemotesResponse. + * @memberof atomic + * @classdesc Represents a ListRemotesResponse. + * @constructor + * @param {atomic.ListRemotesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ListRemotesResponse = function (properties) { + this.remotes = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ListRemotesResponse remotes. + * @member {Array.} remotes + * @memberof atomic.ListRemotesResponse + * @instance + */ + ListRemotesResponse.prototype.remotes = $util.emptyArray; + + /** + * Creates a new ListRemotesResponse instance using the specified properties. + * @function create + * @memberof atomic.ListRemotesResponse + * @static + * @param {atomic.ListRemotesResponse.$Properties=} [properties] Properties to set + * @returns {atomic.ListRemotesResponse} ListRemotesResponse instance + * @type {{ + * (properties: atomic.ListRemotesResponse.$Shape): atomic.ListRemotesResponse & atomic.ListRemotesResponse.$Shape; + * (properties?: atomic.ListRemotesResponse.$Properties): atomic.ListRemotesResponse; + * }} + */ + ListRemotesResponse.create = function(properties) { + return new ListRemotesResponse(properties); + }; + + /** + * Encodes the specified ListRemotesResponse message. Does not implicitly {@link atomic.ListRemotesResponse.verify|verify} messages. + * @function encode + * @memberof atomic.ListRemotesResponse + * @static + * @param {atomic.ListRemotesResponse.$Properties} message ListRemotesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRemotesResponse.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.remotes != null && message.remotes.length) + for (var i = 0; i < message.remotes.length; ++i) + $root.atomic.RemoteInfo.encode(message.remotes[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 ListRemotesResponse message, length delimited. Does not implicitly {@link atomic.ListRemotesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ListRemotesResponse + * @static + * @param {atomic.ListRemotesResponse.$Properties} message ListRemotesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListRemotesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ListRemotesResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.ListRemotesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ListRemotesResponse & atomic.ListRemotesResponse.$Shape} ListRemotesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRemotesResponse.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.ListRemotesResponse(); + 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.remotes && message.remotes.length)) + message.remotes = []; + message.remotes.push($root.atomic.RemoteInfo.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 ListRemotesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ListRemotesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ListRemotesResponse & atomic.ListRemotesResponse.$Shape} ListRemotesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListRemotesResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ListRemotesResponse message. + * @function verify + * @memberof atomic.ListRemotesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListRemotesResponse.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.remotes != null && $Object.hasOwnProperty.call(message, "remotes")) { + if (!$Array.isArray(message.remotes)) + return "remotes: array expected"; + for (var i = 0; i < message.remotes.length; ++i) { + var error = $root.atomic.RemoteInfo.verify(message.remotes[i], _depth + 1); + if (error) + return "remotes." + error; + } + } + return null; + }; + + /** + * Creates a ListRemotesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ListRemotesResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.ListRemotesResponse} ListRemotesResponse + */ + ListRemotesResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ListRemotesResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ListRemotesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ListRemotesResponse(); + if (object.remotes) { + if (!$Array.isArray(object.remotes)) + throw $TypeError(".atomic.ListRemotesResponse.remotes: array expected"); + message.remotes = $Array(object.remotes.length); + for (var i = 0; i < object.remotes.length; ++i) { + if (!$util.isObject(object.remotes[i])) + throw $TypeError(".atomic.ListRemotesResponse.remotes: object expected"); + message.remotes[i] = $root.atomic.RemoteInfo.fromObject(object.remotes[i], _depth + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ListRemotesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ListRemotesResponse + * @static + * @param {atomic.ListRemotesResponse} message ListRemotesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListRemotesResponse.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.remotes = []; + if (message.remotes && message.remotes.length) { + object.remotes = $Array(message.remotes.length); + for (var j = 0; j < message.remotes.length; ++j) + object.remotes[j] = $root.atomic.RemoteInfo.toObject(message.remotes[j], options, _depth + 1); + } + return object; + }; + + /** + * Converts this ListRemotesResponse to JSON. + * @function toJSON + * @memberof atomic.ListRemotesResponse + * @instance + * @returns {Object.} JSON object + */ + ListRemotesResponse.prototype.toJSON = function() { + return ListRemotesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ListRemotesResponse + * @function getTypeUrl + * @memberof atomic.ListRemotesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ListRemotesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ListRemotesResponse"; + }; + + return ListRemotesResponse; + })(); + + atomic.RemoteInfo = (function() { + + /** + * Properties of a RemoteInfo. + * @typedef {Object} atomic.RemoteInfo.$Properties + * @property {string|null} [name] RemoteInfo name + * @property {string|null} [url] RemoteInfo url + * @property {boolean|null} ["default"] RemoteInfo default + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a RemoteInfo. + * @memberof atomic + * @interface IRemoteInfo + * @augments atomic.RemoteInfo.$Properties + * @deprecated Use atomic.RemoteInfo.$Properties instead. + */ + + /** + * Shape of a RemoteInfo. + * @typedef {atomic.RemoteInfo.$Properties} atomic.RemoteInfo.$Shape + */ + + /** + * Constructs a new RemoteInfo. + * @memberof atomic + * @classdesc Represents a RemoteInfo. + * @constructor + * @param {atomic.RemoteInfo.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var RemoteInfo = 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]]; + }; + + /** + * RemoteInfo name. + * @member {string} name + * @memberof atomic.RemoteInfo + * @instance + */ + RemoteInfo.prototype.name = ""; + + /** + * RemoteInfo url. + * @member {string} url + * @memberof atomic.RemoteInfo + * @instance + */ + RemoteInfo.prototype.url = ""; + + /** + * RemoteInfo default. + * @member {boolean} default + * @memberof atomic.RemoteInfo + * @instance + */ + RemoteInfo.prototype["default"] = false; + + /** + * Creates a new RemoteInfo instance using the specified properties. + * @function create + * @memberof atomic.RemoteInfo + * @static + * @param {atomic.RemoteInfo.$Properties=} [properties] Properties to set + * @returns {atomic.RemoteInfo} RemoteInfo instance + * @type {{ + * (properties: atomic.RemoteInfo.$Shape): atomic.RemoteInfo & atomic.RemoteInfo.$Shape; + * (properties?: atomic.RemoteInfo.$Properties): atomic.RemoteInfo; + * }} + */ + RemoteInfo.create = function(properties) { + return new RemoteInfo(properties); + }; + + /** + * Encodes the specified RemoteInfo message. Does not implicitly {@link atomic.RemoteInfo.verify|verify} messages. + * @function encode + * @memberof atomic.RemoteInfo + * @static + * @param {atomic.RemoteInfo.$Properties} message RemoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoteInfo.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.url != null && $Object.hasOwnProperty.call(message, "url") && message.url !== "") + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + if (message["default"] != null && $Object.hasOwnProperty.call(message, "default") && message["default"] !== false) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message["default"]); + 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 RemoteInfo message, length delimited. Does not implicitly {@link atomic.RemoteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.RemoteInfo + * @static + * @param {atomic.RemoteInfo.$Properties} message RemoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoteInfo.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a RemoteInfo message from the specified reader or buffer. + * @function decode + * @memberof atomic.RemoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.RemoteInfo & atomic.RemoteInfo.$Shape} RemoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoteInfo.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.RemoteInfo(); + 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; + if ((value = reader.stringVerify()).length) + message.url = value; + else + delete message.url; + continue; + } + case 3: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message["default"] = value; + else + delete message["default"]; + 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 RemoteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.RemoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.RemoteInfo & atomic.RemoteInfo.$Shape} RemoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoteInfo.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a RemoteInfo message. + * @function verify + * @memberof atomic.RemoteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoteInfo.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.name != null && $Object.hasOwnProperty.call(message, "name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message["default"] != null && $Object.hasOwnProperty.call(message, "default")) + if (typeof message["default"] !== "boolean") + return "default: boolean expected"; + return null; + }; + + /** + * Creates a RemoteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.RemoteInfo + * @static + * @param {Object.} object Plain object + * @returns {atomic.RemoteInfo} RemoteInfo + */ + RemoteInfo.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.RemoteInfo) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.RemoteInfo: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.RemoteInfo(); + if (object.name != null) + if (typeof object.name !== "string" || object.name.length) + message.name = $String(object.name); + if (object.url != null) + if (typeof object.url !== "string" || object.url.length) + message.url = $String(object.url); + if (object["default"] != null) + if (object["default"]) + message["default"] = $Boolean(object["default"]); + return message; + }; + + /** + * Creates a plain object from a RemoteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.RemoteInfo + * @static + * @param {atomic.RemoteInfo} message RemoteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoteInfo.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.url = ""; + object["default"] = false; + } + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) + object.url = message.url; + if (message["default"] != null && $Object.hasOwnProperty.call(message, "default")) + object["default"] = message["default"]; + return object; + }; + + /** + * Converts this RemoteInfo to JSON. + * @function toJSON + * @memberof atomic.RemoteInfo + * @instance + * @returns {Object.} JSON object + */ + RemoteInfo.prototype.toJSON = function() { + return RemoteInfo.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for RemoteInfo + * @function getTypeUrl + * @memberof atomic.RemoteInfo + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + RemoteInfo.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.RemoteInfo"; + }; + + return RemoteInfo; + })(); + + atomic.ManageRemotesRequest = (function() { + + /** + * Properties of a ManageRemotesRequest. + * @typedef {Object} atomic.ManageRemotesRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] ManageRemotesRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] ManageRemotesRequest meta + * @property {atomic.RemoteAction|null} [action] ManageRemotesRequest action + * @property {string|null} [name] ManageRemotesRequest name + * @property {string|null} [url] ManageRemotesRequest url + * @property {string|null} [newName] ManageRemotesRequest newName + * @property {boolean|null} [setDefault] ManageRemotesRequest setDefault + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ManageRemotesRequest. + * @memberof atomic + * @interface IManageRemotesRequest + * @augments atomic.ManageRemotesRequest.$Properties + * @deprecated Use atomic.ManageRemotesRequest.$Properties instead. + */ + + /** + * Shape of a ManageRemotesRequest. + * @typedef {atomic.ManageRemotesRequest.$Properties} atomic.ManageRemotesRequest.$Shape + */ + + /** + * Constructs a new ManageRemotesRequest. + * @memberof atomic + * @classdesc Represents a ManageRemotesRequest. + * @constructor + * @param {atomic.ManageRemotesRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ManageRemotesRequest = 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]]; + }; + + /** + * ManageRemotesRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.ManageRemotesRequest + * @instance + */ + ManageRemotesRequest.prototype.repository = null; + + /** + * ManageRemotesRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.ManageRemotesRequest + * @instance + */ + ManageRemotesRequest.prototype.meta = null; + + /** + * ManageRemotesRequest action. + * @member {atomic.RemoteAction} action + * @memberof atomic.ManageRemotesRequest + * @instance + */ + ManageRemotesRequest.prototype.action = 0; + + /** + * ManageRemotesRequest name. + * @member {string|null|undefined} name + * @memberof atomic.ManageRemotesRequest + * @instance + */ + ManageRemotesRequest.prototype.name = null; + + /** + * ManageRemotesRequest url. + * @member {string|null|undefined} url + * @memberof atomic.ManageRemotesRequest + * @instance + */ + ManageRemotesRequest.prototype.url = null; + + /** + * ManageRemotesRequest newName. + * @member {string|null|undefined} newName + * @memberof atomic.ManageRemotesRequest + * @instance + */ + ManageRemotesRequest.prototype.newName = null; + + /** + * ManageRemotesRequest setDefault. + * @member {boolean} setDefault + * @memberof atomic.ManageRemotesRequest + * @instance + */ + ManageRemotesRequest.prototype.setDefault = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ManageRemotesRequest.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ManageRemotesRequest.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ManageRemotesRequest.prototype, "_new_name", { + get: $util.oneOfGetter($oneOfFields = ["newName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ManageRemotesRequest instance using the specified properties. + * @function create + * @memberof atomic.ManageRemotesRequest + * @static + * @param {atomic.ManageRemotesRequest.$Properties=} [properties] Properties to set + * @returns {atomic.ManageRemotesRequest} ManageRemotesRequest instance + * @type {{ + * (properties: atomic.ManageRemotesRequest.$Shape): atomic.ManageRemotesRequest & atomic.ManageRemotesRequest.$Shape; + * (properties?: atomic.ManageRemotesRequest.$Properties): atomic.ManageRemotesRequest; + * }} + */ + ManageRemotesRequest.create = function(properties) { + return new ManageRemotesRequest(properties); + }; + + /** + * Encodes the specified ManageRemotesRequest message. Does not implicitly {@link atomic.ManageRemotesRequest.verify|verify} messages. + * @function encode + * @memberof atomic.ManageRemotesRequest + * @static + * @param {atomic.ManageRemotesRequest.$Properties} message ManageRemotesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManageRemotesRequest.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.name != null && $Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.url); + if (message.newName != null && $Object.hasOwnProperty.call(message, "newName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.newName); + if (message.setDefault != null && $Object.hasOwnProperty.call(message, "setDefault") && message.setDefault !== false) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.setDefault); + 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 ManageRemotesRequest message, length delimited. Does not implicitly {@link atomic.ManageRemotesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ManageRemotesRequest + * @static + * @param {atomic.ManageRemotesRequest.$Properties} message ManageRemotesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManageRemotesRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ManageRemotesRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.ManageRemotesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ManageRemotesRequest & atomic.ManageRemotesRequest.$Shape} ManageRemotesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManageRemotesRequest.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.ManageRemotesRequest(); + 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.name = reader.stringVerify(); + message._name = "name"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.url = reader.stringVerify(); + message._url = "url"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.newName = reader.stringVerify(); + message._new_name = "newName"; + continue; + } + case 7: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.setDefault = value; + else + delete message.setDefault; + 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 ManageRemotesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ManageRemotesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ManageRemotesRequest & atomic.ManageRemotesRequest.$Shape} ManageRemotesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManageRemotesRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ManageRemotesRequest message. + * @function verify + * @memberof atomic.ManageRemotesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManageRemotesRequest.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.name != null && $Object.hasOwnProperty.call(message, "name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) { + properties._url = 1; + if (!$util.isString(message.url)) + return "url: string expected"; + } + if (message.newName != null && $Object.hasOwnProperty.call(message, "newName")) { + properties._new_name = 1; + if (!$util.isString(message.newName)) + return "newName: string expected"; + } + if (message.setDefault != null && $Object.hasOwnProperty.call(message, "setDefault")) + if (typeof message.setDefault !== "boolean") + return "setDefault: boolean expected"; + return null; + }; + + /** + * Creates a ManageRemotesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ManageRemotesRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.ManageRemotesRequest} ManageRemotesRequest + */ + ManageRemotesRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ManageRemotesRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ManageRemotesRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ManageRemotesRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.ManageRemotesRequest.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.ManageRemotesRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.action !== 0 && (typeof object.action !== "string" || $root.atomic.RemoteAction[object.action] !== 0)) + switch (object.action) { + case "REMOTE_ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "REMOTE_ACTION_ADD": + case 1: + message.action = 1; + break; + case "REMOTE_ACTION_REMOVE": + case 2: + message.action = 2; + break; + case "REMOTE_ACTION_RENAME": + case 3: + message.action = 3; + break; + case "REMOTE_ACTION_SET_URL": + case 4: + message.action = 4; + break; + case "REMOTE_ACTION_SET_DEFAULT": + case 5: + message.action = 5; + break; + default: + if (typeof object.action === "number" && (object.action | 0) === object.action) + message.action = object.action; + } + if (object.name != null) + message.name = $String(object.name); + if (object.url != null) + message.url = $String(object.url); + if (object.newName != null) + message.newName = $String(object.newName); + if (object.setDefault != null) + if (object.setDefault) + message.setDefault = $Boolean(object.setDefault); + return message; + }; + + /** + * Creates a plain object from a ManageRemotesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ManageRemotesRequest + * @static + * @param {atomic.ManageRemotesRequest} message ManageRemotesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManageRemotesRequest.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.action = options.enums === $String ? "REMOTE_ACTION_UNSPECIFIED" : 0; + object.setDefault = 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.action != null && $Object.hasOwnProperty.call(message, "action")) + object.action = options.enums === $String ? $root.atomic.RemoteAction[message.action] === $undefined ? message.action : $root.atomic.RemoteAction[message.action] : message.action; + if (message.name != null && $Object.hasOwnProperty.call(message, "name")) + object.name = message.name; + if (message.url != null && $Object.hasOwnProperty.call(message, "url")) + object.url = message.url; + if (message.newName != null && $Object.hasOwnProperty.call(message, "newName")) + object.newName = message.newName; + if (message.setDefault != null && $Object.hasOwnProperty.call(message, "setDefault")) + object.setDefault = message.setDefault; + return object; + }; + + /** + * Converts this ManageRemotesRequest to JSON. + * @function toJSON + * @memberof atomic.ManageRemotesRequest + * @instance + * @returns {Object.} JSON object + */ + ManageRemotesRequest.prototype.toJSON = function() { + return ManageRemotesRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ManageRemotesRequest + * @function getTypeUrl + * @memberof atomic.ManageRemotesRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ManageRemotesRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ManageRemotesRequest"; + }; + + return ManageRemotesRequest; + })(); + + /** + * RemoteAction enum. + * @name atomic.RemoteAction + * @enum {number} + * @property {number} REMOTE_ACTION_UNSPECIFIED=0 REMOTE_ACTION_UNSPECIFIED value + * @property {number} REMOTE_ACTION_ADD=1 REMOTE_ACTION_ADD value + * @property {number} REMOTE_ACTION_REMOVE=2 REMOTE_ACTION_REMOVE value + * @property {number} REMOTE_ACTION_RENAME=3 REMOTE_ACTION_RENAME value + * @property {number} REMOTE_ACTION_SET_URL=4 REMOTE_ACTION_SET_URL value + * @property {number} REMOTE_ACTION_SET_DEFAULT=5 REMOTE_ACTION_SET_DEFAULT value + */ + atomic.RemoteAction = (function() { + var valuesById = $Object.create(null), values = $Object.create(valuesById); + values[valuesById[0] = "REMOTE_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "REMOTE_ACTION_ADD"] = 1; + values[valuesById[2] = "REMOTE_ACTION_REMOVE"] = 2; + values[valuesById[3] = "REMOTE_ACTION_RENAME"] = 3; + values[valuesById[4] = "REMOTE_ACTION_SET_URL"] = 4; + values[valuesById[5] = "REMOTE_ACTION_SET_DEFAULT"] = 5; + return values; + })(); + + atomic.ManageRemotesResponse = (function() { + + /** + * Properties of a ManageRemotesResponse. + * @typedef {Object} atomic.ManageRemotesResponse.$Properties + * @property {Array.|null} [remotes] ManageRemotesResponse remotes + * @property {atomic.ResponseMeta.$Properties|null} [meta] ManageRemotesResponse meta + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ManageRemotesResponse. + * @memberof atomic + * @interface IManageRemotesResponse + * @augments atomic.ManageRemotesResponse.$Properties + * @deprecated Use atomic.ManageRemotesResponse.$Properties instead. + */ + + /** + * Shape of a ManageRemotesResponse. + * @typedef {atomic.ManageRemotesResponse.$Properties} atomic.ManageRemotesResponse.$Shape + */ + + /** + * Constructs a new ManageRemotesResponse. + * @memberof atomic + * @classdesc Represents a ManageRemotesResponse. + * @constructor + * @param {atomic.ManageRemotesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ManageRemotesResponse = function (properties) { + this.remotes = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ManageRemotesResponse remotes. + * @member {Array.} remotes + * @memberof atomic.ManageRemotesResponse + * @instance + */ + ManageRemotesResponse.prototype.remotes = $util.emptyArray; + + /** + * ManageRemotesResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.ManageRemotesResponse + * @instance + */ + ManageRemotesResponse.prototype.meta = null; + + /** + * Creates a new ManageRemotesResponse instance using the specified properties. + * @function create + * @memberof atomic.ManageRemotesResponse + * @static + * @param {atomic.ManageRemotesResponse.$Properties=} [properties] Properties to set + * @returns {atomic.ManageRemotesResponse} ManageRemotesResponse instance + * @type {{ + * (properties: atomic.ManageRemotesResponse.$Shape): atomic.ManageRemotesResponse & atomic.ManageRemotesResponse.$Shape; + * (properties?: atomic.ManageRemotesResponse.$Properties): atomic.ManageRemotesResponse; + * }} + */ + ManageRemotesResponse.create = function(properties) { + return new ManageRemotesResponse(properties); + }; + + /** + * Encodes the specified ManageRemotesResponse message. Does not implicitly {@link atomic.ManageRemotesResponse.verify|verify} messages. + * @function encode + * @memberof atomic.ManageRemotesResponse + * @static + * @param {atomic.ManageRemotesResponse.$Properties} message ManageRemotesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManageRemotesResponse.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.remotes != null && message.remotes.length) + for (var i = 0; i < message.remotes.length; ++i) + $root.atomic.RemoteInfo.encode(message.remotes[i], 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 ManageRemotesResponse message, length delimited. Does not implicitly {@link atomic.ManageRemotesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ManageRemotesResponse + * @static + * @param {atomic.ManageRemotesResponse.$Properties} message ManageRemotesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManageRemotesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ManageRemotesResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.ManageRemotesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ManageRemotesResponse & atomic.ManageRemotesResponse.$Shape} ManageRemotesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManageRemotesResponse.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.ManageRemotesResponse(); + 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.remotes && message.remotes.length)) + message.remotes = []; + message.remotes.push($root.atomic.RemoteInfo.decode(reader, reader.size(), $undefined, _depth + 1)); + 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 ManageRemotesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ManageRemotesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ManageRemotesResponse & atomic.ManageRemotesResponse.$Shape} ManageRemotesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManageRemotesResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ManageRemotesResponse message. + * @function verify + * @memberof atomic.ManageRemotesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManageRemotesResponse.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.remotes != null && $Object.hasOwnProperty.call(message, "remotes")) { + if (!$Array.isArray(message.remotes)) + return "remotes: array expected"; + for (var i = 0; i < message.remotes.length; ++i) { + var error = $root.atomic.RemoteInfo.verify(message.remotes[i], _depth + 1); + if (error) + return "remotes." + 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 ManageRemotesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ManageRemotesResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.ManageRemotesResponse} ManageRemotesResponse + */ + ManageRemotesResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ManageRemotesResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ManageRemotesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ManageRemotesResponse(); + if (object.remotes) { + if (!$Array.isArray(object.remotes)) + throw $TypeError(".atomic.ManageRemotesResponse.remotes: array expected"); + message.remotes = $Array(object.remotes.length); + for (var i = 0; i < object.remotes.length; ++i) { + if (!$util.isObject(object.remotes[i])) + throw $TypeError(".atomic.ManageRemotesResponse.remotes: object expected"); + message.remotes[i] = $root.atomic.RemoteInfo.fromObject(object.remotes[i], _depth + 1); + } + } + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.ManageRemotesResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from a ManageRemotesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ManageRemotesResponse + * @static + * @param {atomic.ManageRemotesResponse} message ManageRemotesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManageRemotesResponse.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.remotes = []; + if (options.defaults) + object.meta = null; + if (message.remotes && message.remotes.length) { + object.remotes = $Array(message.remotes.length); + for (var j = 0; j < message.remotes.length; ++j) + object.remotes[j] = $root.atomic.RemoteInfo.toObject(message.remotes[j], 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 ManageRemotesResponse to JSON. + * @function toJSON + * @memberof atomic.ManageRemotesResponse + * @instance + * @returns {Object.} JSON object + */ + ManageRemotesResponse.prototype.toJSON = function() { + return ManageRemotesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ManageRemotesResponse + * @function getTypeUrl + * @memberof atomic.ManageRemotesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ManageRemotesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ManageRemotesResponse"; + }; + + return ManageRemotesResponse; + })(); + + atomic.InsertChangesRequest = (function() { + + /** + * Properties of an InsertChangesRequest. + * @typedef {Object} atomic.InsertChangesRequest.$Properties + * @property {atomic.RepositoryRef.$Properties|null} [repository] InsertChangesRequest repository + * @property {atomic.RequestMeta.$Properties|null} [meta] InsertChangesRequest meta + * @property {atomic.Hash.$Properties|null} [singleChange] InsertChangesRequest singleChange + * @property {string|null} [fromView] InsertChangesRequest fromView + * @property {string|null} [upToTag] InsertChangesRequest upToTag + * @property {atomic.PromoteCurrentView.$Properties|null} [promoteCurrentView] InsertChangesRequest promoteCurrentView + * @property {atomic.ChangeSet.$Properties|null} [changeSet] InsertChangesRequest changeSet + * @property {string|null} [singleRef] InsertChangesRequest singleRef + * @property {string|null} [targetView] InsertChangesRequest targetView + * @property {boolean|null} [allowConflicts] InsertChangesRequest allowConflicts + * @property {atomic.ViewRef.$Properties|null} [target] InsertChangesRequest target + * @property {atomic.ViewSnapshot.$Properties|null} [expectedSnapshot] InsertChangesRequest expectedSnapshot + * @property {atomic.ViewSnapshot.$Properties|null} [sourceSnapshot] InsertChangesRequest sourceSnapshot + * @property {boolean|null} [applyDependencies] InsertChangesRequest applyDependencies + * @property {boolean|null} [dryRun] InsertChangesRequest dryRun + * @property {string|null} [tagFromView] InsertChangesRequest tagFromView + * @property {"singleChange"|"fromView"|"upToTag"|"promoteCurrentView"|"changeSet"|"singleRef"} [source] InsertChangesRequest source + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an InsertChangesRequest. + * @memberof atomic + * @interface IInsertChangesRequest + * @augments atomic.InsertChangesRequest.$Properties + * @deprecated Use atomic.InsertChangesRequest.$Properties instead. + */ + + /** + * Narrowed shape of an InsertChangesRequest. + * @typedef {{ + * repository?: atomic.RepositoryRef.$Shape|null; + * meta?: atomic.RequestMeta.$Shape|null; + * singleChange?: atomic.Hash.$Shape|null; + * fromView?: string|null; + * upToTag?: string|null; + * promoteCurrentView?: atomic.PromoteCurrentView.$Shape|null; + * changeSet?: atomic.ChangeSet.$Shape|null; + * singleRef?: string|null; + * targetView?: string|null; + * allowConflicts?: boolean|null; + * target?: atomic.ViewRef.$Shape|null; + * expectedSnapshot?: atomic.ViewSnapshot.$Shape|null; + * sourceSnapshot?: atomic.ViewSnapshot.$Shape|null; + * applyDependencies?: boolean|null; + * dryRun?: boolean|null; + * tagFromView?: string|null; + * $unknowns?: Array.; + * } & ( + * ({ source?: undefined; singleChange?: null; fromView?: null; upToTag?: null; promoteCurrentView?: null; changeSet?: null; singleRef?: null }|{ source?: "singleChange"; singleChange: atomic.Hash.$Shape; fromView?: null; upToTag?: null; promoteCurrentView?: null; changeSet?: null; singleRef?: null }|{ source?: "fromView"; singleChange?: null; fromView: string; upToTag?: null; promoteCurrentView?: null; changeSet?: null; singleRef?: null }|{ source?: "upToTag"; singleChange?: null; fromView?: null; upToTag: string; promoteCurrentView?: null; changeSet?: null; singleRef?: null }|{ source?: "promoteCurrentView"; singleChange?: null; fromView?: null; upToTag?: null; promoteCurrentView: atomic.PromoteCurrentView.$Shape; changeSet?: null; singleRef?: null }|{ source?: "changeSet"; singleChange?: null; fromView?: null; upToTag?: null; promoteCurrentView?: null; changeSet: atomic.ChangeSet.$Shape; singleRef?: null }|{ source?: "singleRef"; singleChange?: null; fromView?: null; upToTag?: null; promoteCurrentView?: null; changeSet?: null; singleRef: string }) + * )} atomic.InsertChangesRequest.$Shape + */ + + /** + * Constructs a new InsertChangesRequest. + * @memberof atomic + * @classdesc Represents an InsertChangesRequest. + * @constructor + * @param {atomic.InsertChangesRequest.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var InsertChangesRequest = 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]]; + }; + + /** + * InsertChangesRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.repository = null; + + /** + * InsertChangesRequest meta. + * @member {atomic.RequestMeta.$Properties|null|undefined} meta + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.meta = null; + + /** + * InsertChangesRequest singleChange. + * @member {atomic.Hash.$Properties|null|undefined} singleChange + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.singleChange = null; + + /** + * InsertChangesRequest fromView. + * @member {string|null|undefined} fromView + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.fromView = null; + + /** + * InsertChangesRequest upToTag. + * @member {string|null|undefined} upToTag + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.upToTag = null; + + /** + * InsertChangesRequest promoteCurrentView. + * @member {atomic.PromoteCurrentView.$Properties|null|undefined} promoteCurrentView + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.promoteCurrentView = null; + + /** + * InsertChangesRequest changeSet. + * @member {atomic.ChangeSet.$Properties|null|undefined} changeSet + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.changeSet = null; + + /** + * InsertChangesRequest singleRef. + * @member {string|null|undefined} singleRef + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.singleRef = null; + + /** + * InsertChangesRequest targetView. + * @member {string|null|undefined} targetView + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.targetView = null; + + /** + * InsertChangesRequest allowConflicts. + * @member {boolean} allowConflicts + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.allowConflicts = false; + + /** + * InsertChangesRequest target. + * @member {atomic.ViewRef.$Properties|null|undefined} target + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.target = null; + + /** + * InsertChangesRequest expectedSnapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} expectedSnapshot + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.expectedSnapshot = null; + + /** + * InsertChangesRequest sourceSnapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} sourceSnapshot + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.sourceSnapshot = null; + + /** + * InsertChangesRequest applyDependencies. + * @member {boolean|null|undefined} applyDependencies + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.applyDependencies = null; + + /** + * InsertChangesRequest dryRun. + * @member {boolean|null|undefined} dryRun + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.dryRun = null; + + /** + * InsertChangesRequest tagFromView. + * @member {string|null|undefined} tagFromView + * @memberof atomic.InsertChangesRequest + * @instance + */ + InsertChangesRequest.prototype.tagFromView = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InsertChangesRequest source. + * @member {"singleChange"|"fromView"|"upToTag"|"promoteCurrentView"|"changeSet"|"singleRef"|undefined} source + * @memberof atomic.InsertChangesRequest + * @instance + */ + $Object.defineProperty(InsertChangesRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["singleChange", "fromView", "upToTag", "promoteCurrentView", "changeSet", "singleRef"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesRequest.prototype, "_target_view", { + get: $util.oneOfGetter($oneOfFields = ["targetView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesRequest.prototype, "_source_snapshot", { + get: $util.oneOfGetter($oneOfFields = ["sourceSnapshot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesRequest.prototype, "_apply_dependencies", { + get: $util.oneOfGetter($oneOfFields = ["applyDependencies"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesRequest.prototype, "_dry_run", { + get: $util.oneOfGetter($oneOfFields = ["dryRun"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesRequest.prototype, "_tag_from_view", { + get: $util.oneOfGetter($oneOfFields = ["tagFromView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InsertChangesRequest instance using the specified properties. + * @function create + * @memberof atomic.InsertChangesRequest + * @static + * @param {atomic.InsertChangesRequest.$Properties=} [properties] Properties to set + * @returns {atomic.InsertChangesRequest} InsertChangesRequest instance + * @type {{ + * (properties: atomic.InsertChangesRequest.$Shape): atomic.InsertChangesRequest & atomic.InsertChangesRequest.$Shape; + * (properties?: atomic.InsertChangesRequest.$Properties): atomic.InsertChangesRequest; + * }} + */ + InsertChangesRequest.create = function(properties) { + return new InsertChangesRequest(properties); + }; + + /** + * Encodes the specified InsertChangesRequest message. Does not implicitly {@link atomic.InsertChangesRequest.verify|verify} messages. + * @function encode + * @memberof atomic.InsertChangesRequest + * @static + * @param {atomic.InsertChangesRequest.$Properties} message InsertChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InsertChangesRequest.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.singleChange != null && $Object.hasOwnProperty.call(message, "singleChange")) + $root.atomic.Hash.encode(message.singleChange, writer.uint32(/* id 4, wireType 2 =*/34).fork(), _depth + 1).ldelim(); + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.fromView); + if (message.upToTag != null && $Object.hasOwnProperty.call(message, "upToTag")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.upToTag); + if (message.targetView != null && $Object.hasOwnProperty.call(message, "targetView")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetView); + if (message.allowConflicts != null && $Object.hasOwnProperty.call(message, "allowConflicts") && message.allowConflicts !== false) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.allowConflicts); + if (message.target != null && $Object.hasOwnProperty.call(message, "target")) + $root.atomic.ViewRef.encode(message.target, writer.uint32(/* id 12, wireType 2 =*/98).fork(), _depth + 1).ldelim(); + if (message.expectedSnapshot != null && $Object.hasOwnProperty.call(message, "expectedSnapshot")) + $root.atomic.ViewSnapshot.encode(message.expectedSnapshot, writer.uint32(/* id 13, wireType 2 =*/106).fork(), _depth + 1).ldelim(); + if (message.sourceSnapshot != null && $Object.hasOwnProperty.call(message, "sourceSnapshot")) + $root.atomic.ViewSnapshot.encode(message.sourceSnapshot, writer.uint32(/* id 14, wireType 2 =*/114).fork(), _depth + 1).ldelim(); + if (message.applyDependencies != null && $Object.hasOwnProperty.call(message, "applyDependencies")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.applyDependencies); + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.dryRun); + if (message.tagFromView != null && $Object.hasOwnProperty.call(message, "tagFromView")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.tagFromView); + if (message.promoteCurrentView != null && $Object.hasOwnProperty.call(message, "promoteCurrentView")) + $root.atomic.PromoteCurrentView.encode(message.promoteCurrentView, writer.uint32(/* id 18, wireType 2 =*/146).fork(), _depth + 1).ldelim(); + if (message.changeSet != null && $Object.hasOwnProperty.call(message, "changeSet")) + $root.atomic.ChangeSet.encode(message.changeSet, writer.uint32(/* id 19, wireType 2 =*/154).fork(), _depth + 1).ldelim(); + if (message.singleRef != null && $Object.hasOwnProperty.call(message, "singleRef")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.singleRef); + 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 InsertChangesRequest message, length delimited. Does not implicitly {@link atomic.InsertChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.InsertChangesRequest + * @static + * @param {atomic.InsertChangesRequest.$Properties} message InsertChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InsertChangesRequest.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes an InsertChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof atomic.InsertChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.InsertChangesRequest & atomic.InsertChangesRequest.$Shape} InsertChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InsertChangesRequest.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.InsertChangesRequest(); + 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 4: { + if (wireType !== 2) + break; + message.singleChange = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.singleChange); + message.source = "singleChange"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.fromView = reader.stringVerify(); + message.source = "fromView"; + continue; + } + case 6: { + if (wireType !== 2) + break; + message.upToTag = reader.stringVerify(); + message.source = "upToTag"; + continue; + } + case 18: { + if (wireType !== 2) + break; + message.promoteCurrentView = $root.atomic.PromoteCurrentView.decode(reader, reader.size(), $undefined, _depth + 1, message.promoteCurrentView); + message.source = "promoteCurrentView"; + continue; + } + case 19: { + if (wireType !== 2) + break; + message.changeSet = $root.atomic.ChangeSet.decode(reader, reader.size(), $undefined, _depth + 1, message.changeSet); + message.source = "changeSet"; + continue; + } + case 20: { + if (wireType !== 2) + break; + message.singleRef = reader.stringVerify(); + message.source = "singleRef"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.targetView = reader.stringVerify(); + message._target_view = "targetView"; + continue; + } + case 9: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.allowConflicts = value; + else + delete message.allowConflicts; + continue; + } + case 12: { + if (wireType !== 2) + break; + message.target = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.target); + continue; + } + case 13: { + if (wireType !== 2) + break; + message.expectedSnapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.expectedSnapshot); + continue; + } + case 14: { + if (wireType !== 2) + break; + message.sourceSnapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.sourceSnapshot); + message._source_snapshot = "sourceSnapshot"; + continue; + } + case 15: { + if (wireType !== 0) + break; + message.applyDependencies = reader.bool(); + message._apply_dependencies = "applyDependencies"; + continue; + } + case 16: { + if (wireType !== 0) + break; + message.dryRun = reader.bool(); + message._dry_run = "dryRun"; + continue; + } + case 17: { + if (wireType !== 2) + break; + message.tagFromView = reader.stringVerify(); + message._tag_from_view = "tagFromView"; + 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 InsertChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.InsertChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.InsertChangesRequest & atomic.InsertChangesRequest.$Shape} InsertChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InsertChangesRequest.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies an InsertChangesRequest message. + * @function verify + * @memberof atomic.InsertChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InsertChangesRequest.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.singleChange != null && $Object.hasOwnProperty.call(message, "singleChange")) { + properties.source = 1; + { + var error = $root.atomic.Hash.verify(message.singleChange, _depth + 1); + if (error) + return "singleChange." + error; + } + } + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.fromView)) + return "fromView: string expected"; + } + if (message.upToTag != null && $Object.hasOwnProperty.call(message, "upToTag")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.upToTag)) + return "upToTag: string expected"; + } + if (message.promoteCurrentView != null && $Object.hasOwnProperty.call(message, "promoteCurrentView")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.atomic.PromoteCurrentView.verify(message.promoteCurrentView, _depth + 1); + if (error) + return "promoteCurrentView." + error; + } + } + if (message.changeSet != null && $Object.hasOwnProperty.call(message, "changeSet")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.atomic.ChangeSet.verify(message.changeSet, _depth + 1); + if (error) + return "changeSet." + error; + } + } + if (message.singleRef != null && $Object.hasOwnProperty.call(message, "singleRef")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.singleRef)) + return "singleRef: string expected"; + } + if (message.targetView != null && $Object.hasOwnProperty.call(message, "targetView")) { + properties._target_view = 1; + if (!$util.isString(message.targetView)) + return "targetView: string expected"; + } + if (message.allowConflicts != null && $Object.hasOwnProperty.call(message, "allowConflicts")) + if (typeof message.allowConflicts !== "boolean") + return "allowConflicts: boolean expected"; + if (message.target != null && $Object.hasOwnProperty.call(message, "target")) { + var error = $root.atomic.ViewRef.verify(message.target, _depth + 1); + if (error) + return "target." + error; + } + if (message.expectedSnapshot != null && $Object.hasOwnProperty.call(message, "expectedSnapshot")) { + var error = $root.atomic.ViewSnapshot.verify(message.expectedSnapshot, _depth + 1); + if (error) + return "expectedSnapshot." + error; + } + if (message.sourceSnapshot != null && $Object.hasOwnProperty.call(message, "sourceSnapshot")) { + properties._source_snapshot = 1; + { + var error = $root.atomic.ViewSnapshot.verify(message.sourceSnapshot, _depth + 1); + if (error) + return "sourceSnapshot." + error; + } + } + if (message.applyDependencies != null && $Object.hasOwnProperty.call(message, "applyDependencies")) { + properties._apply_dependencies = 1; + if (typeof message.applyDependencies !== "boolean") + return "applyDependencies: boolean expected"; + } + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun")) { + properties._dry_run = 1; + if (typeof message.dryRun !== "boolean") + return "dryRun: boolean expected"; + } + if (message.tagFromView != null && $Object.hasOwnProperty.call(message, "tagFromView")) { + properties._tag_from_view = 1; + if (!$util.isString(message.tagFromView)) + return "tagFromView: string expected"; + } + return null; + }; + + /** + * Creates an InsertChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.InsertChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {atomic.InsertChangesRequest} InsertChangesRequest + */ + InsertChangesRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.InsertChangesRequest) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.InsertChangesRequest: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.InsertChangesRequest(); + if (object.repository != null) { + if (!$util.isObject(object.repository)) + throw $TypeError(".atomic.InsertChangesRequest.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.InsertChangesRequest.meta: object expected"); + message.meta = $root.atomic.RequestMeta.fromObject(object.meta, _depth + 1); + } + if (object.singleChange != null) { + if (!$util.isObject(object.singleChange)) + throw $TypeError(".atomic.InsertChangesRequest.singleChange: object expected"); + message.singleChange = $root.atomic.Hash.fromObject(object.singleChange, _depth + 1); + } + if (object.fromView != null) + message.fromView = $String(object.fromView); + if (object.upToTag != null) + message.upToTag = $String(object.upToTag); + if (object.promoteCurrentView != null) { + if (!$util.isObject(object.promoteCurrentView)) + throw $TypeError(".atomic.InsertChangesRequest.promoteCurrentView: object expected"); + message.promoteCurrentView = $root.atomic.PromoteCurrentView.fromObject(object.promoteCurrentView, _depth + 1); + } + if (object.changeSet != null) { + if (!$util.isObject(object.changeSet)) + throw $TypeError(".atomic.InsertChangesRequest.changeSet: object expected"); + message.changeSet = $root.atomic.ChangeSet.fromObject(object.changeSet, _depth + 1); + } + if (object.singleRef != null) + message.singleRef = $String(object.singleRef); + if (object.targetView != null) + message.targetView = $String(object.targetView); + if (object.allowConflicts != null) + if (object.allowConflicts) + message.allowConflicts = $Boolean(object.allowConflicts); + if (object.target != null) { + if (!$util.isObject(object.target)) + throw $TypeError(".atomic.InsertChangesRequest.target: object expected"); + message.target = $root.atomic.ViewRef.fromObject(object.target, _depth + 1); + } + if (object.expectedSnapshot != null) { + if (!$util.isObject(object.expectedSnapshot)) + throw $TypeError(".atomic.InsertChangesRequest.expectedSnapshot: object expected"); + message.expectedSnapshot = $root.atomic.ViewSnapshot.fromObject(object.expectedSnapshot, _depth + 1); + } + if (object.sourceSnapshot != null) { + if (!$util.isObject(object.sourceSnapshot)) + throw $TypeError(".atomic.InsertChangesRequest.sourceSnapshot: object expected"); + message.sourceSnapshot = $root.atomic.ViewSnapshot.fromObject(object.sourceSnapshot, _depth + 1); + } + if (object.applyDependencies != null) + message.applyDependencies = $Boolean(object.applyDependencies); + if (object.dryRun != null) + message.dryRun = $Boolean(object.dryRun); + if (object.tagFromView != null) + message.tagFromView = $String(object.tagFromView); + return message; + }; + + /** + * Creates a plain object from an InsertChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.InsertChangesRequest + * @static + * @param {atomic.InsertChangesRequest} message InsertChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InsertChangesRequest.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.allowConflicts = false; + object.target = null; + object.expectedSnapshot = null; + } + 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.singleChange != null && $Object.hasOwnProperty.call(message, "singleChange")) { + object.singleChange = $root.atomic.Hash.toObject(message.singleChange, options, _depth + 1); + if (options.oneofs) + object.source = "singleChange"; + } + if (message.fromView != null && $Object.hasOwnProperty.call(message, "fromView")) { + object.fromView = message.fromView; + if (options.oneofs) + object.source = "fromView"; + } + if (message.upToTag != null && $Object.hasOwnProperty.call(message, "upToTag")) { + object.upToTag = message.upToTag; + if (options.oneofs) + object.source = "upToTag"; + } + if (message.targetView != null && $Object.hasOwnProperty.call(message, "targetView")) + object.targetView = message.targetView; + if (message.allowConflicts != null && $Object.hasOwnProperty.call(message, "allowConflicts")) + object.allowConflicts = message.allowConflicts; + if (message.target != null && $Object.hasOwnProperty.call(message, "target")) + object.target = $root.atomic.ViewRef.toObject(message.target, options, _depth + 1); + if (message.expectedSnapshot != null && $Object.hasOwnProperty.call(message, "expectedSnapshot")) + object.expectedSnapshot = $root.atomic.ViewSnapshot.toObject(message.expectedSnapshot, options, _depth + 1); + if (message.sourceSnapshot != null && $Object.hasOwnProperty.call(message, "sourceSnapshot")) + object.sourceSnapshot = $root.atomic.ViewSnapshot.toObject(message.sourceSnapshot, options, _depth + 1); + if (message.applyDependencies != null && $Object.hasOwnProperty.call(message, "applyDependencies")) + object.applyDependencies = message.applyDependencies; + if (message.dryRun != null && $Object.hasOwnProperty.call(message, "dryRun")) + object.dryRun = message.dryRun; + if (message.tagFromView != null && $Object.hasOwnProperty.call(message, "tagFromView")) + object.tagFromView = message.tagFromView; + if (message.promoteCurrentView != null && $Object.hasOwnProperty.call(message, "promoteCurrentView")) { + object.promoteCurrentView = $root.atomic.PromoteCurrentView.toObject(message.promoteCurrentView, options, _depth + 1); + if (options.oneofs) + object.source = "promoteCurrentView"; + } + if (message.changeSet != null && $Object.hasOwnProperty.call(message, "changeSet")) { + object.changeSet = $root.atomic.ChangeSet.toObject(message.changeSet, options, _depth + 1); + if (options.oneofs) + object.source = "changeSet"; + } + if (message.singleRef != null && $Object.hasOwnProperty.call(message, "singleRef")) { + object.singleRef = message.singleRef; + if (options.oneofs) + object.source = "singleRef"; + } + return object; + }; + + /** + * Converts this InsertChangesRequest to JSON. + * @function toJSON + * @memberof atomic.InsertChangesRequest + * @instance + * @returns {Object.} JSON object + */ + InsertChangesRequest.prototype.toJSON = function() { + return InsertChangesRequest.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for InsertChangesRequest + * @function getTypeUrl + * @memberof atomic.InsertChangesRequest + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + InsertChangesRequest.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.InsertChangesRequest"; + }; + + return InsertChangesRequest; + })(); + + atomic.PromoteCurrentView = (function() { + + /** + * Properties of a PromoteCurrentView. + * @typedef {Object} atomic.PromoteCurrentView.$Properties + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a PromoteCurrentView. + * @memberof atomic + * @interface IPromoteCurrentView + * @augments atomic.PromoteCurrentView.$Properties + * @deprecated Use atomic.PromoteCurrentView.$Properties instead. + */ + + /** + * Shape of a PromoteCurrentView. + * @typedef {atomic.PromoteCurrentView.$Properties} atomic.PromoteCurrentView.$Shape + */ + + /** + * Constructs a new PromoteCurrentView. + * @memberof atomic + * @classdesc Represents a PromoteCurrentView. + * @constructor + * @param {atomic.PromoteCurrentView.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var PromoteCurrentView = 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]]; + }; + + /** + * Creates a new PromoteCurrentView instance using the specified properties. + * @function create + * @memberof atomic.PromoteCurrentView + * @static + * @param {atomic.PromoteCurrentView.$Properties=} [properties] Properties to set + * @returns {atomic.PromoteCurrentView} PromoteCurrentView instance + * @type {{ + * (properties: atomic.PromoteCurrentView.$Shape): atomic.PromoteCurrentView & atomic.PromoteCurrentView.$Shape; + * (properties?: atomic.PromoteCurrentView.$Properties): atomic.PromoteCurrentView; + * }} + */ + PromoteCurrentView.create = function(properties) { + return new PromoteCurrentView(properties); + }; + + /** + * Encodes the specified PromoteCurrentView message. Does not implicitly {@link atomic.PromoteCurrentView.verify|verify} messages. + * @function encode + * @memberof atomic.PromoteCurrentView + * @static + * @param {atomic.PromoteCurrentView.$Properties} message PromoteCurrentView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PromoteCurrentView.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.$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 PromoteCurrentView message, length delimited. Does not implicitly {@link atomic.PromoteCurrentView.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.PromoteCurrentView + * @static + * @param {atomic.PromoteCurrentView.$Properties} message PromoteCurrentView message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PromoteCurrentView.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a PromoteCurrentView message from the specified reader or buffer. + * @function decode + * @memberof atomic.PromoteCurrentView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.PromoteCurrentView & atomic.PromoteCurrentView.$Shape} PromoteCurrentView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PromoteCurrentView.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.PromoteCurrentView(); + while (reader.pos < end) { + var start = reader.pos; + var tag = reader.tag(); + if (tag === _end) { + _end = $undefined; + break; + } + reader.skipType(tag & 7, _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 PromoteCurrentView message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.PromoteCurrentView + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.PromoteCurrentView & atomic.PromoteCurrentView.$Shape} PromoteCurrentView + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PromoteCurrentView.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a PromoteCurrentView message. + * @function verify + * @memberof atomic.PromoteCurrentView + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PromoteCurrentView.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"; + return null; + }; + + /** + * Creates a PromoteCurrentView message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.PromoteCurrentView + * @static + * @param {Object.} object Plain object + * @returns {atomic.PromoteCurrentView} PromoteCurrentView + */ + PromoteCurrentView.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PromoteCurrentView) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.PromoteCurrentView: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + return new $root.atomic.PromoteCurrentView(); + }; + + /** + * Creates a plain object from a PromoteCurrentView message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.PromoteCurrentView + * @static + * @param {atomic.PromoteCurrentView} message PromoteCurrentView + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PromoteCurrentView.toObject = function () { + return {}; + }; + + /** + * Converts this PromoteCurrentView to JSON. + * @function toJSON + * @memberof atomic.PromoteCurrentView + * @instance + * @returns {Object.} JSON object + */ + PromoteCurrentView.prototype.toJSON = function() { + return PromoteCurrentView.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for PromoteCurrentView + * @function getTypeUrl + * @memberof atomic.PromoteCurrentView + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + PromoteCurrentView.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.PromoteCurrentView"; + }; + + return PromoteCurrentView; + })(); + + atomic.ChangeSet = (function() { + + /** + * Properties of a ChangeSet. + * @typedef {Object} atomic.ChangeSet.$Properties + * @property {Array.|null} [changes] ChangeSet changes + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of a ChangeSet. + * @memberof atomic + * @interface IChangeSet + * @augments atomic.ChangeSet.$Properties + * @deprecated Use atomic.ChangeSet.$Properties instead. + */ + + /** + * Shape of a ChangeSet. + * @typedef {atomic.ChangeSet.$Properties} atomic.ChangeSet.$Shape + */ + + /** + * Constructs a new ChangeSet. + * @memberof atomic + * @classdesc Represents a ChangeSet. + * @constructor + * @param {atomic.ChangeSet.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var ChangeSet = function (properties) { + this.changes = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * ChangeSet changes. + * @member {Array.} changes + * @memberof atomic.ChangeSet + * @instance + */ + ChangeSet.prototype.changes = $util.emptyArray; + + /** + * Creates a new ChangeSet instance using the specified properties. + * @function create + * @memberof atomic.ChangeSet + * @static + * @param {atomic.ChangeSet.$Properties=} [properties] Properties to set + * @returns {atomic.ChangeSet} ChangeSet instance + * @type {{ + * (properties: atomic.ChangeSet.$Shape): atomic.ChangeSet & atomic.ChangeSet.$Shape; + * (properties?: atomic.ChangeSet.$Properties): atomic.ChangeSet; + * }} + */ + ChangeSet.create = function(properties) { + return new ChangeSet(properties); + }; + + /** + * Encodes the specified ChangeSet message. Does not implicitly {@link atomic.ChangeSet.verify|verify} messages. + * @function encode + * @memberof atomic.ChangeSet + * @static + * @param {atomic.ChangeSet.$Properties} message ChangeSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeSet.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.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.changes[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 ChangeSet message, length delimited. Does not implicitly {@link atomic.ChangeSet.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.ChangeSet + * @static + * @param {atomic.ChangeSet.$Properties} message ChangeSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeSet.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes a ChangeSet message from the specified reader or buffer. + * @function decode + * @memberof atomic.ChangeSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.ChangeSet & atomic.ChangeSet.$Shape} ChangeSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeSet.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.ChangeSet(); + 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.changes && message.changes.length)) + message.changes = []; + message.changes.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 ChangeSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.ChangeSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.ChangeSet & atomic.ChangeSet.$Shape} ChangeSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeSet.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies a ChangeSet message. + * @function verify + * @memberof atomic.ChangeSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeSet.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.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) + if (!$util.isString(message.changes[i])) + return "changes: string[] expected"; + } + return null; + }; + + /** + * Creates a ChangeSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.ChangeSet + * @static + * @param {Object.} object Plain object + * @returns {atomic.ChangeSet} ChangeSet + */ + ChangeSet.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ChangeSet) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.ChangeSet: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.ChangeSet(); + if (object.changes) { + if (!$Array.isArray(object.changes)) + throw $TypeError(".atomic.ChangeSet.changes: array expected"); + message.changes = $Array(object.changes.length); + for (var i = 0; i < object.changes.length; ++i) + message.changes[i] = $String(object.changes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ChangeSet message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.ChangeSet + * @static + * @param {atomic.ChangeSet} message ChangeSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeSet.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 (message.changes && message.changes.length) { + object.changes = $Array(message.changes.length); + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = message.changes[j]; + } + return object; + }; + + /** + * Converts this ChangeSet to JSON. + * @function toJSON + * @memberof atomic.ChangeSet + * @instance + * @returns {Object.} JSON object + */ + ChangeSet.prototype.toJSON = function() { + return ChangeSet.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for ChangeSet + * @function getTypeUrl + * @memberof atomic.ChangeSet + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + ChangeSet.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.ChangeSet"; + }; + + return ChangeSet; + })(); + + atomic.InsertChangesResponse = (function() { + + /** + * Properties of an InsertChangesResponse. + * @typedef {Object} atomic.InsertChangesResponse.$Properties + * @property {Array.|null} [inserted] InsertChangesResponse inserted + * @property {Array.|null} [conflicts] InsertChangesResponse conflicts + * @property {string|null} [resolvedSourceView] InsertChangesResponse resolvedSourceView + * @property {string|null} [resolvedTargetView] InsertChangesResponse resolvedTargetView + * @property {boolean|null} [bothViewsShared] InsertChangesResponse bothViewsShared + * @property {atomic.Hash.$Properties|null} [resolvedChange] InsertChangesResponse resolvedChange + * @property {atomic.Hash.$Properties|null} [newState] InsertChangesResponse newState + * @property {number|null} [skippedCount] InsertChangesResponse skippedCount + * @property {number|Long|null} [filesUpdated] InsertChangesResponse filesUpdated + * @property {number|Long|null} [directoriesCreated] InsertChangesResponse directoriesCreated + * @property {boolean|null} [hasConflicts] InsertChangesResponse hasConflicts + * @property {atomic.ResponseMeta.$Properties|null} [meta] InsertChangesResponse meta + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + + /** + * Properties of an InsertChangesResponse. + * @memberof atomic + * @interface IInsertChangesResponse + * @augments atomic.InsertChangesResponse.$Properties + * @deprecated Use atomic.InsertChangesResponse.$Properties instead. + */ + + /** + * Shape of an InsertChangesResponse. + * @typedef {atomic.InsertChangesResponse.$Properties} atomic.InsertChangesResponse.$Shape + */ + + /** + * Constructs a new InsertChangesResponse. + * @memberof atomic + * @classdesc Represents an InsertChangesResponse. + * @constructor + * @param {atomic.InsertChangesResponse.$Properties=} [properties] Properties to set + * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled + */ + var InsertChangesResponse = function (properties) { + this.inserted = []; + this.conflicts = []; + if (properties) + for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + }; + + /** + * InsertChangesResponse inserted. + * @member {Array.} inserted + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.inserted = $util.emptyArray; + + /** + * InsertChangesResponse conflicts. + * @member {Array.} conflicts + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.conflicts = $util.emptyArray; + + /** + * InsertChangesResponse resolvedSourceView. + * @member {string|null|undefined} resolvedSourceView + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.resolvedSourceView = null; + + /** + * InsertChangesResponse resolvedTargetView. + * @member {string|null|undefined} resolvedTargetView + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.resolvedTargetView = null; + + /** + * InsertChangesResponse bothViewsShared. + * @member {boolean|null|undefined} bothViewsShared + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.bothViewsShared = null; + + /** + * InsertChangesResponse resolvedChange. + * @member {atomic.Hash.$Properties|null|undefined} resolvedChange + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.resolvedChange = null; + + /** + * InsertChangesResponse newState. + * @member {atomic.Hash.$Properties|null|undefined} newState + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.newState = null; + + /** + * InsertChangesResponse skippedCount. + * @member {number} skippedCount + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.skippedCount = 0; + + /** + * InsertChangesResponse filesUpdated. + * @member {number|Long|null|undefined} filesUpdated + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.filesUpdated = null; + + /** + * InsertChangesResponse directoriesCreated. + * @member {number|Long|null|undefined} directoriesCreated + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.directoriesCreated = null; + + /** + * InsertChangesResponse hasConflicts. + * @member {boolean} hasConflicts + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.hasConflicts = false; + + /** + * InsertChangesResponse meta. + * @member {atomic.ResponseMeta.$Properties|null|undefined} meta + * @memberof atomic.InsertChangesResponse + * @instance + */ + InsertChangesResponse.prototype.meta = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesResponse.prototype, "_resolved_source_view", { + get: $util.oneOfGetter($oneOfFields = ["resolvedSourceView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesResponse.prototype, "_resolved_target_view", { + get: $util.oneOfGetter($oneOfFields = ["resolvedTargetView"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesResponse.prototype, "_both_views_shared", { + get: $util.oneOfGetter($oneOfFields = ["bothViewsShared"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesResponse.prototype, "_resolved_change", { + get: $util.oneOfGetter($oneOfFields = ["resolvedChange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesResponse.prototype, "_new_state", { + get: $util.oneOfGetter($oneOfFields = ["newState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesResponse.prototype, "_files_updated", { + get: $util.oneOfGetter($oneOfFields = ["filesUpdated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(InsertChangesResponse.prototype, "_directories_created", { + get: $util.oneOfGetter($oneOfFields = ["directoriesCreated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InsertChangesResponse instance using the specified properties. + * @function create + * @memberof atomic.InsertChangesResponse + * @static + * @param {atomic.InsertChangesResponse.$Properties=} [properties] Properties to set + * @returns {atomic.InsertChangesResponse} InsertChangesResponse instance + * @type {{ + * (properties: atomic.InsertChangesResponse.$Shape): atomic.InsertChangesResponse & atomic.InsertChangesResponse.$Shape; + * (properties?: atomic.InsertChangesResponse.$Properties): atomic.InsertChangesResponse; + * }} + */ + InsertChangesResponse.create = function(properties) { + return new InsertChangesResponse(properties); + }; + + /** + * Encodes the specified InsertChangesResponse message. Does not implicitly {@link atomic.InsertChangesResponse.verify|verify} messages. + * @function encode + * @memberof atomic.InsertChangesResponse + * @static + * @param {atomic.InsertChangesResponse.$Properties} message InsertChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InsertChangesResponse.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.inserted != null && message.inserted.length) + for (var i = 0; i < message.inserted.length; ++i) + $root.atomic.ChangeInfo.encode(message.inserted[i], writer.uint32(/* id 1, wireType 2 =*/10).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.resolvedSourceView != null && $Object.hasOwnProperty.call(message, "resolvedSourceView")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resolvedSourceView); + if (message.resolvedTargetView != null && $Object.hasOwnProperty.call(message, "resolvedTargetView")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.resolvedTargetView); + if (message.bothViewsShared != null && $Object.hasOwnProperty.call(message, "bothViewsShared")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.bothViewsShared); + if (message.resolvedChange != null && $Object.hasOwnProperty.call(message, "resolvedChange")) + $root.atomic.Hash.encode(message.resolvedChange, writer.uint32(/* id 7, wireType 2 =*/58).fork(), _depth + 1).ldelim(); + if (message.newState != null && $Object.hasOwnProperty.call(message, "newState")) + $root.atomic.Hash.encode(message.newState, writer.uint32(/* id 8, wireType 2 =*/66).fork(), _depth + 1).ldelim(); + if (message.skippedCount != null && $Object.hasOwnProperty.call(message, "skippedCount") && message.skippedCount !== 0) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.skippedCount); + if (message.filesUpdated != null && $Object.hasOwnProperty.call(message, "filesUpdated")) + writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.filesUpdated); + if (message.directoriesCreated != null && $Object.hasOwnProperty.call(message, "directoriesCreated")) + writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.directoriesCreated); + if (message.hasConflicts != null && $Object.hasOwnProperty.call(message, "hasConflicts") && message.hasConflicts !== false) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.hasConflicts); + 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 InsertChangesResponse message, length delimited. Does not implicitly {@link atomic.InsertChangesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof atomic.InsertChangesResponse + * @static + * @param {atomic.InsertChangesResponse.$Properties} message InsertChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InsertChangesResponse.encodeDelimited = function(message, writer) { + return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); + }; + + /** + * Decodes an InsertChangesResponse message from the specified reader or buffer. + * @function decode + * @memberof atomic.InsertChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {atomic.InsertChangesResponse & atomic.InsertChangesResponse.$Shape} InsertChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InsertChangesResponse.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.InsertChangesResponse(); + 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.inserted && message.inserted.length)) + message.inserted = []; + message.inserted.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.resolvedSourceView = reader.stringVerify(); + message._resolved_source_view = "resolvedSourceView"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.resolvedTargetView = reader.stringVerify(); + message._resolved_target_view = "resolvedTargetView"; + continue; + } + case 6: { + if (wireType !== 0) + break; + message.bothViewsShared = reader.bool(); + message._both_views_shared = "bothViewsShared"; + continue; + } + case 7: { + if (wireType !== 2) + break; + message.resolvedChange = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.resolvedChange); + message._resolved_change = "resolvedChange"; + continue; + } + case 8: { + if (wireType !== 2) + break; + message.newState = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.newState); + message._new_state = "newState"; + continue; + } + case 9: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.skippedCount = value; + else + delete message.skippedCount; + continue; + } + case 10: { + if (wireType !== 0) + break; + message.filesUpdated = reader.uint64(); + message._files_updated = "filesUpdated"; + continue; + } + case 11: { + if (wireType !== 0) + break; + message.directoriesCreated = reader.uint64(); + message._directories_created = "directoriesCreated"; + continue; + } + case 12: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.hasConflicts = value; + else + delete message.hasConflicts; + 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 InsertChangesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof atomic.InsertChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {atomic.InsertChangesResponse & atomic.InsertChangesResponse.$Shape} InsertChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InsertChangesResponse.decodeDelimited = function(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.size()); + }; + + /** + * Verifies an InsertChangesResponse message. + * @function verify + * @memberof atomic.InsertChangesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InsertChangesResponse.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.inserted != null && $Object.hasOwnProperty.call(message, "inserted")) { + if (!$Array.isArray(message.inserted)) + return "inserted: array expected"; + for (var i = 0; i < message.inserted.length; ++i) { + var error = $root.atomic.ChangeInfo.verify(message.inserted[i], _depth + 1); + if (error) + return "inserted." + 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.resolvedSourceView != null && $Object.hasOwnProperty.call(message, "resolvedSourceView")) { + properties._resolved_source_view = 1; + if (!$util.isString(message.resolvedSourceView)) + return "resolvedSourceView: string expected"; + } + if (message.resolvedTargetView != null && $Object.hasOwnProperty.call(message, "resolvedTargetView")) { + properties._resolved_target_view = 1; + if (!$util.isString(message.resolvedTargetView)) + return "resolvedTargetView: string expected"; + } + if (message.bothViewsShared != null && $Object.hasOwnProperty.call(message, "bothViewsShared")) { + properties._both_views_shared = 1; + if (typeof message.bothViewsShared !== "boolean") + return "bothViewsShared: boolean expected"; + } + if (message.resolvedChange != null && $Object.hasOwnProperty.call(message, "resolvedChange")) { + properties._resolved_change = 1; + { + var error = $root.atomic.Hash.verify(message.resolvedChange, _depth + 1); + if (error) + return "resolvedChange." + error; + } + } + if (message.newState != null && $Object.hasOwnProperty.call(message, "newState")) { + properties._new_state = 1; + { + var error = $root.atomic.Hash.verify(message.newState, _depth + 1); + if (error) + return "newState." + error; + } + } + if (message.skippedCount != null && $Object.hasOwnProperty.call(message, "skippedCount")) + if (!$util.isInteger(message.skippedCount)) + return "skippedCount: integer expected"; + if (message.filesUpdated != null && $Object.hasOwnProperty.call(message, "filesUpdated")) { + properties._files_updated = 1; + if (!$util.isInteger(message.filesUpdated) && !(message.filesUpdated && $util.isInteger(message.filesUpdated.low) && $util.isInteger(message.filesUpdated.high))) + return "filesUpdated: integer|Long expected"; + } + if (message.directoriesCreated != null && $Object.hasOwnProperty.call(message, "directoriesCreated")) { + properties._directories_created = 1; + if (!$util.isInteger(message.directoriesCreated) && !(message.directoriesCreated && $util.isInteger(message.directoriesCreated.low) && $util.isInteger(message.directoriesCreated.high))) + return "directoriesCreated: integer|Long expected"; + } + if (message.hasConflicts != null && $Object.hasOwnProperty.call(message, "hasConflicts")) + if (typeof message.hasConflicts !== "boolean") + return "hasConflicts: 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 InsertChangesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof atomic.InsertChangesResponse + * @static + * @param {Object.} object Plain object + * @returns {atomic.InsertChangesResponse} InsertChangesResponse + */ + InsertChangesResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.InsertChangesResponse) + return object; + if (!$util.isObject(object)) + throw $TypeError(".atomic.InsertChangesResponse: object expected"); + if (_depth === $undefined) + _depth = 0; + if (_depth > $util.recursionLimit) + throw $Error("max depth exceeded"); + var message = new $root.atomic.InsertChangesResponse(); + if (object.inserted) { + if (!$Array.isArray(object.inserted)) + throw $TypeError(".atomic.InsertChangesResponse.inserted: array expected"); + message.inserted = $Array(object.inserted.length); + for (var i = 0; i < object.inserted.length; ++i) { + if (!$util.isObject(object.inserted[i])) + throw $TypeError(".atomic.InsertChangesResponse.inserted: object expected"); + message.inserted[i] = $root.atomic.ChangeInfo.fromObject(object.inserted[i], _depth + 1); + } + } + if (object.conflicts) { + if (!$Array.isArray(object.conflicts)) + throw $TypeError(".atomic.InsertChangesResponse.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.InsertChangesResponse.conflicts: object expected"); + message.conflicts[i] = $root.atomic.ConflictInfo.fromObject(object.conflicts[i], _depth + 1); + } + } + if (object.resolvedSourceView != null) + message.resolvedSourceView = $String(object.resolvedSourceView); + if (object.resolvedTargetView != null) + message.resolvedTargetView = $String(object.resolvedTargetView); + if (object.bothViewsShared != null) + message.bothViewsShared = $Boolean(object.bothViewsShared); + if (object.resolvedChange != null) { + if (!$util.isObject(object.resolvedChange)) + throw $TypeError(".atomic.InsertChangesResponse.resolvedChange: object expected"); + message.resolvedChange = $root.atomic.Hash.fromObject(object.resolvedChange, _depth + 1); + } + if (object.newState != null) { + if (!$util.isObject(object.newState)) + throw $TypeError(".atomic.InsertChangesResponse.newState: object expected"); + message.newState = $root.atomic.Hash.fromObject(object.newState, _depth + 1); + } + if (object.skippedCount != null) + if ($Number(object.skippedCount) !== 0) + message.skippedCount = object.skippedCount >>> 0; + if (object.filesUpdated != null) + if ($util.Long) + message.filesUpdated = $util.Long.fromValue(object.filesUpdated, true); + else if (typeof object.filesUpdated === "string") + message.filesUpdated = $parseInt(object.filesUpdated, 10); + else if (typeof object.filesUpdated === "number") + message.filesUpdated = object.filesUpdated; + else if (typeof object.filesUpdated === "object") + message.filesUpdated = new $util.LongBits(object.filesUpdated.low >>> 0, object.filesUpdated.high >>> 0).toNumber(true); + if (object.directoriesCreated != null) + if ($util.Long) + message.directoriesCreated = $util.Long.fromValue(object.directoriesCreated, true); + else if (typeof object.directoriesCreated === "string") + message.directoriesCreated = $parseInt(object.directoriesCreated, 10); + else if (typeof object.directoriesCreated === "number") + message.directoriesCreated = object.directoriesCreated; + else if (typeof object.directoriesCreated === "object") + message.directoriesCreated = new $util.LongBits(object.directoriesCreated.low >>> 0, object.directoriesCreated.high >>> 0).toNumber(true); + if (object.hasConflicts != null) + if (object.hasConflicts) + message.hasConflicts = $Boolean(object.hasConflicts); + if (object.meta != null) { + if (!$util.isObject(object.meta)) + throw $TypeError(".atomic.InsertChangesResponse.meta: object expected"); + message.meta = $root.atomic.ResponseMeta.fromObject(object.meta, _depth + 1); + } + return message; + }; + + /** + * Creates a plain object from an InsertChangesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof atomic.InsertChangesResponse + * @static + * @param {atomic.InsertChangesResponse} message InsertChangesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InsertChangesResponse.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.inserted = []; + object.conflicts = []; + } + if (options.defaults) { + object.skippedCount = 0; + object.hasConflicts = false; + object.meta = null; + } + if (message.inserted && message.inserted.length) { + object.inserted = $Array(message.inserted.length); + for (var j = 0; j < message.inserted.length; ++j) + object.inserted[j] = $root.atomic.ChangeInfo.toObject(message.inserted[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.resolvedSourceView != null && $Object.hasOwnProperty.call(message, "resolvedSourceView")) + object.resolvedSourceView = message.resolvedSourceView; + if (message.resolvedTargetView != null && $Object.hasOwnProperty.call(message, "resolvedTargetView")) + object.resolvedTargetView = message.resolvedTargetView; + if (message.bothViewsShared != null && $Object.hasOwnProperty.call(message, "bothViewsShared")) + object.bothViewsShared = message.bothViewsShared; + if (message.resolvedChange != null && $Object.hasOwnProperty.call(message, "resolvedChange")) + object.resolvedChange = $root.atomic.Hash.toObject(message.resolvedChange, options, _depth + 1); + if (message.newState != null && $Object.hasOwnProperty.call(message, "newState")) + object.newState = $root.atomic.Hash.toObject(message.newState, options, _depth + 1); + if (message.skippedCount != null && $Object.hasOwnProperty.call(message, "skippedCount")) + object.skippedCount = message.skippedCount; + if (message.filesUpdated != null && $Object.hasOwnProperty.call(message, "filesUpdated")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.filesUpdated = typeof message.filesUpdated === "number" ? $BigInt(message.filesUpdated) : $util.Long.fromBits(message.filesUpdated.low >>> 0, message.filesUpdated.high >>> 0, true).toBigInt(); + else if (typeof message.filesUpdated === "number") + object.filesUpdated = options.longs === $String ? $String(message.filesUpdated) : message.filesUpdated; + else + object.filesUpdated = options.longs === $String ? $util.Long.prototype.toString.call(message.filesUpdated) : options.longs === $Number ? new $util.LongBits(message.filesUpdated.low >>> 0, message.filesUpdated.high >>> 0).toNumber(true) : message.filesUpdated; + if (message.directoriesCreated != null && $Object.hasOwnProperty.call(message, "directoriesCreated")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.directoriesCreated = typeof message.directoriesCreated === "number" ? $BigInt(message.directoriesCreated) : $util.Long.fromBits(message.directoriesCreated.low >>> 0, message.directoriesCreated.high >>> 0, true).toBigInt(); + else if (typeof message.directoriesCreated === "number") + object.directoriesCreated = options.longs === $String ? $String(message.directoriesCreated) : message.directoriesCreated; + else + object.directoriesCreated = options.longs === $String ? $util.Long.prototype.toString.call(message.directoriesCreated) : options.longs === $Number ? new $util.LongBits(message.directoriesCreated.low >>> 0, message.directoriesCreated.high >>> 0).toNumber(true) : message.directoriesCreated; + if (message.hasConflicts != null && $Object.hasOwnProperty.call(message, "hasConflicts")) + object.hasConflicts = message.hasConflicts; + if (message.meta != null && $Object.hasOwnProperty.call(message, "meta")) + object.meta = $root.atomic.ResponseMeta.toObject(message.meta, options, _depth + 1); + return object; + }; + + /** + * Converts this InsertChangesResponse to JSON. + * @function toJSON + * @memberof atomic.InsertChangesResponse + * @instance + * @returns {Object.} JSON object + */ + InsertChangesResponse.prototype.toJSON = function() { + return InsertChangesResponse.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the type url for InsertChangesResponse + * @function getTypeUrl + * @memberof atomic.InsertChangesResponse + * @static + * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns {string} The type url + */ + InsertChangesResponse.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.InsertChangesResponse"; + }; + + return InsertChangesResponse; + })(); + + 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.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.VaultListSort|null} [sort] ListVaultEntriesRequest sort + * @property {boolean|null} [reverse] ListVaultEntriesRequest reverse + * @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 sort. + * @member {atomic.VaultListSort|null|undefined} sort + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.sort = null; + + /** + * ListVaultEntriesRequest reverse. + * @member {boolean} reverse + * @memberof atomic.ListVaultEntriesRequest + * @instance + */ + ListVaultEntriesRequest.prototype.reverse = 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) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ListVaultEntriesRequest.prototype, "_sort", { + get: $util.oneOfGetter($oneOfFields = ["sort"]), + 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.sort != null && $Object.hasOwnProperty.call(message, "sort")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.sort); + if (message.reverse != null && $Object.hasOwnProperty.call(message, "reverse") && message.reverse !== false) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.reverse); + 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 12: { + if (wireType !== 0) + break; + message.sort = reader.int32(); + message._sort = "sort"; + continue; + } + case 13: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.reverse = value; + else + delete message.reverse; + 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.sort != null && $Object.hasOwnProperty.call(message, "sort")) { + properties._sort = 1; + if (typeof message.sort !== "number" || (message.sort | 0) !== message.sort) + return "sort: enum value expected"; + } + if (message.reverse != null && $Object.hasOwnProperty.call(message, "reverse")) + if (typeof message.reverse !== "boolean") + return "reverse: 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); + switch (object.sort) { + case "VAULT_LIST_SORT_UNSPECIFIED": + case 0: + message.sort = 0; + break; + case "VAULT_LIST_SORT_ID": + case 1: + message.sort = 1; + break; + case "VAULT_LIST_SORT_UPDATED": + case 2: + message.sort = 2; + break; + case "VAULT_LIST_SORT_TITLE": + case 3: + message.sort = 3; + break; + case "VAULT_LIST_SORT_STATUS": + case 4: + message.sort = 4; + break; + case "VAULT_LIST_SORT_KIND": + case 5: + message.sort = 5; + break; + case "VAULT_LIST_SORT_ABOUT": + case 6: + message.sort = 6; + break; + case "VAULT_LIST_SORT_ATTESTED": + case 7: + message.sort = 7; + break; + case "VAULT_LIST_SORT_VERIFIES": + case 8: + message.sort = 8; + break; + default: + if (typeof object.sort === "number" && (object.sort | 0) === object.sort) + message.sort = object.sort; + } + if (object.reverse != null) + if (object.reverse) + message.reverse = $Boolean(object.reverse); + 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.reverse = 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.sort != null && $Object.hasOwnProperty.call(message, "sort")) + object.sort = options.enums === $String ? $root.atomic.VaultListSort[message.sort] === $undefined ? message.sort : $root.atomic.VaultListSort[message.sort] : message.sort; + if (message.reverse != null && $Object.hasOwnProperty.call(message, "reverse")) + object.reverse = message.reverse; + 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; + })(); + + /** + * VaultListSort enum. + * @name atomic.VaultListSort + * @enum {number} + * @property {number} VAULT_LIST_SORT_UNSPECIFIED=0 VAULT_LIST_SORT_UNSPECIFIED value + * @property {number} VAULT_LIST_SORT_ID=1 VAULT_LIST_SORT_ID value + * @property {number} VAULT_LIST_SORT_UPDATED=2 VAULT_LIST_SORT_UPDATED value + * @property {number} VAULT_LIST_SORT_TITLE=3 VAULT_LIST_SORT_TITLE value + * @property {number} VAULT_LIST_SORT_STATUS=4 VAULT_LIST_SORT_STATUS value + * @property {number} VAULT_LIST_SORT_KIND=5 VAULT_LIST_SORT_KIND value + * @property {number} VAULT_LIST_SORT_ABOUT=6 VAULT_LIST_SORT_ABOUT value + * @property {number} VAULT_LIST_SORT_ATTESTED=7 VAULT_LIST_SORT_ATTESTED value + * @property {number} VAULT_LIST_SORT_VERIFIES=8 VAULT_LIST_SORT_VERIFIES value + */ + atomic.VaultListSort = (function() { + var valuesById = $Object.create(null), values = $Object.create(valuesById); + values[valuesById[0] = "VAULT_LIST_SORT_UNSPECIFIED"] = 0; + values[valuesById[1] = "VAULT_LIST_SORT_ID"] = 1; + values[valuesById[2] = "VAULT_LIST_SORT_UPDATED"] = 2; + values[valuesById[3] = "VAULT_LIST_SORT_TITLE"] = 3; + values[valuesById[4] = "VAULT_LIST_SORT_STATUS"] = 4; + values[valuesById[5] = "VAULT_LIST_SORT_KIND"] = 5; + values[valuesById[6] = "VAULT_LIST_SORT_ABOUT"] = 6; + values[valuesById[7] = "VAULT_LIST_SORT_ATTESTED"] = 7; + values[valuesById[8] = "VAULT_LIST_SORT_VERIFIES"] = 8; + return values; + })(); + + 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 (message.memoryStatus != null && $Object.hasOwnProperty.call(message, "memoryStatus")) { - properties._memory_status = 1; - if (!$util.isString(message.memoryStatus)) - return "memoryStatus: string expected"; + 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; } - if (message.aboutCount != null && $Object.hasOwnProperty.call(message, "aboutCount")) { - properties._about_count = 1; - if (!$util.isInteger(message.aboutCount)) - return "aboutCount: integer expected"; + 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 (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 (length !== $undefined) { + if (reader.pos !== end) + throw $RangeError("index out of range"); + reader.len = length; } - if (message.updatedAtLabel != null && $Object.hasOwnProperty.call(message, "updatedAtLabel")) { - properties._updated_at_label = 1; - if (!$util.isString(message.updatedAtLabel)) - return "updatedAtLabel: string expected"; + 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.entryType != null && $Object.hasOwnProperty.call(message, "entryType")) { - properties._entry_type = 1; - if (!$util.isString(message.entryType)) - return "entryType: string expected"; + if (message.maxEntries != null && $Object.hasOwnProperty.call(message, "maxEntries")) { + properties._max_entries = 1; + if (!$util.isInteger(message.maxEntries)) + return "maxEntries: integer 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.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.turns != null && $Object.hasOwnProperty.call(message, "turns")) { - properties._turns = 1; - if (!$util.isInteger(message.turns)) - return "turns: integer 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.assignee != null && $Object.hasOwnProperty.call(message, "assignee")) { - properties._assignee = 1; - if (!$util.isString(message.assignee)) - return "assignee: 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.statusLabel != null && $Object.hasOwnProperty.call(message, "statusLabel")) { - properties._status_label = 1; - if (!$util.isString(message.statusLabel)) - return "statusLabel: 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.developer != null && $Object.hasOwnProperty.call(message, "developer")) { - properties._developer = 1; - if (!$util.isString(message.developer)) - return "developer: 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.goalDir != null && $Object.hasOwnProperty.call(message, "goalDir")) { - properties._goal_dir = 1; - if (!$util.isString(message.goalDir)) - return "goalDir: string 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.goalFile != null && $Object.hasOwnProperty.call(message, "goalFile")) { - properties._goal_file = 1; - if (!$util.isString(message.goalFile)) - return "goalFile: string 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 VaultEntry message from a plain object. Also converts values to their respective internal types. + * Creates a GetVaultContextRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.VaultEntry + * @memberof atomic.GetVaultContextRequest * @static * @param {Object.} object Plain object - * @returns {atomic.VaultEntry} VaultEntry + * @returns {atomic.GetVaultContextRequest} GetVaultContextRequest */ - VaultEntry.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.VaultEntry) + GetVaultContextRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetVaultContextRequest) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.VaultEntry: object expected"); + 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.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; + 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.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.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.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.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.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.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); } - 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. + * Creates a plain object from a GetVaultContextRequest message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.VaultEntry + * @memberof atomic.GetVaultContextRequest * @static - * @param {atomic.VaultEntry} message VaultEntry + * @param {atomic.GetVaultContextRequest} message GetVaultContextRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VaultEntry.toObject = function (message, options, _depth) { + GetVaultContextRequest.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -26002,178 +39835,108 @@ $root.atomic = (function() { if (_depth > $util.recursionLimit) throw $Error("max depth exceeded"); var object = {}; - if (options.arrays || options.defaults) - object.linked = []; + if (options.arrays || options.defaults) { + object.kinds = []; + object.query = []; + object.files = []; + } if (options.defaults) { - object.kind = options.enums === $String ? "VAULT_ENTITY_KIND_UNSPECIFIED" : 0; - object.id = ""; - object.title = ""; + object.repository = null; + object.view = null; } - 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.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.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; + 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 VaultEntry to JSON. + * Converts this GetVaultContextRequest to JSON. * @function toJSON - * @memberof atomic.VaultEntry + * @memberof atomic.GetVaultContextRequest * @instance * @returns {Object.} JSON object */ - VaultEntry.prototype.toJSON = function() { - return VaultEntry.toObject(this, $protobuf.util.toJSONOptions); + GetVaultContextRequest.prototype.toJSON = function() { + return GetVaultContextRequest.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for VaultEntry + * Gets the type url for GetVaultContextRequest * @function getTypeUrl - * @memberof atomic.VaultEntry + * @memberof atomic.GetVaultContextRequest * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - VaultEntry.getTypeUrl = function(prefix) { + GetVaultContextRequest.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.VaultEntry"; + return prefix + "/atomic.GetVaultContextRequest"; }; - 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; + return GetVaultContextRequest; })(); - atomic.ListVaultEntriesRequest = (function() { + atomic.GetVaultContextResponse = (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 + * 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 ListVaultEntriesRequest. + * Properties of a GetVaultContextResponse. * @memberof atomic - * @interface IListVaultEntriesRequest - * @augments atomic.ListVaultEntriesRequest.$Properties - * @deprecated Use atomic.ListVaultEntriesRequest.$Properties instead. + * @interface IGetVaultContextResponse + * @augments atomic.GetVaultContextResponse.$Properties + * @deprecated Use atomic.GetVaultContextResponse.$Properties instead. */ /** - * Shape of a ListVaultEntriesRequest. - * @typedef {atomic.ListVaultEntriesRequest.$Properties} atomic.ListVaultEntriesRequest.$Shape + * Shape of a GetVaultContextResponse. + * @typedef {atomic.GetVaultContextResponse.$Properties} atomic.GetVaultContextResponse.$Shape */ /** - * Constructs a new ListVaultEntriesRequest. + * Constructs a new GetVaultContextResponse. * @memberof atomic - * @classdesc Represents a ListVaultEntriesRequest. + * @classdesc Represents a GetVaultContextResponse. * @constructor - * @param {atomic.ListVaultEntriesRequest.$Properties=} [properties] Properties to set + * @param {atomic.GetVaultContextResponse.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var ListVaultEntriesRequest = function (properties) { + 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__") @@ -26181,208 +39944,69 @@ $root.atomic = (function() { }; /** - * 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 + * GetVaultContextResponse entries. + * @member {Array.} entries + * @memberof atomic.GetVaultContextResponse * @instance */ - ListVaultEntriesRequest.prototype.statusFilter = null; + GetVaultContextResponse.prototype.entries = $util.emptyArray; /** - * ListVaultEntriesRequest toolResultPreviews. - * @member {boolean} toolResultPreviews - * @memberof atomic.ListVaultEntriesRequest + * GetVaultContextResponse context. + * @member {Array.} context + * @memberof atomic.GetVaultContextResponse * @instance */ - ListVaultEntriesRequest.prototype.toolResultPreviews = false; + GetVaultContextResponse.prototype.context = $util.emptyArray; /** - * ListVaultEntriesRequest view. - * @member {atomic.ViewRef.$Properties|null|undefined} view - * @memberof atomic.ListVaultEntriesRequest + * GetVaultContextResponse snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.GetVaultContextResponse * @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) - }); + GetVaultContextResponse.prototype.snapshot = null; /** - * Creates a new ListVaultEntriesRequest instance using the specified properties. + * Creates a new GetVaultContextResponse instance using the specified properties. * @function create - * @memberof atomic.ListVaultEntriesRequest + * @memberof atomic.GetVaultContextResponse * @static - * @param {atomic.ListVaultEntriesRequest.$Properties=} [properties] Properties to set - * @returns {atomic.ListVaultEntriesRequest} ListVaultEntriesRequest instance + * @param {atomic.GetVaultContextResponse.$Properties=} [properties] Properties to set + * @returns {atomic.GetVaultContextResponse} GetVaultContextResponse instance * @type {{ - * (properties: atomic.ListVaultEntriesRequest.$Shape): atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape; - * (properties?: atomic.ListVaultEntriesRequest.$Properties): atomic.ListVaultEntriesRequest; + * (properties: atomic.GetVaultContextResponse.$Shape): atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape; + * (properties?: atomic.GetVaultContextResponse.$Properties): atomic.GetVaultContextResponse; * }} */ - ListVaultEntriesRequest.create = function(properties) { - return new ListVaultEntriesRequest(properties); + GetVaultContextResponse.create = function(properties) { + return new GetVaultContextResponse(properties); }; /** - * Encodes the specified ListVaultEntriesRequest message. Does not implicitly {@link atomic.ListVaultEntriesRequest.verify|verify} messages. + * Encodes the specified GetVaultContextResponse message. Does not implicitly {@link atomic.GetVaultContextResponse.verify|verify} messages. * @function encode - * @memberof atomic.ListVaultEntriesRequest + * @memberof atomic.GetVaultContextResponse * @static - * @param {atomic.ListVaultEntriesRequest.$Properties} message ListVaultEntriesRequest message or plain object to encode + * @param {atomic.GetVaultContextResponse.$Properties} message GetVaultContextResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVaultEntriesRequest.encode = function (message, writer, _depth) { + 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.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.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]); @@ -26390,30 +40014,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified ListVaultEntriesRequest message, length delimited. Does not implicitly {@link atomic.ListVaultEntriesRequest.verify|verify} messages. + * Encodes the specified GetVaultContextResponse message, length delimited. Does not implicitly {@link atomic.GetVaultContextResponse.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.ListVaultEntriesRequest + * @memberof atomic.GetVaultContextResponse * @static - * @param {atomic.ListVaultEntriesRequest.$Properties} message ListVaultEntriesRequest message or plain object to encode + * @param {atomic.GetVaultContextResponse.$Properties} message GetVaultContextResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVaultEntriesRequest.encodeDelimited = function(message, writer) { + GetVaultContextResponse.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a ListVaultEntriesRequest message from the specified reader or buffer. + * Decodes a GetVaultContextResponse message from the specified reader or buffer. * @function decode - * @memberof atomic.ListVaultEntriesRequest + * @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.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape} ListVaultEntriesRequest + * @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 */ - ListVaultEntriesRequest.decode = function (reader, length, _end, _depth, _target) { + GetVaultContextResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -26430,7 +40054,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.ListVaultEntriesRequest(); + message = _target || new $root.atomic.GetVaultContextResponse(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -26443,87 +40067,23 @@ $root.atomic = (function() { case 1: { if (wireType !== 2) break; - message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + 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 !== 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; + 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.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); continue; } } @@ -26544,237 +40104,118 @@ $root.atomic = (function() { }; /** - * Decodes a ListVaultEntriesRequest message from the specified reader or buffer, length delimited. + * Decodes a GetVaultContextResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.ListVaultEntriesRequest + * @memberof atomic.GetVaultContextResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.ListVaultEntriesRequest & atomic.ListVaultEntriesRequest.$Shape} ListVaultEntriesRequest + * @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 */ - ListVaultEntriesRequest.decodeDelimited = function(reader) { + GetVaultContextResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a ListVaultEntriesRequest message. + * Verifies a GetVaultContextResponse message. * @function verify - * @memberof atomic.ListVaultEntriesRequest + * @memberof atomic.GetVaultContextResponse * @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) { + 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"; - 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 (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 "cursor." + error; + return "entries." + error; } } - if (message.budget != null && $Object.hasOwnProperty.call(message, "budget")) { - properties._budget = 1; - { - var error = $root.atomic.PageBudget.verify(message.budget, _depth + 1); + 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 "budget." + error; + return "context." + 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 (message.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { + var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); if (error) - return "view." + error; + return "snapshot." + error; } return null; }; /** - * Creates a ListVaultEntriesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetVaultContextResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.ListVaultEntriesRequest + * @memberof atomic.GetVaultContextResponse * @static * @param {Object.} object Plain object - * @returns {atomic.ListVaultEntriesRequest} ListVaultEntriesRequest + * @returns {atomic.GetVaultContextResponse} GetVaultContextResponse */ - ListVaultEntriesRequest.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.ListVaultEntriesRequest) + GetVaultContextResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GetVaultContextResponse) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.ListVaultEntriesRequest: object expected"); + 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.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); + 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.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.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.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); + 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 ListVaultEntriesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetVaultContextResponse message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.ListVaultEntriesRequest + * @memberof atomic.GetVaultContextResponse * @static - * @param {atomic.ListVaultEntriesRequest} message ListVaultEntriesRequest + * @param {atomic.GetVaultContextResponse} message GetVaultContextResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVaultEntriesRequest.toObject = function (message, options, _depth) { + GetVaultContextResponse.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -26782,101 +40223,101 @@ $root.atomic = (function() { 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 (options.arrays || options.defaults) { + object.entries = []; + object.context = []; } - 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); + 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 ListVaultEntriesRequest to JSON. + * Converts this GetVaultContextResponse to JSON. * @function toJSON - * @memberof atomic.ListVaultEntriesRequest + * @memberof atomic.GetVaultContextResponse * @instance * @returns {Object.} JSON object */ - ListVaultEntriesRequest.prototype.toJSON = function() { - return ListVaultEntriesRequest.toObject(this, $protobuf.util.toJSONOptions); + GetVaultContextResponse.prototype.toJSON = function() { + return GetVaultContextResponse.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for ListVaultEntriesRequest + * Gets the type url for GetVaultContextResponse * @function getTypeUrl - * @memberof atomic.ListVaultEntriesRequest + * @memberof atomic.GetVaultContextResponse * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - ListVaultEntriesRequest.getTypeUrl = function(prefix) { + GetVaultContextResponse.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.ListVaultEntriesRequest"; + return prefix + "/atomic.GetVaultContextResponse"; }; - return ListVaultEntriesRequest; + return GetVaultContextResponse; })(); - atomic.ListVaultEntriesResponse = (function() { + atomic.ContextItem = (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 + * 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 ListVaultEntriesResponse. + * Properties of a ContextItem. * @memberof atomic - * @interface IListVaultEntriesResponse - * @augments atomic.ListVaultEntriesResponse.$Properties - * @deprecated Use atomic.ListVaultEntriesResponse.$Properties instead. + * @interface IContextItem + * @augments atomic.ContextItem.$Properties + * @deprecated Use atomic.ContextItem.$Properties instead. */ /** - * Shape of a ListVaultEntriesResponse. - * @typedef {atomic.ListVaultEntriesResponse.$Properties} atomic.ListVaultEntriesResponse.$Shape + * Shape of a ContextItem. + * @typedef {atomic.ContextItem.$Properties} atomic.ContextItem.$Shape */ /** - * Constructs a new ListVaultEntriesResponse. + * Constructs a new ContextItem. * @memberof atomic - * @classdesc Represents a ListVaultEntriesResponse. + * @classdesc Represents a ContextItem. * @constructor - * @param {atomic.ListVaultEntriesResponse.$Properties=} [properties] Properties to set + * @param {atomic.ContextItem.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var ListVaultEntriesResponse = function (properties) { - this.entries = []; + 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__") @@ -26884,77 +40325,212 @@ $root.atomic = (function() { }; /** - * ListVaultEntriesResponse entries. - * @member {Array.} entries - * @memberof atomic.ListVaultEntriesResponse + * ContextItem memoryId. + * @member {string} memoryId + * @memberof atomic.ContextItem * @instance */ - ListVaultEntriesResponse.prototype.entries = $util.emptyArray; + ContextItem.prototype.memoryId = ""; /** - * ListVaultEntriesResponse nextCursor. - * @member {atomic.PageCursor.$Properties|null|undefined} nextCursor - * @memberof atomic.ListVaultEntriesResponse + * ContextItem kgNodeId. + * @member {string} kgNodeId + * @memberof atomic.ContextItem * @instance */ - ListVaultEntriesResponse.prototype.nextCursor = null; + ContextItem.prototype.kgNodeId = ""; /** - * ListVaultEntriesResponse snapshot. - * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot - * @memberof atomic.ListVaultEntriesResponse + * ContextItem revisionHash. + * @member {string} revisionHash + * @memberof atomic.ContextItem * @instance */ - ListVaultEntriesResponse.prototype.snapshot = null; + 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(ListVaultEntriesResponse.prototype, "_next_cursor", { - get: $util.oneOfGetter($oneOfFields = ["nextCursor"]), + $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 ListVaultEntriesResponse instance using the specified properties. + * Creates a new ContextItem instance using the specified properties. * @function create - * @memberof atomic.ListVaultEntriesResponse + * @memberof atomic.ContextItem * @static - * @param {atomic.ListVaultEntriesResponse.$Properties=} [properties] Properties to set - * @returns {atomic.ListVaultEntriesResponse} ListVaultEntriesResponse instance + * @param {atomic.ContextItem.$Properties=} [properties] Properties to set + * @returns {atomic.ContextItem} ContextItem instance * @type {{ - * (properties: atomic.ListVaultEntriesResponse.$Shape): atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape; - * (properties?: atomic.ListVaultEntriesResponse.$Properties): atomic.ListVaultEntriesResponse; + * (properties: atomic.ContextItem.$Shape): atomic.ContextItem & atomic.ContextItem.$Shape; + * (properties?: atomic.ContextItem.$Properties): atomic.ContextItem; * }} */ - ListVaultEntriesResponse.create = function(properties) { - return new ListVaultEntriesResponse(properties); + ContextItem.create = function(properties) { + return new ContextItem(properties); }; /** - * Encodes the specified ListVaultEntriesResponse message. Does not implicitly {@link atomic.ListVaultEntriesResponse.verify|verify} messages. + * Encodes the specified ContextItem message. Does not implicitly {@link atomic.ContextItem.verify|verify} messages. * @function encode - * @memberof atomic.ListVaultEntriesResponse + * @memberof atomic.ContextItem * @static - * @param {atomic.ListVaultEntriesResponse.$Properties} message ListVaultEntriesResponse message or plain object to encode + * @param {atomic.ContextItem.$Properties} message ContextItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVaultEntriesResponse.encode = function (message, writer, _depth) { + 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.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.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]); @@ -26962,30 +40538,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified ListVaultEntriesResponse message, length delimited. Does not implicitly {@link atomic.ListVaultEntriesResponse.verify|verify} messages. + * Encodes the specified ContextItem message, length delimited. Does not implicitly {@link atomic.ContextItem.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.ListVaultEntriesResponse + * @memberof atomic.ContextItem * @static - * @param {atomic.ListVaultEntriesResponse.$Properties} message ListVaultEntriesResponse message or plain object to encode + * @param {atomic.ContextItem.$Properties} message ContextItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListVaultEntriesResponse.encodeDelimited = function(message, writer) { + ContextItem.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a ListVaultEntriesResponse message from the specified reader or buffer. + * Decodes a ContextItem message from the specified reader or buffer. * @function decode - * @memberof atomic.ListVaultEntriesResponse + * @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.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape} ListVaultEntriesResponse + * @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 */ - ListVaultEntriesResponse.decode = function (reader, length, _end, _depth, _target) { + ContextItem.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -27002,7 +40578,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.ListVaultEntriesResponse(); + message = _target || new $root.atomic.ContextItem(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -27015,22 +40591,141 @@ $root.atomic = (function() { 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)); + if ((value = reader.stringVerify()).length) + message.memoryId = value; + else + delete message.memoryId; 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"; + if ((value = reader.stringVerify()).length) + message.kgNodeId = value; + else + delete message.kgNodeId; continue; } - case 20: { + case 3: { if (wireType !== 2) break; - message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + 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; } } @@ -27051,30 +40746,30 @@ $root.atomic = (function() { }; /** - * Decodes a ListVaultEntriesResponse message from the specified reader or buffer, length delimited. + * Decodes a ContextItem message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.ListVaultEntriesResponse + * @memberof atomic.ContextItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.ListVaultEntriesResponse & atomic.ListVaultEntriesResponse.$Shape} ListVaultEntriesResponse + * @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 */ - ListVaultEntriesResponse.decodeDelimited = function(reader) { + ContextItem.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a ListVaultEntriesResponse message. + * Verifies a ContextItem message. * @function verify - * @memberof atomic.ListVaultEntriesResponse + * @memberof atomic.ContextItem * @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) { + ContextItem.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -27082,82 +40777,145 @@ $root.atomic = (function() { 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.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.snapshot != null && $Object.hasOwnProperty.call(message, "snapshot")) { - var error = $root.atomic.ViewSnapshot.verify(message.snapshot, _depth + 1); - if (error) - return "snapshot." + error; + 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 ListVaultEntriesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ContextItem message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.ListVaultEntriesResponse + * @memberof atomic.ContextItem * @static * @param {Object.} object Plain object - * @returns {atomic.ListVaultEntriesResponse} ListVaultEntriesResponse + * @returns {atomic.ContextItem} ContextItem */ - ListVaultEntriesResponse.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.ListVaultEntriesResponse) + ContextItem.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ContextItem) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.ListVaultEntriesResponse: object expected"); + 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.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); - } + 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 ListVaultEntriesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ContextItem message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.ListVaultEntriesResponse + * @memberof atomic.ContextItem * @static - * @param {atomic.ListVaultEntriesResponse} message ListVaultEntriesResponse + * @param {atomic.ContextItem} message ContextItem * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListVaultEntriesResponse.toObject = function (message, options, _depth) { + ContextItem.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -27165,223 +40923,247 @@ $root.atomic = (function() { 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 (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.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); + 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 ListVaultEntriesResponse to JSON. + * Converts this ContextItem to JSON. * @function toJSON - * @memberof atomic.ListVaultEntriesResponse + * @memberof atomic.ContextItem * @instance * @returns {Object.} JSON object */ - ListVaultEntriesResponse.prototype.toJSON = function() { - return ListVaultEntriesResponse.toObject(this, $protobuf.util.toJSONOptions); + ContextItem.prototype.toJSON = function() { + return ContextItem.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for ListVaultEntriesResponse + * Gets the type url for ContextItem * @function getTypeUrl - * @memberof atomic.ListVaultEntriesResponse + * @memberof atomic.ContextItem * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - ListVaultEntriesResponse.getTypeUrl = function(prefix) { + ContextItem.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.ListVaultEntriesResponse"; + return prefix + "/atomic.ContextItem"; }; - return ListVaultEntriesResponse; + return ContextItem; })(); - atomic.GetVaultContextRequest = (function() { + atomic.VerifyAttestationRequest = (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 + * 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 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. + * Properties of a VerifyAttestationRequest. * @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 + * @interface IVerifyAttestationRequest + * @augments atomic.VerifyAttestationRequest.$Properties + * @deprecated Use atomic.VerifyAttestationRequest.$Properties instead. */ - GetVaultContextRequest.prototype.repository = null; /** - * GetVaultContextRequest maxEntries. - * @member {number|null|undefined} maxEntries - * @memberof atomic.GetVaultContextRequest - * @instance + * 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 */ - GetVaultContextRequest.prototype.maxEntries = null; /** - * GetVaultContextRequest kinds. - * @member {Array.} kinds - * @memberof atomic.GetVaultContextRequest - * @instance + * 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 */ - GetVaultContextRequest.prototype.kinds = $util.emptyArray; + 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]]; + }; /** - * GetVaultContextRequest query. - * @member {Array.} query - * @memberof atomic.GetVaultContextRequest + * VerifyAttestationRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.VerifyAttestationRequest * @instance */ - GetVaultContextRequest.prototype.query = $util.emptyArray; + VerifyAttestationRequest.prototype.repository = null; /** - * GetVaultContextRequest intent. - * @member {string|null|undefined} intent - * @memberof atomic.GetVaultContextRequest + * VerifyAttestationRequest attestationId. + * @member {string|null|undefined} attestationId + * @memberof atomic.VerifyAttestationRequest * @instance */ - GetVaultContextRequest.prototype.intent = null; + VerifyAttestationRequest.prototype.attestationId = null; /** - * GetVaultContextRequest files. - * @member {Array.} files - * @memberof atomic.GetVaultContextRequest + * VerifyAttestationRequest subject. + * @member {atomic.AttestationTarget.$Properties|null|undefined} subject + * @memberof atomic.VerifyAttestationRequest * @instance */ - GetVaultContextRequest.prototype.files = $util.emptyArray; + VerifyAttestationRequest.prototype.subject = null; /** - * GetVaultContextRequest budgetChars. - * @member {number|null|undefined} budgetChars - * @memberof atomic.GetVaultContextRequest + * VerifyAttestationRequest view. + * @member {atomic.ViewRef.$Properties|null|undefined} view + * @memberof atomic.VerifyAttestationRequest * @instance */ - GetVaultContextRequest.prototype.budgetChars = null; + VerifyAttestationRequest.prototype.view = null; /** - * GetVaultContextRequest includeBody. - * @member {boolean|null|undefined} includeBody - * @memberof atomic.GetVaultContextRequest + * VerifyAttestationRequest identityName. + * @member {string|null|undefined} identityName + * @memberof atomic.VerifyAttestationRequest * @instance */ - GetVaultContextRequest.prototype.includeBody = null; + VerifyAttestationRequest.prototype.identityName = null; /** - * GetVaultContextRequest view. - * @member {atomic.ViewRef.$Properties|null|undefined} view - * @memberof atomic.GetVaultContextRequest + * VerifyAttestationRequest publicKey. + * @member {Uint8Array|null|undefined} publicKey + * @memberof atomic.VerifyAttestationRequest * @instance */ - GetVaultContextRequest.prototype.view = null; + VerifyAttestationRequest.prototype.publicKey = 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"]), + /** + * 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(GetVaultContextRequest.prototype, "_budget_chars", { - get: $util.oneOfGetter($oneOfFields = ["budgetChars"]), + $Object.defineProperty(VerifyAttestationRequest.prototype, "_identity_name", { + get: $util.oneOfGetter($oneOfFields = ["identityName"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(GetVaultContextRequest.prototype, "_include_body", { - get: $util.oneOfGetter($oneOfFields = ["includeBody"]), + $Object.defineProperty(VerifyAttestationRequest.prototype, "_public_key", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new GetVaultContextRequest instance using the specified properties. + * Creates a new VerifyAttestationRequest instance using the specified properties. * @function create - * @memberof atomic.GetVaultContextRequest + * @memberof atomic.VerifyAttestationRequest * @static - * @param {atomic.GetVaultContextRequest.$Properties=} [properties] Properties to set - * @returns {atomic.GetVaultContextRequest} GetVaultContextRequest instance + * @param {atomic.VerifyAttestationRequest.$Properties=} [properties] Properties to set + * @returns {atomic.VerifyAttestationRequest} VerifyAttestationRequest instance * @type {{ - * (properties: atomic.GetVaultContextRequest.$Shape): atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape; - * (properties?: atomic.GetVaultContextRequest.$Properties): atomic.GetVaultContextRequest; + * (properties: atomic.VerifyAttestationRequest.$Shape): atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape; + * (properties?: atomic.VerifyAttestationRequest.$Properties): atomic.VerifyAttestationRequest; * }} */ - GetVaultContextRequest.create = function(properties) { - return new GetVaultContextRequest(properties); + VerifyAttestationRequest.create = function(properties) { + return new VerifyAttestationRequest(properties); }; /** - * Encodes the specified GetVaultContextRequest message. Does not implicitly {@link atomic.GetVaultContextRequest.verify|verify} messages. + * Encodes the specified VerifyAttestationRequest message. Does not implicitly {@link atomic.VerifyAttestationRequest.verify|verify} messages. * @function encode - * @memberof atomic.GetVaultContextRequest + * @memberof atomic.VerifyAttestationRequest * @static - * @param {atomic.GetVaultContextRequest.$Properties} message GetVaultContextRequest message or plain object to encode + * @param {atomic.VerifyAttestationRequest.$Properties} message VerifyAttestationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVaultContextRequest.encode = function (message, writer, _depth) { + VerifyAttestationRequest.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); if (_depth === $undefined) @@ -27390,24 +41172,16 @@ $root.atomic = (function() { 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.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 20, wireType 2 =*/162).fork(), _depth + 1).ldelim(); + $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]); @@ -27415,30 +41189,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified GetVaultContextRequest message, length delimited. Does not implicitly {@link atomic.GetVaultContextRequest.verify|verify} messages. + * Encodes the specified VerifyAttestationRequest message, length delimited. Does not implicitly {@link atomic.VerifyAttestationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.GetVaultContextRequest + * @memberof atomic.VerifyAttestationRequest * @static - * @param {atomic.GetVaultContextRequest.$Properties} message GetVaultContextRequest message or plain object to encode + * @param {atomic.VerifyAttestationRequest.$Properties} message VerifyAttestationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVaultContextRequest.encodeDelimited = function(message, writer) { + VerifyAttestationRequest.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a GetVaultContextRequest message from the specified reader or buffer. + * Decodes a VerifyAttestationRequest message from the specified reader or buffer. * @function decode - * @memberof atomic.GetVaultContextRequest + * @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.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape} GetVaultContextRequest + * @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 */ - GetVaultContextRequest.decode = function (reader, length, _end, _depth, _target) { + VerifyAttestationRequest.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -27455,7 +41229,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.GetVaultContextRequest(); + message = _target || new $root.atomic.VerifyAttestationRequest(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -27472,67 +41246,37 @@ $root.atomic = (function() { continue; } case 2: { - if (wireType !== 0) + if (wireType !== 2) break; - message.maxEntries = reader.uint32(); - message._max_entries = "maxEntries"; + message.attestationId = reader.stringVerify(); + message.target = "attestationId"; continue; } case 3: { - if (wireType === 2) { - if (!(message.kinds && message.kinds.length)) - message.kinds = []; - reader.int32s(message.kinds); - continue; - } - if (wireType !== 0) + if (wireType !== 2) break; - if (!(message.kinds && message.kinds.length)) - message.kinds = []; - message.kinds.push(reader.int32()); + message.subject = $root.atomic.AttestationTarget.decode(reader, reader.size(), $undefined, _depth + 1, message.subject); + message.target = "subject"; continue; } case 4: { if (wireType !== 2) break; - if (!(message.query && message.query.length)) - message.query = []; - message.query.push(reader.stringVerify()); + message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); continue; } case 5: { if (wireType !== 2) break; - message.intent = reader.stringVerify(); - message._intent = "intent"; + message.identityName = reader.stringVerify(); + message._identity_name = "identityName"; 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); + message.publicKey = reader.bytes(); + message._public_key = "publicKey"; continue; } } @@ -27553,30 +41297,30 @@ $root.atomic = (function() { }; /** - * Decodes a GetVaultContextRequest message from the specified reader or buffer, length delimited. + * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.GetVaultContextRequest + * @memberof atomic.VerifyAttestationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.GetVaultContextRequest & atomic.GetVaultContextRequest.$Shape} GetVaultContextRequest + * @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 */ - GetVaultContextRequest.decodeDelimited = function(reader) { + VerifyAttestationRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a GetVaultContextRequest message. + * Verifies a VerifyAttestationRequest message. * @function verify - * @memberof atomic.GetVaultContextRequest + * @memberof atomic.VerifyAttestationRequest * @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) { + VerifyAttestationRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -27589,145 +41333,94 @@ $root.atomic = (function() { 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.attestationId != null && $Object.hasOwnProperty.call(message, "attestationId")) { + properties.target = 1; + if (!$util.isString(message.attestationId)) + return "attestationId: string 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.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 GetVaultContextRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.GetVaultContextRequest + * @memberof atomic.VerifyAttestationRequest * @static * @param {Object.} object Plain object - * @returns {atomic.GetVaultContextRequest} GetVaultContextRequest + * @returns {atomic.VerifyAttestationRequest} VerifyAttestationRequest */ - GetVaultContextRequest.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.GetVaultContextRequest) + VerifyAttestationRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.VerifyAttestationRequest) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.GetVaultContextRequest: object expected"); + 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.GetVaultContextRequest(); + var message = new $root.atomic.VerifyAttestationRequest(); if (object.repository != null) { if (!$util.isObject(object.repository)) - throw $TypeError(".atomic.GetVaultContextRequest.repository: object expected"); + throw $TypeError(".atomic.VerifyAttestationRequest.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.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.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"); + 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 GetVaultContextRequest message. Also converts values to other types if specified. + * Creates a plain object from a VerifyAttestationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.GetVaultContextRequest + * @memberof atomic.VerifyAttestationRequest * @static - * @param {atomic.GetVaultContextRequest} message GetVaultContextRequest + * @param {atomic.VerifyAttestationRequest} message VerifyAttestationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVaultContextRequest.toObject = function (message, options, _depth) { + VerifyAttestationRequest.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -27735,108 +41428,102 @@ $root.atomic = (function() { 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.attestationId != null && $Object.hasOwnProperty.call(message, "attestationId")) { + object.attestationId = message.attestationId; + if (options.oneofs) + object.target = "attestationId"; } - 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.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.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); + 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 GetVaultContextRequest to JSON. + * Converts this VerifyAttestationRequest to JSON. * @function toJSON - * @memberof atomic.GetVaultContextRequest + * @memberof atomic.VerifyAttestationRequest * @instance * @returns {Object.} JSON object */ - GetVaultContextRequest.prototype.toJSON = function() { - return GetVaultContextRequest.toObject(this, $protobuf.util.toJSONOptions); + VerifyAttestationRequest.prototype.toJSON = function() { + return VerifyAttestationRequest.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for GetVaultContextRequest + * Gets the type url for VerifyAttestationRequest * @function getTypeUrl - * @memberof atomic.GetVaultContextRequest + * @memberof atomic.VerifyAttestationRequest * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - GetVaultContextRequest.getTypeUrl = function(prefix) { + VerifyAttestationRequest.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.GetVaultContextRequest"; + return prefix + "/atomic.VerifyAttestationRequest"; }; - return GetVaultContextRequest; + return VerifyAttestationRequest; })(); - atomic.GetVaultContextResponse = (function() { + atomic.AttestationTarget = (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 + * 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 a GetVaultContextResponse. + * Properties of an AttestationTarget. * @memberof atomic - * @interface IGetVaultContextResponse - * @augments atomic.GetVaultContextResponse.$Properties - * @deprecated Use atomic.GetVaultContextResponse.$Properties instead. + * @interface IAttestationTarget + * @augments atomic.AttestationTarget.$Properties + * @deprecated Use atomic.AttestationTarget.$Properties instead. */ /** - * Shape of a GetVaultContextResponse. - * @typedef {atomic.GetVaultContextResponse.$Properties} atomic.GetVaultContextResponse.$Shape + * 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 GetVaultContextResponse. + * Constructs a new AttestationTarget. * @memberof atomic - * @classdesc Represents a GetVaultContextResponse. + * @classdesc Represents an AttestationTarget. * @constructor - * @param {atomic.GetVaultContextResponse.$Properties=} [properties] Properties to set + * @param {atomic.AttestationTarget.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var GetVaultContextResponse = function (properties) { - this.entries = []; - this.context = []; + 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__") @@ -27844,69 +41531,91 @@ $root.atomic = (function() { }; /** - * GetVaultContextResponse entries. - * @member {Array.} entries - * @memberof atomic.GetVaultContextResponse + * AttestationTarget intentId. + * @member {string|null|undefined} intentId + * @memberof atomic.AttestationTarget * @instance */ - GetVaultContextResponse.prototype.entries = $util.emptyArray; + AttestationTarget.prototype.intentId = null; /** - * GetVaultContextResponse context. - * @member {Array.} context - * @memberof atomic.GetVaultContextResponse + * AttestationTarget memoryId. + * @member {string|null|undefined} memoryId + * @memberof atomic.AttestationTarget * @instance */ - GetVaultContextResponse.prototype.context = $util.emptyArray; + AttestationTarget.prototype.memoryId = null; /** - * GetVaultContextResponse snapshot. - * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot - * @memberof atomic.GetVaultContextResponse + * 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 */ - GetVaultContextResponse.prototype.snapshot = null; + $Object.defineProperty(AttestationTarget.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["intentId", "memoryId", "changeHash", "graphStats"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new GetVaultContextResponse instance using the specified properties. + * Creates a new AttestationTarget instance using the specified properties. * @function create - * @memberof atomic.GetVaultContextResponse + * @memberof atomic.AttestationTarget * @static - * @param {atomic.GetVaultContextResponse.$Properties=} [properties] Properties to set - * @returns {atomic.GetVaultContextResponse} GetVaultContextResponse instance + * @param {atomic.AttestationTarget.$Properties=} [properties] Properties to set + * @returns {atomic.AttestationTarget} AttestationTarget instance * @type {{ - * (properties: atomic.GetVaultContextResponse.$Shape): atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape; - * (properties?: atomic.GetVaultContextResponse.$Properties): atomic.GetVaultContextResponse; + * (properties: atomic.AttestationTarget.$Shape): atomic.AttestationTarget & atomic.AttestationTarget.$Shape; + * (properties?: atomic.AttestationTarget.$Properties): atomic.AttestationTarget; * }} */ - GetVaultContextResponse.create = function(properties) { - return new GetVaultContextResponse(properties); + AttestationTarget.create = function(properties) { + return new AttestationTarget(properties); }; /** - * Encodes the specified GetVaultContextResponse message. Does not implicitly {@link atomic.GetVaultContextResponse.verify|verify} messages. + * Encodes the specified AttestationTarget message. Does not implicitly {@link atomic.AttestationTarget.verify|verify} messages. * @function encode - * @memberof atomic.GetVaultContextResponse + * @memberof atomic.AttestationTarget * @static - * @param {atomic.GetVaultContextResponse.$Properties} message GetVaultContextResponse message or plain object to encode + * @param {atomic.AttestationTarget.$Properties} message AttestationTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVaultContextResponse.encode = function (message, writer, _depth) { + 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.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.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]); @@ -27914,37 +41623,37 @@ $root.atomic = (function() { }; /** - * Encodes the specified GetVaultContextResponse message, length delimited. Does not implicitly {@link atomic.GetVaultContextResponse.verify|verify} messages. + * Encodes the specified AttestationTarget message, length delimited. Does not implicitly {@link atomic.AttestationTarget.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.GetVaultContextResponse + * @memberof atomic.AttestationTarget * @static - * @param {atomic.GetVaultContextResponse.$Properties} message GetVaultContextResponse message or plain object to encode + * @param {atomic.AttestationTarget.$Properties} message AttestationTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetVaultContextResponse.encodeDelimited = function(message, writer) { + AttestationTarget.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a GetVaultContextResponse message from the specified reader or buffer. + * Decodes an AttestationTarget message from the specified reader or buffer. * @function decode - * @memberof atomic.GetVaultContextResponse + * @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.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape} GetVaultContextResponse + * @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 */ - GetVaultContextResponse.decode = function (reader, length, _end, _depth, _target) { + 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, value; + var end, message; if (length === $undefined) end = reader.len; else { @@ -27954,7 +41663,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.GetVaultContextResponse(); + message = _target || new $root.atomic.AttestationTarget(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -27967,23 +41676,29 @@ $root.atomic = (function() { 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)); + message.intentId = reader.stringVerify(); + message.kind = "intentId"; 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)); + message.memoryId = reader.stringVerify(); + message.kind = "memoryId"; continue; } - case 20: { + case 3: { if (wireType !== 2) break; - message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); + 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; } } @@ -28004,118 +41719,117 @@ $root.atomic = (function() { }; /** - * Decodes a GetVaultContextResponse message from the specified reader or buffer, length delimited. + * Decodes an AttestationTarget message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.GetVaultContextResponse + * @memberof atomic.AttestationTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.GetVaultContextResponse & atomic.GetVaultContextResponse.$Shape} GetVaultContextResponse + * @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 */ - GetVaultContextResponse.decodeDelimited = function(reader) { + AttestationTarget.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a GetVaultContextResponse message. + * Verifies an AttestationTarget message. * @function verify - * @memberof atomic.GetVaultContextResponse + * @memberof atomic.AttestationTarget * @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) { + 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"; - 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); + 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 "entries." + error; + return "changeHash." + 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 (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 "context." + error; + return "graphStats." + 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. + * Creates an AttestationTarget message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.GetVaultContextResponse + * @memberof atomic.AttestationTarget * @static * @param {Object.} object Plain object - * @returns {atomic.GetVaultContextResponse} GetVaultContextResponse + * @returns {atomic.AttestationTarget} AttestationTarget */ - GetVaultContextResponse.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.GetVaultContextResponse) + AttestationTarget.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.AttestationTarget) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.GetVaultContextResponse: object expected"); + 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.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); - } + 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.snapshot != null) { - if (!$util.isObject(object.snapshot)) - throw $TypeError(".atomic.GetVaultContextResponse.snapshot: object expected"); - message.snapshot = $root.atomic.ViewSnapshot.fromObject(object.snapshot, _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 a GetVaultContextResponse message. Also converts values to other types if specified. + * Creates a plain object from an AttestationTarget message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.GetVaultContextResponse + * @memberof atomic.AttestationTarget * @static - * @param {atomic.GetVaultContextResponse} message GetVaultContextResponse + * @param {atomic.AttestationTarget} message AttestationTarget * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetVaultContextResponse.toObject = function (message, options, _depth) { + AttestationTarget.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -28123,101 +41837,90 @@ $root.atomic = (function() { if (_depth > $util.recursionLimit) throw $Error("max depth exceeded"); var object = {}; - if (options.arrays || options.defaults) { - object.entries = []; - object.context = []; + if (message.intentId != null && $Object.hasOwnProperty.call(message, "intentId")) { + object.intentId = message.intentId; + if (options.oneofs) + object.kind = "intentId"; } - 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.memoryId != null && $Object.hasOwnProperty.call(message, "memoryId")) { + object.memoryId = message.memoryId; + if (options.oneofs) + object.kind = "memoryId"; } - 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.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"; } - 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. + * Converts this AttestationTarget to JSON. * @function toJSON - * @memberof atomic.GetVaultContextResponse + * @memberof atomic.AttestationTarget * @instance * @returns {Object.} JSON object */ - GetVaultContextResponse.prototype.toJSON = function() { - return GetVaultContextResponse.toObject(this, $protobuf.util.toJSONOptions); + AttestationTarget.prototype.toJSON = function() { + return AttestationTarget.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for GetVaultContextResponse + * Gets the type url for AttestationTarget * @function getTypeUrl - * @memberof atomic.GetVaultContextResponse + * @memberof atomic.AttestationTarget * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - GetVaultContextResponse.getTypeUrl = function(prefix) { + AttestationTarget.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.GetVaultContextResponse"; + return prefix + "/atomic.AttestationTarget"; }; - return GetVaultContextResponse; + return AttestationTarget; })(); - atomic.ContextItem = (function() { + atomic.GraphStatsRef = (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 + * 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 ContextItem. + * Properties of a GraphStatsRef. * @memberof atomic - * @interface IContextItem - * @augments atomic.ContextItem.$Properties - * @deprecated Use atomic.ContextItem.$Properties instead. + * @interface IGraphStatsRef + * @augments atomic.GraphStatsRef.$Properties + * @deprecated Use atomic.GraphStatsRef.$Properties instead. */ /** - * Shape of a ContextItem. - * @typedef {atomic.ContextItem.$Properties} atomic.ContextItem.$Shape + * Shape of a GraphStatsRef. + * @typedef {atomic.GraphStatsRef.$Properties} atomic.GraphStatsRef.$Shape */ /** - * Constructs a new ContextItem. + * Constructs a new GraphStatsRef. * @memberof atomic - * @classdesc Represents a ContextItem. + * @classdesc Represents a GraphStatsRef. * @constructor - * @param {atomic.ContextItem.$Properties=} [properties] Properties to set + * @param {atomic.GraphStatsRef.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var ContextItem = function (properties) { + 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__") @@ -28225,212 +41928,88 @@ $root.atomic = (function() { }; /** - * 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 + * GraphStatsRef sessionId. + * @member {string|null|undefined} sessionId + * @memberof atomic.GraphStatsRef * @instance */ - ContextItem.prototype.introducedBy = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + GraphStatsRef.prototype.sessionId = null; /** - * ContextItem recorded. - * @member {boolean} recorded - * @memberof atomic.ContextItem + * GraphStatsRef turnNumber. + * @member {number|null|undefined} turnNumber + * @memberof atomic.GraphStatsRef * @instance */ - ContextItem.prototype.recorded = false; + GraphStatsRef.prototype.turnNumber = null; /** - * ContextItem truncated. - * @member {boolean} truncated - * @memberof atomic.ContextItem + * GraphStatsRef changeHash. + * @member {atomic.Hash.$Properties|null|undefined} changeHash + * @memberof atomic.GraphStatsRef * @instance */ - ContextItem.prototype.truncated = false; + GraphStatsRef.prototype.changeHash = null; // 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"]), + $Object.defineProperty(GraphStatsRef.prototype, "_session_id", { + get: $util.oneOfGetter($oneOfFields = ["sessionId"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(ContextItem.prototype, "_preview", { - get: $util.oneOfGetter($oneOfFields = ["preview"]), + $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 ContextItem instance using the specified properties. + * Creates a new GraphStatsRef instance using the specified properties. * @function create - * @memberof atomic.ContextItem + * @memberof atomic.GraphStatsRef * @static - * @param {atomic.ContextItem.$Properties=} [properties] Properties to set - * @returns {atomic.ContextItem} ContextItem instance + * @param {atomic.GraphStatsRef.$Properties=} [properties] Properties to set + * @returns {atomic.GraphStatsRef} GraphStatsRef instance * @type {{ - * (properties: atomic.ContextItem.$Shape): atomic.ContextItem & atomic.ContextItem.$Shape; - * (properties?: atomic.ContextItem.$Properties): atomic.ContextItem; + * (properties: atomic.GraphStatsRef.$Shape): atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape; + * (properties?: atomic.GraphStatsRef.$Properties): atomic.GraphStatsRef; * }} */ - ContextItem.create = function(properties) { - return new ContextItem(properties); + GraphStatsRef.create = function(properties) { + return new GraphStatsRef(properties); }; /** - * Encodes the specified ContextItem message. Does not implicitly {@link atomic.ContextItem.verify|verify} messages. + * Encodes the specified GraphStatsRef message. Does not implicitly {@link atomic.GraphStatsRef.verify|verify} messages. * @function encode - * @memberof atomic.ContextItem + * @memberof atomic.GraphStatsRef * @static - * @param {atomic.ContextItem.$Properties} message ContextItem message or plain object to encode + * @param {atomic.GraphStatsRef.$Properties} message GraphStatsRef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContextItem.encode = function (message, writer, _depth) { + 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.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.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]); @@ -28438,37 +42017,37 @@ $root.atomic = (function() { }; /** - * Encodes the specified ContextItem message, length delimited. Does not implicitly {@link atomic.ContextItem.verify|verify} messages. + * Encodes the specified GraphStatsRef message, length delimited. Does not implicitly {@link atomic.GraphStatsRef.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.ContextItem + * @memberof atomic.GraphStatsRef * @static - * @param {atomic.ContextItem.$Properties} message ContextItem message or plain object to encode + * @param {atomic.GraphStatsRef.$Properties} message GraphStatsRef message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContextItem.encodeDelimited = function(message, writer) { + GraphStatsRef.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a ContextItem message from the specified reader or buffer. + * Decodes a GraphStatsRef message from the specified reader or buffer. * @function decode - * @memberof atomic.ContextItem + * @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.ContextItem & atomic.ContextItem.$Shape} ContextItem + * @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 */ - ContextItem.decode = function (reader, length, _end, _depth, _target) { + 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, value; + var end, message; if (length === $undefined) end = reader.len; else { @@ -28478,7 +42057,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.ContextItem(); + message = _target || new $root.atomic.GraphStatsRef(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -28491,141 +42070,22 @@ $root.atomic = (function() { case 1: { if (wireType !== 2) break; - if ((value = reader.stringVerify()).length) - message.memoryId = value; - else - delete message.memoryId; + message.sessionId = reader.stringVerify(); + message._session_id = "sessionId"; continue; } case 2: { - if (wireType !== 2) + if (wireType !== 0) break; - if ((value = reader.stringVerify()).length) - message.kgNodeId = value; - else - delete message.kgNodeId; + message.turnNumber = reader.uint32(); + message._turn_number = "turnNumber"; 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; + message.changeHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.changeHash); + message._change_hash = "changeHash"; continue; } } @@ -28646,30 +42106,30 @@ $root.atomic = (function() { }; /** - * Decodes a ContextItem message from the specified reader or buffer, length delimited. + * Decodes a GraphStatsRef message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.ContextItem + * @memberof atomic.GraphStatsRef * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.ContextItem & atomic.ContextItem.$Shape} ContextItem + * @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 */ - ContextItem.decodeDelimited = function(reader) { + GraphStatsRef.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a ContextItem message. + * Verifies a GraphStatsRef message. * @function verify - * @memberof atomic.ContextItem + * @memberof atomic.GraphStatsRef * @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) { + GraphStatsRef.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -28677,145 +42137,67 @@ $root.atomic = (function() { 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.sessionId != null && $Object.hasOwnProperty.call(message, "sessionId")) { + properties._session_id = 1; + if (!$util.isString(message.sessionId)) + return "sessionId: 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.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; + } } - 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. + * Creates a GraphStatsRef message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.ContextItem + * @memberof atomic.GraphStatsRef * @static * @param {Object.} object Plain object - * @returns {atomic.ContextItem} ContextItem + * @returns {atomic.GraphStatsRef} GraphStatsRef */ - ContextItem.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.ContextItem) + GraphStatsRef.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GraphStatsRef) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.ContextItem: object expected"); + 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.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); + 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 ContextItem message. Also converts values to other types if specified. + * Creates a plain object from a GraphStatsRef message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.ContextItem + * @memberof atomic.GraphStatsRef * @static - * @param {atomic.ContextItem} message ContextItem + * @param {atomic.GraphStatsRef} message GraphStatsRef * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContextItem.toObject = function (message, options, _depth) { + GraphStatsRef.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -28823,141 +42205,82 @@ $root.atomic = (function() { 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; + 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 ContextItem to JSON. + * Converts this GraphStatsRef to JSON. * @function toJSON - * @memberof atomic.ContextItem + * @memberof atomic.GraphStatsRef * @instance * @returns {Object.} JSON object */ - ContextItem.prototype.toJSON = function() { - return ContextItem.toObject(this, $protobuf.util.toJSONOptions); + GraphStatsRef.prototype.toJSON = function() { + return GraphStatsRef.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for ContextItem + * Gets the type url for GraphStatsRef * @function getTypeUrl - * @memberof atomic.ContextItem + * @memberof atomic.GraphStatsRef * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - ContextItem.getTypeUrl = function(prefix) { + GraphStatsRef.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.ContextItem"; + return prefix + "/atomic.GraphStatsRef"; }; - return ContextItem; + return GraphStatsRef; })(); - atomic.VerifyAttestationRequest = (function() { + atomic.VerifyAttestationResponse = (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 + * 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 VerifyAttestationRequest. + * Properties of a VerifyAttestationResponse. * @memberof atomic - * @interface IVerifyAttestationRequest - * @augments atomic.VerifyAttestationRequest.$Properties - * @deprecated Use atomic.VerifyAttestationRequest.$Properties instead. + * @interface IVerifyAttestationResponse + * @augments atomic.VerifyAttestationResponse.$Properties + * @deprecated Use atomic.VerifyAttestationResponse.$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 + * Shape of a VerifyAttestationResponse. + * @typedef {atomic.VerifyAttestationResponse.$Properties} atomic.VerifyAttestationResponse.$Shape */ /** - * Constructs a new VerifyAttestationRequest. + * Constructs a new VerifyAttestationResponse. * @memberof atomic - * @classdesc Represents a VerifyAttestationRequest. + * @classdesc Represents a VerifyAttestationResponse. * @constructor - * @param {atomic.VerifyAttestationRequest.$Properties=} [properties] Properties to set + * @param {atomic.VerifyAttestationResponse.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var VerifyAttestationRequest = function (properties) { + 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__") @@ -28965,123 +42288,178 @@ $root.atomic = (function() { }; /** - * VerifyAttestationRequest repository. - * @member {atomic.RepositoryRef.$Properties|null|undefined} repository - * @memberof atomic.VerifyAttestationRequest + * VerifyAttestationResponse valid. + * @member {boolean} valid + * @memberof atomic.VerifyAttestationResponse * @instance */ - VerifyAttestationRequest.prototype.repository = null; + VerifyAttestationResponse.prototype.valid = false; /** - * VerifyAttestationRequest attestationId. - * @member {string|null|undefined} attestationId - * @memberof atomic.VerifyAttestationRequest + * VerifyAttestationResponse reason. + * @member {string|null|undefined} reason + * @memberof atomic.VerifyAttestationResponse * @instance */ - VerifyAttestationRequest.prototype.attestationId = null; + VerifyAttestationResponse.prototype.reason = null; /** - * VerifyAttestationRequest subject. - * @member {atomic.AttestationTarget.$Properties|null|undefined} subject - * @memberof atomic.VerifyAttestationRequest + * VerifyAttestationResponse signatureValid. + * @member {boolean|null|undefined} signatureValid + * @memberof atomic.VerifyAttestationResponse * @instance */ - VerifyAttestationRequest.prototype.subject = null; + VerifyAttestationResponse.prototype.signatureValid = null; /** - * VerifyAttestationRequest view. - * @member {atomic.ViewRef.$Properties|null|undefined} view - * @memberof atomic.VerifyAttestationRequest + * VerifyAttestationResponse sourceFresh. + * @member {boolean|null|undefined} sourceFresh + * @memberof atomic.VerifyAttestationResponse * @instance */ - VerifyAttestationRequest.prototype.view = null; + VerifyAttestationResponse.prototype.sourceFresh = null; /** - * VerifyAttestationRequest identityName. - * @member {string|null|undefined} identityName - * @memberof atomic.VerifyAttestationRequest + * VerifyAttestationResponse signedDocument. + * @member {string|null|undefined} signedDocument + * @memberof atomic.VerifyAttestationResponse * @instance */ - VerifyAttestationRequest.prototype.identityName = null; + VerifyAttestationResponse.prototype.signedDocument = null; /** - * VerifyAttestationRequest publicKey. - * @member {Uint8Array|null|undefined} publicKey - * @memberof atomic.VerifyAttestationRequest + * 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 */ - VerifyAttestationRequest.prototype.publicKey = null; + VerifyAttestationResponse.prototype.signedRevision = 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"]), + // 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(VerifyAttestationRequest.prototype, "_identity_name", { - get: $util.oneOfGetter($oneOfFields = ["identityName"]), + $Object.defineProperty(VerifyAttestationResponse.prototype, "_signature_valid", { + get: $util.oneOfGetter($oneOfFields = ["signatureValid"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(VerifyAttestationRequest.prototype, "_public_key", { - get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + $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 VerifyAttestationRequest instance using the specified properties. + * Creates a new VerifyAttestationResponse instance using the specified properties. * @function create - * @memberof atomic.VerifyAttestationRequest + * @memberof atomic.VerifyAttestationResponse * @static - * @param {atomic.VerifyAttestationRequest.$Properties=} [properties] Properties to set - * @returns {atomic.VerifyAttestationRequest} VerifyAttestationRequest instance + * @param {atomic.VerifyAttestationResponse.$Properties=} [properties] Properties to set + * @returns {atomic.VerifyAttestationResponse} VerifyAttestationResponse instance * @type {{ - * (properties: atomic.VerifyAttestationRequest.$Shape): atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape; - * (properties?: atomic.VerifyAttestationRequest.$Properties): atomic.VerifyAttestationRequest; + * (properties: atomic.VerifyAttestationResponse.$Shape): atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape; + * (properties?: atomic.VerifyAttestationResponse.$Properties): atomic.VerifyAttestationResponse; * }} */ - VerifyAttestationRequest.create = function(properties) { - return new VerifyAttestationRequest(properties); + VerifyAttestationResponse.create = function(properties) { + return new VerifyAttestationResponse(properties); }; /** - * Encodes the specified VerifyAttestationRequest message. Does not implicitly {@link atomic.VerifyAttestationRequest.verify|verify} messages. + * Encodes the specified VerifyAttestationResponse message. Does not implicitly {@link atomic.VerifyAttestationResponse.verify|verify} messages. * @function encode - * @memberof atomic.VerifyAttestationRequest + * @memberof atomic.VerifyAttestationResponse * @static - * @param {atomic.VerifyAttestationRequest.$Properties} message VerifyAttestationRequest message or plain object to encode + * @param {atomic.VerifyAttestationResponse.$Properties} message VerifyAttestationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyAttestationRequest.encode = function (message, writer, _depth) { + 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.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.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]); @@ -29089,30 +42467,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified VerifyAttestationRequest message, length delimited. Does not implicitly {@link atomic.VerifyAttestationRequest.verify|verify} messages. + * Encodes the specified VerifyAttestationResponse message, length delimited. Does not implicitly {@link atomic.VerifyAttestationResponse.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.VerifyAttestationRequest + * @memberof atomic.VerifyAttestationResponse * @static - * @param {atomic.VerifyAttestationRequest.$Properties} message VerifyAttestationRequest message or plain object to encode + * @param {atomic.VerifyAttestationResponse.$Properties} message VerifyAttestationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyAttestationRequest.encodeDelimited = function(message, writer) { + VerifyAttestationResponse.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a VerifyAttestationRequest message from the specified reader or buffer. + * Decodes a VerifyAttestationResponse message from the specified reader or buffer. * @function decode - * @memberof atomic.VerifyAttestationRequest + * @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.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape} VerifyAttestationRequest + * @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 */ - VerifyAttestationRequest.decode = function (reader, length, _end, _depth, _target) { + VerifyAttestationResponse.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -29129,7 +42507,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.VerifyAttestationRequest(); + message = _target || new $root.atomic.VerifyAttestationResponse(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -29140,43 +42518,68 @@ $root.atomic = (function() { var wireType = tag & 7; switch (tag >>>= 3) { case 1: { - if (wireType !== 2) + if (wireType !== 0) break; - message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); + if (value = reader.bool()) + message.valid = value; + else + delete message.valid; continue; } case 2: { if (wireType !== 2) break; - message.attestationId = reader.stringVerify(); - message.target = "attestationId"; + message.reason = reader.stringVerify(); + message._reason = "reason"; continue; } case 3: { - if (wireType !== 2) + if (wireType !== 0) break; - message.subject = $root.atomic.AttestationTarget.decode(reader, reader.size(), $undefined, _depth + 1, message.subject); - message.target = "subject"; + message.signatureValid = reader.bool(); + message._signature_valid = "signatureValid"; continue; } case 4: { - if (wireType !== 2) + if (wireType !== 0) break; - message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + message.sourceFresh = reader.bool(); + message._source_fresh = "sourceFresh"; continue; } case 5: { if (wireType !== 2) break; - message.identityName = reader.stringVerify(); - message._identity_name = "identityName"; + message.signedDocument = reader.stringVerify(); + message._signed_document = "signedDocument"; continue; } case 6: { if (wireType !== 2) break; - message.publicKey = reader.bytes(); - message._public_key = "publicKey"; + 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; } } @@ -29197,30 +42600,30 @@ $root.atomic = (function() { }; /** - * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. + * Decodes a VerifyAttestationResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.VerifyAttestationRequest + * @memberof atomic.VerifyAttestationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.VerifyAttestationRequest & atomic.VerifyAttestationRequest.$Shape} VerifyAttestationRequest + * @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 */ - VerifyAttestationRequest.decodeDelimited = function(reader) { + VerifyAttestationResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a VerifyAttestationRequest message. + * Verifies a VerifyAttestationResponse message. * @function verify - * @memberof atomic.VerifyAttestationRequest + * @memberof atomic.VerifyAttestationResponse * @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) { + VerifyAttestationResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -29228,99 +42631,108 @@ $root.atomic = (function() { 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.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.attestationId != null && $Object.hasOwnProperty.call(message, "attestationId")) { - properties.target = 1; - if (!$util.isString(message.attestationId)) - return "attestationId: 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.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.sourceFresh != null && $Object.hasOwnProperty.call(message, "sourceFresh")) { + properties._source_fresh = 1; + if (typeof message.sourceFresh !== "boolean") + return "sourceFresh: 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; + if (message.signedDocument != null && $Object.hasOwnProperty.call(message, "signedDocument")) { + properties._signed_document = 1; + if (!$util.isString(message.signedDocument)) + return "signedDocument: string expected"; } - if (message.identityName != null && $Object.hasOwnProperty.call(message, "identityName")) { - properties._identity_name = 1; - if (!$util.isString(message.identityName)) - return "identityName: 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.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"; + 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 VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VerifyAttestationResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.VerifyAttestationRequest + * @memberof atomic.VerifyAttestationResponse * @static * @param {Object.} object Plain object - * @returns {atomic.VerifyAttestationRequest} VerifyAttestationRequest + * @returns {atomic.VerifyAttestationResponse} VerifyAttestationResponse */ - VerifyAttestationRequest.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.VerifyAttestationRequest) + VerifyAttestationResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.VerifyAttestationResponse) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.VerifyAttestationRequest: object expected"); + 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.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); + 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); } - 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. + * Creates a plain object from a VerifyAttestationResponse message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.VerifyAttestationRequest + * @memberof atomic.VerifyAttestationResponse * @static - * @param {atomic.VerifyAttestationRequest} message VerifyAttestationRequest + * @param {atomic.VerifyAttestationResponse} message VerifyAttestationResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VerifyAttestationRequest.toObject = function (message, options, _depth) { + VerifyAttestationResponse.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -29328,102 +42740,114 @@ $root.atomic = (function() { 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; + 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 VerifyAttestationRequest to JSON. + * Converts this VerifyAttestationResponse to JSON. * @function toJSON - * @memberof atomic.VerifyAttestationRequest + * @memberof atomic.VerifyAttestationResponse * @instance * @returns {Object.} JSON object */ - VerifyAttestationRequest.prototype.toJSON = function() { - return VerifyAttestationRequest.toObject(this, $protobuf.util.toJSONOptions); + VerifyAttestationResponse.prototype.toJSON = function() { + return VerifyAttestationResponse.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for VerifyAttestationRequest + * Gets the type url for VerifyAttestationResponse * @function getTypeUrl - * @memberof atomic.VerifyAttestationRequest + * @memberof atomic.VerifyAttestationResponse * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - VerifyAttestationRequest.getTypeUrl = function(prefix) { + VerifyAttestationResponse.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.VerifyAttestationRequest"; + return prefix + "/atomic.VerifyAttestationResponse"; }; - return VerifyAttestationRequest; + return VerifyAttestationResponse; })(); - atomic.AttestationTarget = (function() { + atomic.QueryGraphRequest = (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 + * 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 an AttestationTarget. + * Properties of a QueryGraphRequest. * @memberof atomic - * @interface IAttestationTarget - * @augments atomic.AttestationTarget.$Properties - * @deprecated Use atomic.AttestationTarget.$Properties instead. + * @interface IQueryGraphRequest + * @augments atomic.QueryGraphRequest.$Properties + * @deprecated Use atomic.QueryGraphRequest.$Properties instead. */ /** - * Narrowed shape of an AttestationTarget. + * Narrowed shape of a QueryGraphRequest. * @typedef {{ - * intentId?: string|null; - * memoryId?: string|null; - * changeHash?: atomic.Hash.$Shape|null; - * graphStats?: atomic.GraphStatsRef.$Shape|null; + * 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.; * } & ( - * ({ 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 + * ({ 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 AttestationTarget. + * Constructs a new QueryGraphRequest. * @memberof atomic - * @classdesc Represents an AttestationTarget. + * @classdesc Represents a QueryGraphRequest. * @constructor - * @param {atomic.AttestationTarget.$Properties=} [properties] Properties to set + * @param {atomic.QueryGraphRequest.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var AttestationTarget = function (properties) { + 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__") @@ -29431,91 +42855,161 @@ $root.atomic = (function() { }; /** - * AttestationTarget intentId. - * @member {string|null|undefined} intentId - * @memberof atomic.AttestationTarget + * QueryGraphRequest repository. + * @member {atomic.RepositoryRef.$Properties|null|undefined} repository + * @memberof atomic.QueryGraphRequest * @instance */ - AttestationTarget.prototype.intentId = null; + QueryGraphRequest.prototype.repository = null; /** - * AttestationTarget memoryId. - * @member {string|null|undefined} memoryId - * @memberof atomic.AttestationTarget + * 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 */ - AttestationTarget.prototype.memoryId = null; + QueryGraphRequest.prototype.plan = null; /** - * AttestationTarget changeHash. - * @member {atomic.Hash.$Properties|null|undefined} changeHash - * @memberof atomic.AttestationTarget + * QueryGraphRequest ragAsk. + * @member {atomic.RagAskQuery.$Properties|null|undefined} ragAsk + * @memberof atomic.QueryGraphRequest * @instance */ - AttestationTarget.prototype.changeHash = null; + QueryGraphRequest.prototype.ragAsk = null; /** - * AttestationTarget graphStats. - * @member {atomic.GraphStatsRef.$Properties|null|undefined} graphStats - * @memberof atomic.AttestationTarget + * QueryGraphRequest view. + * @member {atomic.ViewRef.$Properties|null|undefined} view + * @memberof atomic.QueryGraphRequest * @instance */ - AttestationTarget.prototype.graphStats = null; + QueryGraphRequest.prototype.view = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * AttestationTarget kind. - * @member {"intentId"|"memoryId"|"changeHash"|"graphStats"|undefined} kind - * @memberof atomic.AttestationTarget + * QueryGraphRequest query. + * @member {"contentSearch"|"kgSearch"|"entity"|"neighbors"|"callers"|"graphSlice"|"plan"|"ragAsk"|undefined} query + * @memberof atomic.QueryGraphRequest * @instance */ - $Object.defineProperty(AttestationTarget.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["intentId", "memoryId", "changeHash", "graphStats"]), + $Object.defineProperty(QueryGraphRequest.prototype, "query", { + get: $util.oneOfGetter($oneOfFields = ["contentSearch", "kgSearch", "entity", "neighbors", "callers", "graphSlice", "plan", "ragAsk"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new AttestationTarget instance using the specified properties. + * Creates a new QueryGraphRequest instance using the specified properties. * @function create - * @memberof atomic.AttestationTarget + * @memberof atomic.QueryGraphRequest * @static - * @param {atomic.AttestationTarget.$Properties=} [properties] Properties to set - * @returns {atomic.AttestationTarget} AttestationTarget instance + * @param {atomic.QueryGraphRequest.$Properties=} [properties] Properties to set + * @returns {atomic.QueryGraphRequest} QueryGraphRequest instance * @type {{ - * (properties: atomic.AttestationTarget.$Shape): atomic.AttestationTarget & atomic.AttestationTarget.$Shape; - * (properties?: atomic.AttestationTarget.$Properties): atomic.AttestationTarget; + * (properties: atomic.QueryGraphRequest.$Shape): atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape; + * (properties?: atomic.QueryGraphRequest.$Properties): atomic.QueryGraphRequest; * }} */ - AttestationTarget.create = function(properties) { - return new AttestationTarget(properties); + QueryGraphRequest.create = function(properties) { + return new QueryGraphRequest(properties); }; /** - * Encodes the specified AttestationTarget message. Does not implicitly {@link atomic.AttestationTarget.verify|verify} messages. + * Encodes the specified QueryGraphRequest message. Does not implicitly {@link atomic.QueryGraphRequest.verify|verify} messages. * @function encode - * @memberof atomic.AttestationTarget + * @memberof atomic.QueryGraphRequest * @static - * @param {atomic.AttestationTarget.$Properties} message AttestationTarget message or plain object to encode + * @param {atomic.QueryGraphRequest.$Properties} message QueryGraphRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AttestationTarget.encode = function (message, writer, _depth) { + 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.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.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]); @@ -29523,37 +43017,37 @@ $root.atomic = (function() { }; /** - * Encodes the specified AttestationTarget message, length delimited. Does not implicitly {@link atomic.AttestationTarget.verify|verify} messages. + * Encodes the specified QueryGraphRequest message, length delimited. Does not implicitly {@link atomic.QueryGraphRequest.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.AttestationTarget + * @memberof atomic.QueryGraphRequest * @static - * @param {atomic.AttestationTarget.$Properties} message AttestationTarget message or plain object to encode + * @param {atomic.QueryGraphRequest.$Properties} message QueryGraphRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AttestationTarget.encodeDelimited = function(message, writer) { + QueryGraphRequest.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes an AttestationTarget message from the specified reader or buffer. + * Decodes a QueryGraphRequest message from the specified reader or buffer. * @function decode - * @memberof atomic.AttestationTarget + * @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.AttestationTarget & atomic.AttestationTarget.$Shape} AttestationTarget + * @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 */ - AttestationTarget.decode = function (reader, length, _end, _depth, _target) { + 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; + var end, message, value; if (length === $undefined) end = reader.len; else { @@ -29563,7 +43057,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.AttestationTarget(); + message = _target || new $root.atomic.QueryGraphRequest(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -29576,29 +43070,78 @@ $root.atomic = (function() { case 1: { if (wireType !== 2) break; - message.intentId = reader.stringVerify(); - message.kind = "intentId"; + message.repository = $root.atomic.RepositoryRef.decode(reader, reader.size(), $undefined, _depth + 1, message.repository); continue; } case 2: { - if (wireType !== 2) + if (wireType !== 0) break; - message.memoryId = reader.stringVerify(); - message.kind = "memoryId"; + if (value = reader.uint32()) + message.limit = value; + else + delete message.limit; continue; } case 3: { if (wireType !== 2) break; - message.changeHash = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.changeHash); - message.kind = "changeHash"; + 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.graphStats = $root.atomic.GraphStatsRef.decode(reader, reader.size(), $undefined, _depth + 1, message.graphStats); - message.kind = "graphStats"; + 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; } } @@ -29619,30 +43162,30 @@ $root.atomic = (function() { }; /** - * Decodes an AttestationTarget message from the specified reader or buffer, length delimited. + * Decodes a QueryGraphRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.AttestationTarget + * @memberof atomic.QueryGraphRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.AttestationTarget & atomic.AttestationTarget.$Shape} AttestationTarget + * @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 */ - AttestationTarget.decodeDelimited = function(reader) { + QueryGraphRequest.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies an AttestationTarget message. + * Verifies a QueryGraphRequest message. * @function verify - * @memberof atomic.AttestationTarget + * @memberof atomic.QueryGraphRequest * @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) { + QueryGraphRequest.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -29650,86 +43193,184 @@ $root.atomic = (function() { 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.repository != null && $Object.hasOwnProperty.call(message, "repository")) { + var error = $root.atomic.RepositoryRef.verify(message.repository, _depth + 1); + if (error) + return "repository." + error; } - 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.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.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; + if (message.kgSearch != null && $Object.hasOwnProperty.call(message, "kgSearch")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; { - var error = $root.atomic.Hash.verify(message.changeHash, _depth + 1); + var error = $root.atomic.KgSearchQuery.verify(message.kgSearch, _depth + 1); if (error) - return "changeHash." + error; + return "kgSearch." + error; } } - if (message.graphStats != null && $Object.hasOwnProperty.call(message, "graphStats")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; + if (message.entity != null && $Object.hasOwnProperty.call(message, "entity")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; { - var error = $root.atomic.GraphStatsRef.verify(message.graphStats, _depth + 1); + var error = $root.atomic.EntityQuery.verify(message.entity, _depth + 1); if (error) - return "graphStats." + 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 an AttestationTarget message from a plain object. Also converts values to their respective internal types. + * Creates a QueryGraphRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.AttestationTarget + * @memberof atomic.QueryGraphRequest * @static * @param {Object.} object Plain object - * @returns {atomic.AttestationTarget} AttestationTarget + * @returns {atomic.QueryGraphRequest} QueryGraphRequest */ - AttestationTarget.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.AttestationTarget) + QueryGraphRequest.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.QueryGraphRequest) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.AttestationTarget: object expected"); + 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.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); + 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.graphStats != null) { - if (!$util.isObject(object.graphStats)) - throw $TypeError(".atomic.AttestationTarget.graphStats: object expected"); - message.graphStats = $root.atomic.GraphStatsRef.fromObject(object.graphStats, _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 an AttestationTarget message. Also converts values to other types if specified. + * Creates a plain object from a QueryGraphRequest message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.AttestationTarget + * @memberof atomic.QueryGraphRequest * @static - * @param {atomic.AttestationTarget} message AttestationTarget + * @param {atomic.QueryGraphRequest} message QueryGraphRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AttestationTarget.toObject = function (message, options, _depth) { + QueryGraphRequest.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -29737,90 +43378,126 @@ $root.atomic = (function() { 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.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.kind = "intentId"; + object.query = "contentSearch"; } - if (message.memoryId != null && $Object.hasOwnProperty.call(message, "memoryId")) { - object.memoryId = message.memoryId; + if (message.kgSearch != null && $Object.hasOwnProperty.call(message, "kgSearch")) { + object.kgSearch = $root.atomic.KgSearchQuery.toObject(message.kgSearch, options, _depth + 1); if (options.oneofs) - object.kind = "memoryId"; + object.query = "kgSearch"; } - if (message.changeHash != null && $Object.hasOwnProperty.call(message, "changeHash")) { - object.changeHash = $root.atomic.Hash.toObject(message.changeHash, options, _depth + 1); + if (message.entity != null && $Object.hasOwnProperty.call(message, "entity")) { + object.entity = $root.atomic.EntityQuery.toObject(message.entity, options, _depth + 1); if (options.oneofs) - object.kind = "changeHash"; + object.query = "entity"; } - if (message.graphStats != null && $Object.hasOwnProperty.call(message, "graphStats")) { - object.graphStats = $root.atomic.GraphStatsRef.toObject(message.graphStats, options, _depth + 1); + if (message.neighbors != null && $Object.hasOwnProperty.call(message, "neighbors")) { + object.neighbors = $root.atomic.NeighborsQuery.toObject(message.neighbors, options, _depth + 1); if (options.oneofs) - object.kind = "graphStats"; + 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 AttestationTarget to JSON. + * Converts this QueryGraphRequest to JSON. * @function toJSON - * @memberof atomic.AttestationTarget + * @memberof atomic.QueryGraphRequest * @instance * @returns {Object.} JSON object */ - AttestationTarget.prototype.toJSON = function() { - return AttestationTarget.toObject(this, $protobuf.util.toJSONOptions); + QueryGraphRequest.prototype.toJSON = function() { + return QueryGraphRequest.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for AttestationTarget + * Gets the type url for QueryGraphRequest * @function getTypeUrl - * @memberof atomic.AttestationTarget + * @memberof atomic.QueryGraphRequest * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - AttestationTarget.getTypeUrl = function(prefix) { + QueryGraphRequest.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.AttestationTarget"; + return prefix + "/atomic.QueryGraphRequest"; }; - return AttestationTarget; + return QueryGraphRequest; })(); - atomic.GraphStatsRef = (function() { + atomic.ContentSearchQuery = (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 + * Properties of a ContentSearchQuery. + * @typedef {Object} atomic.ContentSearchQuery.$Properties + * @property {string|null} [query] ContentSearchQuery query + * @property {Array.|null} [paths] ContentSearchQuery paths + * @property {string|null} [pathFilter] ContentSearchQuery pathFilter + * @property {string|null} [fileType] ContentSearchQuery fileType + * @property {string|null} [excludeType] ContentSearchQuery excludeType + * @property {boolean|null} [caseInsensitive] ContentSearchQuery caseInsensitive + * @property {number|null} [maxResults] ContentSearchQuery maxResults * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ /** - * Properties of a GraphStatsRef. + * Properties of a ContentSearchQuery. * @memberof atomic - * @interface IGraphStatsRef - * @augments atomic.GraphStatsRef.$Properties - * @deprecated Use atomic.GraphStatsRef.$Properties instead. + * @interface IContentSearchQuery + * @augments atomic.ContentSearchQuery.$Properties + * @deprecated Use atomic.ContentSearchQuery.$Properties instead. */ /** - * Shape of a GraphStatsRef. - * @typedef {atomic.GraphStatsRef.$Properties} atomic.GraphStatsRef.$Shape + * Shape of a ContentSearchQuery. + * @typedef {atomic.ContentSearchQuery.$Properties} atomic.ContentSearchQuery.$Shape */ /** - * Constructs a new GraphStatsRef. + * Constructs a new ContentSearchQuery. * @memberof atomic - * @classdesc Represents a GraphStatsRef. + * @classdesc Represents a ContentSearchQuery. * @constructor - * @param {atomic.GraphStatsRef.$Properties=} [properties] Properties to set + * @param {atomic.ContentSearchQuery.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var GraphStatsRef = function (properties) { + 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__") @@ -29828,88 +43505,135 @@ $root.atomic = (function() { }; /** - * GraphStatsRef sessionId. - * @member {string|null|undefined} sessionId - * @memberof atomic.GraphStatsRef + * ContentSearchQuery query. + * @member {string} query + * @memberof atomic.ContentSearchQuery * @instance */ - GraphStatsRef.prototype.sessionId = null; + ContentSearchQuery.prototype.query = ""; /** - * GraphStatsRef turnNumber. - * @member {number|null|undefined} turnNumber - * @memberof atomic.GraphStatsRef + * ContentSearchQuery paths. + * @member {Array.} paths + * @memberof atomic.ContentSearchQuery + * @instance + */ + ContentSearchQuery.prototype.paths = $util.emptyArray; + + /** + * ContentSearchQuery pathFilter. + * @member {string|null|undefined} pathFilter + * @memberof atomic.ContentSearchQuery + * @instance + */ + ContentSearchQuery.prototype.pathFilter = null; + + /** + * ContentSearchQuery fileType. + * @member {string|null|undefined} fileType + * @memberof atomic.ContentSearchQuery + * @instance + */ + ContentSearchQuery.prototype.fileType = null; + + /** + * ContentSearchQuery excludeType. + * @member {string|null|undefined} excludeType + * @memberof atomic.ContentSearchQuery + * @instance + */ + ContentSearchQuery.prototype.excludeType = null; + + /** + * ContentSearchQuery caseInsensitive. + * @member {boolean} caseInsensitive + * @memberof atomic.ContentSearchQuery * @instance */ - GraphStatsRef.prototype.turnNumber = null; + ContentSearchQuery.prototype.caseInsensitive = false; /** - * GraphStatsRef changeHash. - * @member {atomic.Hash.$Properties|null|undefined} changeHash - * @memberof atomic.GraphStatsRef + * ContentSearchQuery maxResults. + * @member {number|null|undefined} maxResults + * @memberof atomic.ContentSearchQuery * @instance */ - GraphStatsRef.prototype.changeHash = null; + ContentSearchQuery.prototype.maxResults = 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"]), + $Object.defineProperty(ContentSearchQuery.prototype, "_path_filter", { + get: $util.oneOfGetter($oneOfFields = ["pathFilter"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(GraphStatsRef.prototype, "_turn_number", { - get: $util.oneOfGetter($oneOfFields = ["turnNumber"]), + $Object.defineProperty(ContentSearchQuery.prototype, "_file_type", { + get: $util.oneOfGetter($oneOfFields = ["fileType"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(GraphStatsRef.prototype, "_change_hash", { - get: $util.oneOfGetter($oneOfFields = ["changeHash"]), + $Object.defineProperty(ContentSearchQuery.prototype, "_exclude_type", { + get: $util.oneOfGetter($oneOfFields = ["excludeType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + $Object.defineProperty(ContentSearchQuery.prototype, "_max_results", { + get: $util.oneOfGetter($oneOfFields = ["maxResults"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new GraphStatsRef instance using the specified properties. + * Creates a new ContentSearchQuery instance using the specified properties. * @function create - * @memberof atomic.GraphStatsRef + * @memberof atomic.ContentSearchQuery * @static - * @param {atomic.GraphStatsRef.$Properties=} [properties] Properties to set - * @returns {atomic.GraphStatsRef} GraphStatsRef instance + * @param {atomic.ContentSearchQuery.$Properties=} [properties] Properties to set + * @returns {atomic.ContentSearchQuery} ContentSearchQuery instance * @type {{ - * (properties: atomic.GraphStatsRef.$Shape): atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape; - * (properties?: atomic.GraphStatsRef.$Properties): atomic.GraphStatsRef; + * (properties: atomic.ContentSearchQuery.$Shape): atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape; + * (properties?: atomic.ContentSearchQuery.$Properties): atomic.ContentSearchQuery; * }} */ - GraphStatsRef.create = function(properties) { - return new GraphStatsRef(properties); + ContentSearchQuery.create = function(properties) { + return new ContentSearchQuery(properties); }; /** - * Encodes the specified GraphStatsRef message. Does not implicitly {@link atomic.GraphStatsRef.verify|verify} messages. + * Encodes the specified ContentSearchQuery message. Does not implicitly {@link atomic.ContentSearchQuery.verify|verify} messages. * @function encode - * @memberof atomic.GraphStatsRef + * @memberof atomic.ContentSearchQuery * @static - * @param {atomic.GraphStatsRef.$Properties} message GraphStatsRef message or plain object to encode + * @param {atomic.ContentSearchQuery.$Properties} message ContentSearchQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GraphStatsRef.encode = function (message, writer, _depth) { + 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.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.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.pathFilter != null && $Object.hasOwnProperty.call(message, "pathFilter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pathFilter); + if (message.fileType != null && $Object.hasOwnProperty.call(message, "fileType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.fileType); + if (message.excludeType != null && $Object.hasOwnProperty.call(message, "excludeType")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.excludeType); + if (message.caseInsensitive != null && $Object.hasOwnProperty.call(message, "caseInsensitive") && message.caseInsensitive !== false) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.caseInsensitive); + if (message.maxResults != null && $Object.hasOwnProperty.call(message, "maxResults")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.maxResults); if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) for (var i = 0; i < message.$unknowns.length; ++i) writer.raw(message.$unknowns[i]); @@ -29917,37 +43641,37 @@ $root.atomic = (function() { }; /** - * Encodes the specified GraphStatsRef message, length delimited. Does not implicitly {@link atomic.GraphStatsRef.verify|verify} messages. + * Encodes the specified ContentSearchQuery message, length delimited. Does not implicitly {@link atomic.ContentSearchQuery.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.GraphStatsRef + * @memberof atomic.ContentSearchQuery * @static - * @param {atomic.GraphStatsRef.$Properties} message GraphStatsRef message or plain object to encode + * @param {atomic.ContentSearchQuery.$Properties} message ContentSearchQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GraphStatsRef.encodeDelimited = function(message, writer) { + ContentSearchQuery.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a GraphStatsRef message from the specified reader or buffer. + * Decodes a ContentSearchQuery message from the specified reader or buffer. * @function decode - * @memberof atomic.GraphStatsRef + * @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.GraphStatsRef & atomic.GraphStatsRef.$Shape} GraphStatsRef + * @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 */ - GraphStatsRef.decode = function (reader, length, _end, _depth, _target) { + 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; + var end, message, value; if (length === $undefined) end = reader.len; else { @@ -29957,7 +43681,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.GraphStatsRef(); + message = _target || new $root.atomic.ContentSearchQuery(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -29970,22 +43694,55 @@ $root.atomic = (function() { case 1: { if (wireType !== 2) break; - message.sessionId = reader.stringVerify(); - message._session_id = "sessionId"; + if ((value = reader.stringVerify()).length) + message.query = value; + else + delete message.query; continue; } case 2: { - if (wireType !== 0) + if (wireType !== 2) break; - message.turnNumber = reader.uint32(); - message._turn_number = "turnNumber"; + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.stringVerify()); 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"; + message.pathFilter = reader.stringVerify(); + message._path_filter = "pathFilter"; + continue; + } + case 4: { + if (wireType !== 2) + break; + message.fileType = reader.stringVerify(); + message._file_type = "fileType"; + continue; + } + case 5: { + if (wireType !== 2) + break; + message.excludeType = reader.stringVerify(); + message._exclude_type = "excludeType"; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (value = reader.bool()) + message.caseInsensitive = value; + else + delete message.caseInsensitive; + continue; + } + case 7: { + if (wireType !== 0) + break; + message.maxResults = reader.uint32(); + message._max_results = "maxResults"; continue; } } @@ -30006,30 +43763,30 @@ $root.atomic = (function() { }; /** - * Decodes a GraphStatsRef message from the specified reader or buffer, length delimited. + * Decodes a ContentSearchQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.GraphStatsRef + * @memberof atomic.ContentSearchQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.GraphStatsRef & atomic.GraphStatsRef.$Shape} GraphStatsRef + * @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 */ - GraphStatsRef.decodeDelimited = function(reader) { + ContentSearchQuery.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a GraphStatsRef message. + * Verifies a ContentSearchQuery message. * @function verify - * @memberof atomic.GraphStatsRef + * @memberof atomic.ContentSearchQuery * @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) { + ContentSearchQuery.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -30037,67 +43794,94 @@ $root.atomic = (function() { 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.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"; } - 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; - } + if (message.pathFilter != null && $Object.hasOwnProperty.call(message, "pathFilter")) { + properties._path_filter = 1; + if (!$util.isString(message.pathFilter)) + return "pathFilter: string expected"; + } + if (message.fileType != null && $Object.hasOwnProperty.call(message, "fileType")) { + properties._file_type = 1; + if (!$util.isString(message.fileType)) + return "fileType: string expected"; + } + if (message.excludeType != null && $Object.hasOwnProperty.call(message, "excludeType")) { + properties._exclude_type = 1; + if (!$util.isString(message.excludeType)) + return "excludeType: string expected"; + } + if (message.caseInsensitive != null && $Object.hasOwnProperty.call(message, "caseInsensitive")) + if (typeof message.caseInsensitive !== "boolean") + return "caseInsensitive: boolean expected"; + if (message.maxResults != null && $Object.hasOwnProperty.call(message, "maxResults")) { + properties._max_results = 1; + if (!$util.isInteger(message.maxResults)) + return "maxResults: integer expected"; } return null; }; /** - * Creates a GraphStatsRef message from a plain object. Also converts values to their respective internal types. + * Creates a ContentSearchQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.GraphStatsRef + * @memberof atomic.ContentSearchQuery * @static * @param {Object.} object Plain object - * @returns {atomic.GraphStatsRef} GraphStatsRef + * @returns {atomic.ContentSearchQuery} ContentSearchQuery */ - GraphStatsRef.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.GraphStatsRef) + ContentSearchQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ContentSearchQuery) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.GraphStatsRef: object expected"); + 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.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); + 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]); } + if (object.pathFilter != null) + message.pathFilter = $String(object.pathFilter); + if (object.fileType != null) + message.fileType = $String(object.fileType); + if (object.excludeType != null) + message.excludeType = $String(object.excludeType); + if (object.caseInsensitive != null) + if (object.caseInsensitive) + message.caseInsensitive = $Boolean(object.caseInsensitive); + if (object.maxResults != null) + message.maxResults = object.maxResults >>> 0; return message; }; /** - * Creates a plain object from a GraphStatsRef message. Also converts values to other types if specified. + * Creates a plain object from a ContentSearchQuery message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.GraphStatsRef + * @memberof atomic.ContentSearchQuery * @static - * @param {atomic.GraphStatsRef} message GraphStatsRef + * @param {atomic.ContentSearchQuery} message ContentSearchQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GraphStatsRef.toObject = function (message, options, _depth) { + ContentSearchQuery.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -30105,82 +43889,93 @@ $root.atomic = (function() { 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); + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.query = ""; + object.caseInsensitive = false; + } + 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]; + } + if (message.pathFilter != null && $Object.hasOwnProperty.call(message, "pathFilter")) + object.pathFilter = message.pathFilter; + if (message.fileType != null && $Object.hasOwnProperty.call(message, "fileType")) + object.fileType = message.fileType; + if (message.excludeType != null && $Object.hasOwnProperty.call(message, "excludeType")) + object.excludeType = message.excludeType; + if (message.caseInsensitive != null && $Object.hasOwnProperty.call(message, "caseInsensitive")) + object.caseInsensitive = message.caseInsensitive; + if (message.maxResults != null && $Object.hasOwnProperty.call(message, "maxResults")) + object.maxResults = message.maxResults; return object; }; /** - * Converts this GraphStatsRef to JSON. + * Converts this ContentSearchQuery to JSON. * @function toJSON - * @memberof atomic.GraphStatsRef + * @memberof atomic.ContentSearchQuery * @instance * @returns {Object.} JSON object */ - GraphStatsRef.prototype.toJSON = function() { - return GraphStatsRef.toObject(this, $protobuf.util.toJSONOptions); + ContentSearchQuery.prototype.toJSON = function() { + return ContentSearchQuery.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for GraphStatsRef + * Gets the type url for ContentSearchQuery * @function getTypeUrl - * @memberof atomic.GraphStatsRef + * @memberof atomic.ContentSearchQuery * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - GraphStatsRef.getTypeUrl = function(prefix) { + ContentSearchQuery.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.GraphStatsRef"; + return prefix + "/atomic.ContentSearchQuery"; }; - return GraphStatsRef; + return ContentSearchQuery; })(); - atomic.VerifyAttestationResponse = (function() { + atomic.KgSearchQuery = (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 + * 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 VerifyAttestationResponse. + * Properties of a KgSearchQuery. * @memberof atomic - * @interface IVerifyAttestationResponse - * @augments atomic.VerifyAttestationResponse.$Properties - * @deprecated Use atomic.VerifyAttestationResponse.$Properties instead. + * @interface IKgSearchQuery + * @augments atomic.KgSearchQuery.$Properties + * @deprecated Use atomic.KgSearchQuery.$Properties instead. */ /** - * Shape of a VerifyAttestationResponse. - * @typedef {atomic.VerifyAttestationResponse.$Properties} atomic.VerifyAttestationResponse.$Shape + * Shape of a KgSearchQuery. + * @typedef {atomic.KgSearchQuery.$Properties} atomic.KgSearchQuery.$Shape */ /** - * Constructs a new VerifyAttestationResponse. + * Constructs a new KgSearchQuery. * @memberof atomic - * @classdesc Represents a VerifyAttestationResponse. + * @classdesc Represents a KgSearchQuery. * @constructor - * @param {atomic.VerifyAttestationResponse.$Properties=} [properties] Properties to set + * @param {atomic.KgSearchQuery.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var VerifyAttestationResponse = function (properties) { + 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__") @@ -30188,178 +43983,82 @@ $root.atomic = (function() { }; /** - * 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 + * KgSearchQuery query. + * @member {string} query + * @memberof atomic.KgSearchQuery * @instance */ - VerifyAttestationResponse.prototype.currentSourceHash = null; + KgSearchQuery.prototype.query = ""; /** - * VerifyAttestationResponse signedSourceHash. - * @member {string|null|undefined} signedSourceHash - * @memberof atomic.VerifyAttestationResponse + * KgSearchQuery kind. + * @member {string|null|undefined} kind + * @memberof atomic.KgSearchQuery * @instance */ - VerifyAttestationResponse.prototype.signedSourceHash = null; + KgSearchQuery.prototype.kind = null; /** - * VerifyAttestationResponse signedRevision. - * @member {atomic.Hash.$Properties|null|undefined} signedRevision - * @memberof atomic.VerifyAttestationResponse + * KgSearchQuery pool. + * @member {number|null|undefined} pool + * @memberof atomic.KgSearchQuery * @instance */ - VerifyAttestationResponse.prototype.signedRevision = null; + KgSearchQuery.prototype.pool = 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"]), + $Object.defineProperty(KgSearchQuery.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(VerifyAttestationResponse.prototype, "_signed_revision", { - get: $util.oneOfGetter($oneOfFields = ["signedRevision"]), + $Object.defineProperty(KgSearchQuery.prototype, "_pool", { + get: $util.oneOfGetter($oneOfFields = ["pool"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new VerifyAttestationResponse instance using the specified properties. + * Creates a new KgSearchQuery instance using the specified properties. * @function create - * @memberof atomic.VerifyAttestationResponse + * @memberof atomic.KgSearchQuery * @static - * @param {atomic.VerifyAttestationResponse.$Properties=} [properties] Properties to set - * @returns {atomic.VerifyAttestationResponse} VerifyAttestationResponse instance + * @param {atomic.KgSearchQuery.$Properties=} [properties] Properties to set + * @returns {atomic.KgSearchQuery} KgSearchQuery instance * @type {{ - * (properties: atomic.VerifyAttestationResponse.$Shape): atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape; - * (properties?: atomic.VerifyAttestationResponse.$Properties): atomic.VerifyAttestationResponse; + * (properties: atomic.KgSearchQuery.$Shape): atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape; + * (properties?: atomic.KgSearchQuery.$Properties): atomic.KgSearchQuery; * }} */ - VerifyAttestationResponse.create = function(properties) { - return new VerifyAttestationResponse(properties); + KgSearchQuery.create = function(properties) { + return new KgSearchQuery(properties); }; /** - * Encodes the specified VerifyAttestationResponse message. Does not implicitly {@link atomic.VerifyAttestationResponse.verify|verify} messages. + * Encodes the specified KgSearchQuery message. Does not implicitly {@link atomic.KgSearchQuery.verify|verify} messages. * @function encode - * @memberof atomic.VerifyAttestationResponse + * @memberof atomic.KgSearchQuery * @static - * @param {atomic.VerifyAttestationResponse.$Properties} message VerifyAttestationResponse message or plain object to encode + * @param {atomic.KgSearchQuery.$Properties} message KgSearchQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyAttestationResponse.encode = function (message, writer, _depth) { + 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.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.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]); @@ -30367,119 +44066,77 @@ $root.atomic = (function() { }; /** - * Encodes the specified VerifyAttestationResponse message, length delimited. Does not implicitly {@link atomic.VerifyAttestationResponse.verify|verify} messages. + * Encodes the specified KgSearchQuery message, length delimited. Does not implicitly {@link atomic.KgSearchQuery.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.VerifyAttestationResponse + * @memberof atomic.KgSearchQuery * @static - * @param {atomic.VerifyAttestationResponse.$Properties} message VerifyAttestationResponse message or plain object to encode + * @param {atomic.KgSearchQuery.$Properties} message KgSearchQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyAttestationResponse.encodeDelimited = function(message, writer) { + KgSearchQuery.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a VerifyAttestationResponse message from the specified reader or buffer. + * Decodes a KgSearchQuery message from the specified reader or buffer. * @function decode - * @memberof atomic.VerifyAttestationResponse + * @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.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape} VerifyAttestationResponse + * @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 */ - VerifyAttestationResponse.decode = function (reader, length, _end, _depth, _target) { + 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.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: { + 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; - message.currentSourceHash = reader.stringVerify(); - message._current_source_hash = "currentSourceHash"; + if ((value = reader.stringVerify()).length) + message.query = value; + else + delete message.query; continue; } - case 8: { + case 2: { if (wireType !== 2) break; - message.signedSourceHash = reader.stringVerify(); - message._signed_source_hash = "signedSourceHash"; + message.kind = reader.stringVerify(); + message._kind = "kind"; continue; } - case 9: { - if (wireType !== 2) + case 3: { + if (wireType !== 0) break; - message.signedRevision = $root.atomic.Hash.decode(reader, reader.size(), $undefined, _depth + 1, message.signedRevision); - message._signed_revision = "signedRevision"; + message.pool = reader.uint32(); + message._pool = "pool"; continue; } } @@ -30500,30 +44157,30 @@ $root.atomic = (function() { }; /** - * Decodes a VerifyAttestationResponse message from the specified reader or buffer, length delimited. + * Decodes a KgSearchQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.VerifyAttestationResponse + * @memberof atomic.KgSearchQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.VerifyAttestationResponse & atomic.VerifyAttestationResponse.$Shape} VerifyAttestationResponse + * @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 */ - VerifyAttestationResponse.decodeDelimited = function(reader) { + KgSearchQuery.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a VerifyAttestationResponse message. + * Verifies a KgSearchQuery message. * @function verify - * @memberof atomic.VerifyAttestationResponse + * @memberof atomic.KgSearchQuery * @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) { + KgSearchQuery.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -30531,108 +44188,60 @@ $root.atomic = (function() { 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.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.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; - } + 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 VerifyAttestationResponse message from a plain object. Also converts values to their respective internal types. + * Creates a KgSearchQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.VerifyAttestationResponse + * @memberof atomic.KgSearchQuery * @static * @param {Object.} object Plain object - * @returns {atomic.VerifyAttestationResponse} VerifyAttestationResponse + * @returns {atomic.KgSearchQuery} KgSearchQuery */ - VerifyAttestationResponse.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.VerifyAttestationResponse) + KgSearchQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.KgSearchQuery) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.VerifyAttestationResponse: object expected"); + 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.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); - } + 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 VerifyAttestationResponse message. Also converts values to other types if specified. + * Creates a plain object from a KgSearchQuery message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.VerifyAttestationResponse + * @memberof atomic.KgSearchQuery * @static - * @param {atomic.VerifyAttestationResponse} message VerifyAttestationResponse + * @param {atomic.KgSearchQuery} message KgSearchQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VerifyAttestationResponse.toObject = function (message, options, _depth) { + KgSearchQuery.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -30641,113 +44250,75 @@ $root.atomic = (function() { 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); + 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 VerifyAttestationResponse to JSON. + * Converts this KgSearchQuery to JSON. * @function toJSON - * @memberof atomic.VerifyAttestationResponse + * @memberof atomic.KgSearchQuery * @instance * @returns {Object.} JSON object */ - VerifyAttestationResponse.prototype.toJSON = function() { - return VerifyAttestationResponse.toObject(this, $protobuf.util.toJSONOptions); + KgSearchQuery.prototype.toJSON = function() { + return KgSearchQuery.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for VerifyAttestationResponse + * Gets the type url for KgSearchQuery * @function getTypeUrl - * @memberof atomic.VerifyAttestationResponse + * @memberof atomic.KgSearchQuery * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - VerifyAttestationResponse.getTypeUrl = function(prefix) { + KgSearchQuery.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.VerifyAttestationResponse"; + return prefix + "/atomic.KgSearchQuery"; }; - return VerifyAttestationResponse; + return KgSearchQuery; })(); - atomic.QueryGraphRequest = (function() { + atomic.EntityQuery = (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 + * 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 a QueryGraphRequest. + * Properties of an EntityQuery. * @memberof atomic - * @interface IQueryGraphRequest - * @augments atomic.QueryGraphRequest.$Properties - * @deprecated Use atomic.QueryGraphRequest.$Properties instead. + * @interface IEntityQuery + * @augments atomic.EntityQuery.$Properties + * @deprecated Use atomic.EntityQuery.$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 + * Shape of an EntityQuery. + * @typedef {atomic.EntityQuery.$Properties} atomic.EntityQuery.$Shape */ /** - * Constructs a new QueryGraphRequest. + * Constructs a new EntityQuery. * @memberof atomic - * @classdesc Represents a QueryGraphRequest. + * @classdesc Represents an EntityQuery. * @constructor - * @param {atomic.QueryGraphRequest.$Properties=} [properties] Properties to set + * @param {atomic.EntityQuery.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var QueryGraphRequest = function (properties) { + 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__") @@ -30755,161 +44326,47 @@ $root.atomic = (function() { }; /** - * 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 + * EntityQuery nodeId. + * @member {string} nodeId + * @memberof atomic.EntityQuery * @instance */ - $Object.defineProperty(QueryGraphRequest.prototype, "query", { - get: $util.oneOfGetter($oneOfFields = ["contentSearch", "kgSearch", "entity", "neighbors", "callers", "graphSlice", "plan", "ragAsk"]), - set: $util.oneOfSetter($oneOfFields) - }); + EntityQuery.prototype.nodeId = ""; /** - * Creates a new QueryGraphRequest instance using the specified properties. + * Creates a new EntityQuery instance using the specified properties. * @function create - * @memberof atomic.QueryGraphRequest + * @memberof atomic.EntityQuery * @static - * @param {atomic.QueryGraphRequest.$Properties=} [properties] Properties to set - * @returns {atomic.QueryGraphRequest} QueryGraphRequest instance + * @param {atomic.EntityQuery.$Properties=} [properties] Properties to set + * @returns {atomic.EntityQuery} EntityQuery instance * @type {{ - * (properties: atomic.QueryGraphRequest.$Shape): atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape; - * (properties?: atomic.QueryGraphRequest.$Properties): atomic.QueryGraphRequest; + * (properties: atomic.EntityQuery.$Shape): atomic.EntityQuery & atomic.EntityQuery.$Shape; + * (properties?: atomic.EntityQuery.$Properties): atomic.EntityQuery; * }} */ - QueryGraphRequest.create = function(properties) { - return new QueryGraphRequest(properties); + EntityQuery.create = function(properties) { + return new EntityQuery(properties); }; /** - * Encodes the specified QueryGraphRequest message. Does not implicitly {@link atomic.QueryGraphRequest.verify|verify} messages. + * Encodes the specified EntityQuery message. Does not implicitly {@link atomic.EntityQuery.verify|verify} messages. * @function encode - * @memberof atomic.QueryGraphRequest + * @memberof atomic.EntityQuery * @static - * @param {atomic.QueryGraphRequest.$Properties} message QueryGraphRequest message or plain object to encode + * @param {atomic.EntityQuery.$Properties} message EntityQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryGraphRequest.encode = function (message, writer, _depth) { + 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.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.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]); @@ -30917,30 +44374,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified QueryGraphRequest message, length delimited. Does not implicitly {@link atomic.QueryGraphRequest.verify|verify} messages. + * Encodes the specified EntityQuery message, length delimited. Does not implicitly {@link atomic.EntityQuery.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.QueryGraphRequest + * @memberof atomic.EntityQuery * @static - * @param {atomic.QueryGraphRequest.$Properties} message QueryGraphRequest message or plain object to encode + * @param {atomic.EntityQuery.$Properties} message EntityQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryGraphRequest.encodeDelimited = function(message, writer) { + EntityQuery.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a QueryGraphRequest message from the specified reader or buffer. + * Decodes an EntityQuery message from the specified reader or buffer. * @function decode - * @memberof atomic.QueryGraphRequest + * @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.QueryGraphRequest & atomic.QueryGraphRequest.$Shape} QueryGraphRequest + * @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 */ - QueryGraphRequest.decode = function (reader, length, _end, _depth, _target) { + EntityQuery.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -30957,91 +44414,23 @@ $root.atomic = (function() { 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: { + 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; - message.view = $root.atomic.ViewRef.decode(reader, reader.size(), $undefined, _depth + 1, message.view); + if ((value = reader.stringVerify()).length) + message.nodeId = value; + else + delete message.nodeId; continue; } } @@ -31062,215 +44451,76 @@ $root.atomic = (function() { }; /** - * Decodes a QueryGraphRequest message from the specified reader or buffer, length delimited. + * Decodes an EntityQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.QueryGraphRequest + * @memberof atomic.EntityQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.QueryGraphRequest & atomic.QueryGraphRequest.$Shape} QueryGraphRequest + * @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 */ - QueryGraphRequest.decodeDelimited = function(reader) { + EntityQuery.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a QueryGraphRequest message. + * Verifies an EntityQuery message. * @function verify - * @memberof atomic.QueryGraphRequest + * @memberof atomic.EntityQuery * @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) { + 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"; - 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; - } + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + if (!$util.isString(message.nodeId)) + return "nodeId: string expected"; return null; }; /** - * Creates a QueryGraphRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EntityQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.QueryGraphRequest + * @memberof atomic.EntityQuery * @static * @param {Object.} object Plain object - * @returns {atomic.QueryGraphRequest} QueryGraphRequest + * @returns {atomic.EntityQuery} EntityQuery */ - QueryGraphRequest.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.QueryGraphRequest) + EntityQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.EntityQuery) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.QueryGraphRequest: object expected"); + 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.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); - } + 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 a QueryGraphRequest message. Also converts values to other types if specified. + * Creates a plain object from an EntityQuery message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.QueryGraphRequest + * @memberof atomic.EntityQuery * @static - * @param {atomic.QueryGraphRequest} message QueryGraphRequest + * @param {atomic.EntityQuery} message EntityQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryGraphRequest.toObject = function (message, options, _depth) { + EntityQuery.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -31278,121 +44528,74 @@ $root.atomic = (function() { 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); + if (options.defaults) + object.nodeId = ""; + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + object.nodeId = message.nodeId; return object; }; /** - * Converts this QueryGraphRequest to JSON. + * Converts this EntityQuery to JSON. * @function toJSON - * @memberof atomic.QueryGraphRequest + * @memberof atomic.EntityQuery * @instance * @returns {Object.} JSON object */ - QueryGraphRequest.prototype.toJSON = function() { - return QueryGraphRequest.toObject(this, $protobuf.util.toJSONOptions); + EntityQuery.prototype.toJSON = function() { + return EntityQuery.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for QueryGraphRequest + * Gets the type url for EntityQuery * @function getTypeUrl - * @memberof atomic.QueryGraphRequest + * @memberof atomic.EntityQuery * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - QueryGraphRequest.getTypeUrl = function(prefix) { + EntityQuery.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.QueryGraphRequest"; + return prefix + "/atomic.EntityQuery"; }; - return QueryGraphRequest; + return EntityQuery; })(); - atomic.ContentSearchQuery = (function() { + atomic.NeighborsQuery = (function() { /** - * Properties of a ContentSearchQuery. - * @typedef {Object} atomic.ContentSearchQuery.$Properties - * @property {string|null} [query] ContentSearchQuery query - * @property {Array.|null} [paths] ContentSearchQuery paths + * 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 ContentSearchQuery. + * Properties of a NeighborsQuery. * @memberof atomic - * @interface IContentSearchQuery - * @augments atomic.ContentSearchQuery.$Properties - * @deprecated Use atomic.ContentSearchQuery.$Properties instead. + * @interface INeighborsQuery + * @augments atomic.NeighborsQuery.$Properties + * @deprecated Use atomic.NeighborsQuery.$Properties instead. */ /** - * Shape of a ContentSearchQuery. - * @typedef {atomic.ContentSearchQuery.$Properties} atomic.ContentSearchQuery.$Shape + * Shape of a NeighborsQuery. + * @typedef {atomic.NeighborsQuery.$Properties} atomic.NeighborsQuery.$Shape */ /** - * Constructs a new ContentSearchQuery. + * Constructs a new NeighborsQuery. * @memberof atomic - * @classdesc Represents a ContentSearchQuery. + * @classdesc Represents a NeighborsQuery. * @constructor - * @param {atomic.ContentSearchQuery.$Properties=} [properties] Properties to set + * @param {atomic.NeighborsQuery.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var ContentSearchQuery = function (properties) { - this.paths = []; + 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__") @@ -31400,58 +44603,82 @@ $root.atomic = (function() { }; /** - * ContentSearchQuery query. - * @member {string} query - * @memberof atomic.ContentSearchQuery + * NeighborsQuery nodeId. + * @member {string} nodeId + * @memberof atomic.NeighborsQuery * @instance */ - ContentSearchQuery.prototype.query = ""; + NeighborsQuery.prototype.nodeId = ""; /** - * ContentSearchQuery paths. - * @member {Array.} paths - * @memberof atomic.ContentSearchQuery + * NeighborsQuery incoming. + * @member {boolean|null|undefined} incoming + * @memberof atomic.NeighborsQuery * @instance */ - ContentSearchQuery.prototype.paths = $util.emptyArray; + NeighborsQuery.prototype.incoming = null; /** - * Creates a new ContentSearchQuery instance using the specified properties. + * 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.ContentSearchQuery + * @memberof atomic.NeighborsQuery * @static - * @param {atomic.ContentSearchQuery.$Properties=} [properties] Properties to set - * @returns {atomic.ContentSearchQuery} ContentSearchQuery instance + * @param {atomic.NeighborsQuery.$Properties=} [properties] Properties to set + * @returns {atomic.NeighborsQuery} NeighborsQuery instance * @type {{ - * (properties: atomic.ContentSearchQuery.$Shape): atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape; - * (properties?: atomic.ContentSearchQuery.$Properties): atomic.ContentSearchQuery; + * (properties: atomic.NeighborsQuery.$Shape): atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape; + * (properties?: atomic.NeighborsQuery.$Properties): atomic.NeighborsQuery; * }} */ - ContentSearchQuery.create = function(properties) { - return new ContentSearchQuery(properties); + NeighborsQuery.create = function(properties) { + return new NeighborsQuery(properties); }; /** - * Encodes the specified ContentSearchQuery message. Does not implicitly {@link atomic.ContentSearchQuery.verify|verify} messages. + * Encodes the specified NeighborsQuery message. Does not implicitly {@link atomic.NeighborsQuery.verify|verify} messages. * @function encode - * @memberof atomic.ContentSearchQuery + * @memberof atomic.NeighborsQuery * @static - * @param {atomic.ContentSearchQuery.$Properties} message ContentSearchQuery message or plain object to encode + * @param {atomic.NeighborsQuery.$Properties} message NeighborsQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContentSearchQuery.encode = function (message, writer, _depth) { + 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.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.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]); @@ -31459,30 +44686,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified ContentSearchQuery message, length delimited. Does not implicitly {@link atomic.ContentSearchQuery.verify|verify} messages. + * Encodes the specified NeighborsQuery message, length delimited. Does not implicitly {@link atomic.NeighborsQuery.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.ContentSearchQuery + * @memberof atomic.NeighborsQuery * @static - * @param {atomic.ContentSearchQuery.$Properties} message ContentSearchQuery message or plain object to encode + * @param {atomic.NeighborsQuery.$Properties} message NeighborsQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContentSearchQuery.encodeDelimited = function(message, writer) { + NeighborsQuery.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a ContentSearchQuery message from the specified reader or buffer. + * Decodes a NeighborsQuery message from the specified reader or buffer. * @function decode - * @memberof atomic.ContentSearchQuery + * @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.ContentSearchQuery & atomic.ContentSearchQuery.$Shape} ContentSearchQuery + * @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 */ - ContentSearchQuery.decode = function (reader, length, _end, _depth, _target) { + NeighborsQuery.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -31499,7 +44726,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.ContentSearchQuery(); + message = _target || new $root.atomic.NeighborsQuery(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -31513,17 +44740,23 @@ $root.atomic = (function() { if (wireType !== 2) break; if ((value = reader.stringVerify()).length) - message.query = value; + message.nodeId = value; else - delete message.query; + delete message.nodeId; continue; } case 2: { - if (wireType !== 2) + if (wireType !== 0) break; - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.stringVerify()); + message.incoming = reader.bool(); + message._incoming = "incoming"; + continue; + } + case 3: { + if (wireType !== 0) + break; + message.depth = reader.uint32(); + message._depth = "depth"; continue; } } @@ -31544,90 +44777,91 @@ $root.atomic = (function() { }; /** - * Decodes a ContentSearchQuery message from the specified reader or buffer, length delimited. + * Decodes a NeighborsQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.ContentSearchQuery + * @memberof atomic.NeighborsQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.ContentSearchQuery & atomic.ContentSearchQuery.$Shape} ContentSearchQuery + * @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 */ - ContentSearchQuery.decodeDelimited = function(reader) { + NeighborsQuery.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a ContentSearchQuery message. + * Verifies a NeighborsQuery message. * @function verify - * @memberof atomic.ContentSearchQuery + * @memberof atomic.NeighborsQuery * @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) { + 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"; - 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"; + 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 ContentSearchQuery message from a plain object. Also converts values to their respective internal types. + * Creates a NeighborsQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.ContentSearchQuery + * @memberof atomic.NeighborsQuery * @static * @param {Object.} object Plain object - * @returns {atomic.ContentSearchQuery} ContentSearchQuery + * @returns {atomic.NeighborsQuery} NeighborsQuery */ - ContentSearchQuery.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.ContentSearchQuery) + NeighborsQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.NeighborsQuery) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.ContentSearchQuery: object expected"); + 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.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]); - } + 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 ContentSearchQuery message. Also converts values to other types if specified. + * Creates a plain object from a NeighborsQuery message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.ContentSearchQuery + * @memberof atomic.NeighborsQuery * @static - * @param {atomic.ContentSearchQuery} message ContentSearchQuery + * @param {atomic.NeighborsQuery} message NeighborsQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContentSearchQuery.toObject = function (message, options, _depth) { + NeighborsQuery.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -31635,81 +44869,76 @@ $root.atomic = (function() { 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]; - } + 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 ContentSearchQuery to JSON. + * Converts this NeighborsQuery to JSON. * @function toJSON - * @memberof atomic.ContentSearchQuery + * @memberof atomic.NeighborsQuery * @instance * @returns {Object.} JSON object */ - ContentSearchQuery.prototype.toJSON = function() { - return ContentSearchQuery.toObject(this, $protobuf.util.toJSONOptions); + NeighborsQuery.prototype.toJSON = function() { + return NeighborsQuery.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for ContentSearchQuery + * Gets the type url for NeighborsQuery * @function getTypeUrl - * @memberof atomic.ContentSearchQuery + * @memberof atomic.NeighborsQuery * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - ContentSearchQuery.getTypeUrl = function(prefix) { + NeighborsQuery.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.ContentSearchQuery"; + return prefix + "/atomic.NeighborsQuery"; }; - return ContentSearchQuery; + return NeighborsQuery; })(); - atomic.KgSearchQuery = (function() { + atomic.CallersQuery = (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 + * 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 KgSearchQuery. + * Properties of a CallersQuery. * @memberof atomic - * @interface IKgSearchQuery - * @augments atomic.KgSearchQuery.$Properties - * @deprecated Use atomic.KgSearchQuery.$Properties instead. + * @interface ICallersQuery + * @augments atomic.CallersQuery.$Properties + * @deprecated Use atomic.CallersQuery.$Properties instead. */ /** - * Shape of a KgSearchQuery. - * @typedef {atomic.KgSearchQuery.$Properties} atomic.KgSearchQuery.$Shape + * Shape of a CallersQuery. + * @typedef {atomic.CallersQuery.$Properties} atomic.CallersQuery.$Shape */ /** - * Constructs a new KgSearchQuery. + * Constructs a new CallersQuery. * @memberof atomic - * @classdesc Represents a KgSearchQuery. + * @classdesc Represents a CallersQuery. * @constructor - * @param {atomic.KgSearchQuery.$Properties=} [properties] Properties to set + * @param {atomic.CallersQuery.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var KgSearchQuery = function (properties) { + 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__") @@ -31717,82 +44946,47 @@ $root.atomic = (function() { }; /** - * 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 + * CallersQuery nodeId. + * @member {string} nodeId + * @memberof atomic.CallersQuery * @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) - }); + CallersQuery.prototype.nodeId = ""; /** - * Creates a new KgSearchQuery instance using the specified properties. + * Creates a new CallersQuery instance using the specified properties. * @function create - * @memberof atomic.KgSearchQuery + * @memberof atomic.CallersQuery * @static - * @param {atomic.KgSearchQuery.$Properties=} [properties] Properties to set - * @returns {atomic.KgSearchQuery} KgSearchQuery instance + * @param {atomic.CallersQuery.$Properties=} [properties] Properties to set + * @returns {atomic.CallersQuery} CallersQuery instance * @type {{ - * (properties: atomic.KgSearchQuery.$Shape): atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape; - * (properties?: atomic.KgSearchQuery.$Properties): atomic.KgSearchQuery; + * (properties: atomic.CallersQuery.$Shape): atomic.CallersQuery & atomic.CallersQuery.$Shape; + * (properties?: atomic.CallersQuery.$Properties): atomic.CallersQuery; * }} */ - KgSearchQuery.create = function(properties) { - return new KgSearchQuery(properties); + CallersQuery.create = function(properties) { + return new CallersQuery(properties); }; /** - * Encodes the specified KgSearchQuery message. Does not implicitly {@link atomic.KgSearchQuery.verify|verify} messages. + * Encodes the specified CallersQuery message. Does not implicitly {@link atomic.CallersQuery.verify|verify} messages. * @function encode - * @memberof atomic.KgSearchQuery + * @memberof atomic.CallersQuery * @static - * @param {atomic.KgSearchQuery.$Properties} message KgSearchQuery message or plain object to encode + * @param {atomic.CallersQuery.$Properties} message CallersQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KgSearchQuery.encode = function (message, writer, _depth) { + 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.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.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]); @@ -31800,30 +44994,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified KgSearchQuery message, length delimited. Does not implicitly {@link atomic.KgSearchQuery.verify|verify} messages. + * Encodes the specified CallersQuery message, length delimited. Does not implicitly {@link atomic.CallersQuery.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.KgSearchQuery + * @memberof atomic.CallersQuery * @static - * @param {atomic.KgSearchQuery.$Properties} message KgSearchQuery message or plain object to encode + * @param {atomic.CallersQuery.$Properties} message CallersQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KgSearchQuery.encodeDelimited = function(message, writer) { + CallersQuery.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a KgSearchQuery message from the specified reader or buffer. + * Decodes a CallersQuery message from the specified reader or buffer. * @function decode - * @memberof atomic.KgSearchQuery + * @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.KgSearchQuery & atomic.KgSearchQuery.$Shape} KgSearchQuery + * @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 */ - KgSearchQuery.decode = function (reader, length, _end, _depth, _target) { + CallersQuery.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -31840,7 +45034,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.KgSearchQuery(); + message = _target || new $root.atomic.CallersQuery(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -31854,23 +45048,9 @@ $root.atomic = (function() { if (wireType !== 2) break; if ((value = reader.stringVerify()).length) - message.query = value; + message.nodeId = 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"; + delete message.nodeId; continue; } } @@ -31891,91 +45071,76 @@ $root.atomic = (function() { }; /** - * Decodes a KgSearchQuery message from the specified reader or buffer, length delimited. + * Decodes a CallersQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.KgSearchQuery + * @memberof atomic.CallersQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.KgSearchQuery & atomic.KgSearchQuery.$Shape} KgSearchQuery + * @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 */ - KgSearchQuery.decodeDelimited = function(reader) { + CallersQuery.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a KgSearchQuery message. + * Verifies a CallersQuery message. * @function verify - * @memberof atomic.KgSearchQuery + * @memberof atomic.CallersQuery * @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) { + 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"; - 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"; - } + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + if (!$util.isString(message.nodeId)) + return "nodeId: string expected"; return null; }; /** - * Creates a KgSearchQuery message from a plain object. Also converts values to their respective internal types. + * Creates a CallersQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.KgSearchQuery + * @memberof atomic.CallersQuery * @static * @param {Object.} object Plain object - * @returns {atomic.KgSearchQuery} KgSearchQuery + * @returns {atomic.CallersQuery} CallersQuery */ - KgSearchQuery.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.KgSearchQuery) + CallersQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.CallersQuery) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.KgSearchQuery: object expected"); + 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.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; + 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 KgSearchQuery message. Also converts values to other types if specified. + * Creates a plain object from a CallersQuery message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.KgSearchQuery + * @memberof atomic.CallersQuery * @static - * @param {atomic.KgSearchQuery} message KgSearchQuery + * @param {atomic.CallersQuery} message CallersQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KgSearchQuery.toObject = function (message, options, _depth) { + CallersQuery.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -31984,75 +45149,79 @@ $root.atomic = (function() { 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; + object.nodeId = ""; + if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) + object.nodeId = message.nodeId; return object; }; /** - * Converts this KgSearchQuery to JSON. + * Converts this CallersQuery to JSON. * @function toJSON - * @memberof atomic.KgSearchQuery + * @memberof atomic.CallersQuery * @instance * @returns {Object.} JSON object */ - KgSearchQuery.prototype.toJSON = function() { - return KgSearchQuery.toObject(this, $protobuf.util.toJSONOptions); + CallersQuery.prototype.toJSON = function() { + return CallersQuery.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for KgSearchQuery + * Gets the type url for CallersQuery * @function getTypeUrl - * @memberof atomic.KgSearchQuery + * @memberof atomic.CallersQuery * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - KgSearchQuery.getTypeUrl = function(prefix) { + CallersQuery.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.KgSearchQuery"; + return prefix + "/atomic.CallersQuery"; }; - return KgSearchQuery; + return CallersQuery; })(); - atomic.EntityQuery = (function() { + atomic.GraphSliceQuery = (function() { /** - * Properties of an EntityQuery. - * @typedef {Object} atomic.EntityQuery.$Properties - * @property {string|null} [nodeId] EntityQuery nodeId + * 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 an EntityQuery. + * Properties of a GraphSliceQuery. * @memberof atomic - * @interface IEntityQuery - * @augments atomic.EntityQuery.$Properties - * @deprecated Use atomic.EntityQuery.$Properties instead. + * @interface IGraphSliceQuery + * @augments atomic.GraphSliceQuery.$Properties + * @deprecated Use atomic.GraphSliceQuery.$Properties instead. */ /** - * Shape of an EntityQuery. - * @typedef {atomic.EntityQuery.$Properties} atomic.EntityQuery.$Shape + * Shape of a GraphSliceQuery. + * @typedef {atomic.GraphSliceQuery.$Properties} atomic.GraphSliceQuery.$Shape */ /** - * Constructs a new EntityQuery. + * Constructs a new GraphSliceQuery. * @memberof atomic - * @classdesc Represents an EntityQuery. + * @classdesc Represents a GraphSliceQuery. * @constructor - * @param {atomic.EntityQuery.$Properties=} [properties] Properties to set + * @param {atomic.GraphSliceQuery.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var EntityQuery = function (properties) { + 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__") @@ -32060,47 +45229,163 @@ $root.atomic = (function() { }; /** - * EntityQuery nodeId. - * @member {string} nodeId - * @memberof atomic.EntityQuery + * GraphSliceQuery nodeIds. + * @member {Array.} nodeIds + * @memberof atomic.GraphSliceQuery * @instance */ - EntityQuery.prototype.nodeId = ""; + GraphSliceQuery.prototype.nodeIds = $util.emptyArray; /** - * Creates a new EntityQuery instance using the specified properties. + * 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.EntityQuery + * @memberof atomic.GraphSliceQuery * @static - * @param {atomic.EntityQuery.$Properties=} [properties] Properties to set - * @returns {atomic.EntityQuery} EntityQuery instance + * @param {atomic.GraphSliceQuery.$Properties=} [properties] Properties to set + * @returns {atomic.GraphSliceQuery} GraphSliceQuery instance * @type {{ - * (properties: atomic.EntityQuery.$Shape): atomic.EntityQuery & atomic.EntityQuery.$Shape; - * (properties?: atomic.EntityQuery.$Properties): atomic.EntityQuery; + * (properties: atomic.GraphSliceQuery.$Shape): atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape; + * (properties?: atomic.GraphSliceQuery.$Properties): atomic.GraphSliceQuery; * }} */ - EntityQuery.create = function(properties) { - return new EntityQuery(properties); + GraphSliceQuery.create = function(properties) { + return new GraphSliceQuery(properties); }; /** - * Encodes the specified EntityQuery message. Does not implicitly {@link atomic.EntityQuery.verify|verify} messages. + * Encodes the specified GraphSliceQuery message. Does not implicitly {@link atomic.GraphSliceQuery.verify|verify} messages. * @function encode - * @memberof atomic.EntityQuery + * @memberof atomic.GraphSliceQuery * @static - * @param {atomic.EntityQuery.$Properties} message EntityQuery message or plain object to encode + * @param {atomic.GraphSliceQuery.$Properties} message GraphSliceQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityQuery.encode = function (message, writer, _depth) { + 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.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId") && message.nodeId !== "") - writer.uint32(/* id 1, wireType 2 =*/10).string(message.nodeId); + 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]); @@ -32108,37 +45393,37 @@ $root.atomic = (function() { }; /** - * Encodes the specified EntityQuery message, length delimited. Does not implicitly {@link atomic.EntityQuery.verify|verify} messages. + * Encodes the specified GraphSliceQuery message, length delimited. Does not implicitly {@link atomic.GraphSliceQuery.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.EntityQuery + * @memberof atomic.GraphSliceQuery * @static - * @param {atomic.EntityQuery.$Properties} message EntityQuery message or plain object to encode + * @param {atomic.GraphSliceQuery.$Properties} message GraphSliceQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityQuery.encodeDelimited = function(message, writer) { + GraphSliceQuery.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes an EntityQuery message from the specified reader or buffer. + * Decodes a GraphSliceQuery message from the specified reader or buffer. * @function decode - * @memberof atomic.EntityQuery + * @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.EntityQuery & atomic.EntityQuery.$Shape} EntityQuery + * @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 */ - EntityQuery.decode = function (reader, length, _end, _depth, _target) { + 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, value; + var end, message; if (length === $undefined) end = reader.len; else { @@ -32148,7 +45433,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.EntityQuery(); + message = _target || new $root.atomic.GraphSliceQuery(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -32161,10 +45446,58 @@ $root.atomic = (function() { case 1: { if (wireType !== 2) break; - if ((value = reader.stringVerify()).length) - message.nodeId = value; - else - delete message.nodeId; + 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; } } @@ -32185,76 +45518,134 @@ $root.atomic = (function() { }; /** - * Decodes an EntityQuery message from the specified reader or buffer, length delimited. + * Decodes a GraphSliceQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.EntityQuery + * @memberof atomic.GraphSliceQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.EntityQuery & atomic.EntityQuery.$Shape} EntityQuery + * @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 */ - EntityQuery.decodeDelimited = function(reader) { + GraphSliceQuery.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies an EntityQuery message. + * Verifies a GraphSliceQuery message. * @function verify - * @memberof atomic.EntityQuery + * @memberof atomic.GraphSliceQuery * @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) { + 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"; - if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) - if (!$util.isString(message.nodeId)) - return "nodeId: string expected"; + 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 an EntityQuery message from a plain object. Also converts values to their respective internal types. + * Creates a GraphSliceQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.EntityQuery + * @memberof atomic.GraphSliceQuery * @static * @param {Object.} object Plain object - * @returns {atomic.EntityQuery} EntityQuery + * @returns {atomic.GraphSliceQuery} GraphSliceQuery */ - EntityQuery.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.EntityQuery) + GraphSliceQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.GraphSliceQuery) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.EntityQuery: object expected"); + 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.EntityQuery(); - if (object.nodeId != null) - if (typeof object.nodeId !== "string" || object.nodeId.length) - message.nodeId = $String(object.nodeId); + 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 an EntityQuery message. Also converts values to other types if specified. + * Creates a plain object from a GraphSliceQuery message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.EntityQuery + * @memberof atomic.GraphSliceQuery * @static - * @param {atomic.EntityQuery} message EntityQuery + * @param {atomic.GraphSliceQuery} message GraphSliceQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntityQuery.toObject = function (message, options, _depth) { + GraphSliceQuery.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -32262,74 +45653,89 @@ $root.atomic = (function() { 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 (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 EntityQuery to JSON. + * Converts this GraphSliceQuery to JSON. * @function toJSON - * @memberof atomic.EntityQuery + * @memberof atomic.GraphSliceQuery * @instance * @returns {Object.} JSON object */ - EntityQuery.prototype.toJSON = function() { - return EntityQuery.toObject(this, $protobuf.util.toJSONOptions); + GraphSliceQuery.prototype.toJSON = function() { + return GraphSliceQuery.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for EntityQuery + * Gets the type url for GraphSliceQuery * @function getTypeUrl - * @memberof atomic.EntityQuery + * @memberof atomic.GraphSliceQuery * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - EntityQuery.getTypeUrl = function(prefix) { + GraphSliceQuery.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.EntityQuery"; + return prefix + "/atomic.GraphSliceQuery"; }; - return EntityQuery; + return GraphSliceQuery; })(); - atomic.NeighborsQuery = (function() { + atomic.PlanExecutionQuery = (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 + * 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 NeighborsQuery. + * Properties of a PlanExecutionQuery. * @memberof atomic - * @interface INeighborsQuery - * @augments atomic.NeighborsQuery.$Properties - * @deprecated Use atomic.NeighborsQuery.$Properties instead. + * @interface IPlanExecutionQuery + * @augments atomic.PlanExecutionQuery.$Properties + * @deprecated Use atomic.PlanExecutionQuery.$Properties instead. */ /** - * Shape of a NeighborsQuery. - * @typedef {atomic.NeighborsQuery.$Properties} atomic.NeighborsQuery.$Shape + * Shape of a PlanExecutionQuery. + * @typedef {atomic.PlanExecutionQuery.$Properties} atomic.PlanExecutionQuery.$Shape */ /** - * Constructs a new NeighborsQuery. + * Constructs a new PlanExecutionQuery. * @memberof atomic - * @classdesc Represents a NeighborsQuery. + * @classdesc Represents a PlanExecutionQuery. * @constructor - * @param {atomic.NeighborsQuery.$Properties=} [properties] Properties to set + * @param {atomic.PlanExecutionQuery.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var NeighborsQuery = function (properties) { + 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__") @@ -32337,82 +45743,47 @@ $root.atomic = (function() { }; /** - * 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 + * PlanExecutionQuery planJson. + * @member {Uint8Array} planJson + * @memberof atomic.PlanExecutionQuery * @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) - }); + PlanExecutionQuery.prototype.planJson = $util.newBuffer([]); /** - * Creates a new NeighborsQuery instance using the specified properties. + * Creates a new PlanExecutionQuery instance using the specified properties. * @function create - * @memberof atomic.NeighborsQuery + * @memberof atomic.PlanExecutionQuery * @static - * @param {atomic.NeighborsQuery.$Properties=} [properties] Properties to set - * @returns {atomic.NeighborsQuery} NeighborsQuery instance + * @param {atomic.PlanExecutionQuery.$Properties=} [properties] Properties to set + * @returns {atomic.PlanExecutionQuery} PlanExecutionQuery instance * @type {{ - * (properties: atomic.NeighborsQuery.$Shape): atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape; - * (properties?: atomic.NeighborsQuery.$Properties): atomic.NeighborsQuery; + * (properties: atomic.PlanExecutionQuery.$Shape): atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape; + * (properties?: atomic.PlanExecutionQuery.$Properties): atomic.PlanExecutionQuery; * }} */ - NeighborsQuery.create = function(properties) { - return new NeighborsQuery(properties); + PlanExecutionQuery.create = function(properties) { + return new PlanExecutionQuery(properties); }; /** - * Encodes the specified NeighborsQuery message. Does not implicitly {@link atomic.NeighborsQuery.verify|verify} messages. + * Encodes the specified PlanExecutionQuery message. Does not implicitly {@link atomic.PlanExecutionQuery.verify|verify} messages. * @function encode - * @memberof atomic.NeighborsQuery + * @memberof atomic.PlanExecutionQuery * @static - * @param {atomic.NeighborsQuery.$Properties} message NeighborsQuery message or plain object to encode + * @param {atomic.PlanExecutionQuery.$Properties} message PlanExecutionQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NeighborsQuery.encode = function (message, writer, _depth) { + 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.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.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]); @@ -32420,30 +45791,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified NeighborsQuery message, length delimited. Does not implicitly {@link atomic.NeighborsQuery.verify|verify} messages. + * Encodes the specified PlanExecutionQuery message, length delimited. Does not implicitly {@link atomic.PlanExecutionQuery.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.NeighborsQuery + * @memberof atomic.PlanExecutionQuery * @static - * @param {atomic.NeighborsQuery.$Properties} message NeighborsQuery message or plain object to encode + * @param {atomic.PlanExecutionQuery.$Properties} message PlanExecutionQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NeighborsQuery.encodeDelimited = function(message, writer) { + PlanExecutionQuery.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a NeighborsQuery message from the specified reader or buffer. + * Decodes a PlanExecutionQuery message from the specified reader or buffer. * @function decode - * @memberof atomic.NeighborsQuery + * @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.NeighborsQuery & atomic.NeighborsQuery.$Shape} NeighborsQuery + * @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 */ - NeighborsQuery.decode = function (reader, length, _end, _depth, _target) { + PlanExecutionQuery.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -32460,7 +45831,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.NeighborsQuery(); + message = _target || new $root.atomic.PlanExecutionQuery(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -32473,24 +45844,10 @@ $root.atomic = (function() { case 1: { if (wireType !== 2) break; - if ((value = reader.stringVerify()).length) - message.nodeId = value; + if ((value = reader.bytes()).length) + message.planJson = 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"; + delete message.planJson; continue; } } @@ -32511,91 +45868,79 @@ $root.atomic = (function() { }; /** - * Decodes a NeighborsQuery message from the specified reader or buffer, length delimited. + * Decodes a PlanExecutionQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.NeighborsQuery + * @memberof atomic.PlanExecutionQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.NeighborsQuery & atomic.NeighborsQuery.$Shape} NeighborsQuery + * @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 */ - NeighborsQuery.decodeDelimited = function(reader) { + PlanExecutionQuery.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a NeighborsQuery message. + * Verifies a PlanExecutionQuery message. * @function verify - * @memberof atomic.NeighborsQuery + * @memberof atomic.PlanExecutionQuery * @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) { + 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"; - 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"; - } + 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 NeighborsQuery message from a plain object. Also converts values to their respective internal types. + * Creates a PlanExecutionQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.NeighborsQuery + * @memberof atomic.PlanExecutionQuery * @static * @param {Object.} object Plain object - * @returns {atomic.NeighborsQuery} NeighborsQuery + * @returns {atomic.PlanExecutionQuery} PlanExecutionQuery */ - NeighborsQuery.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.NeighborsQuery) + PlanExecutionQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.PlanExecutionQuery) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.NeighborsQuery: object expected"); + 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.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; + 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 NeighborsQuery message. Also converts values to other types if specified. + * Creates a plain object from a PlanExecutionQuery message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.NeighborsQuery + * @memberof atomic.PlanExecutionQuery * @static - * @param {atomic.NeighborsQuery} message NeighborsQuery + * @param {atomic.PlanExecutionQuery} message PlanExecutionQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NeighborsQuery.toObject = function (message, options, _depth) { + PlanExecutionQuery.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -32604,75 +45949,80 @@ $root.atomic = (function() { 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; + 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 NeighborsQuery to JSON. + * Converts this PlanExecutionQuery to JSON. * @function toJSON - * @memberof atomic.NeighborsQuery + * @memberof atomic.PlanExecutionQuery * @instance * @returns {Object.} JSON object */ - NeighborsQuery.prototype.toJSON = function() { - return NeighborsQuery.toObject(this, $protobuf.util.toJSONOptions); + PlanExecutionQuery.prototype.toJSON = function() { + return PlanExecutionQuery.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for NeighborsQuery + * Gets the type url for PlanExecutionQuery * @function getTypeUrl - * @memberof atomic.NeighborsQuery + * @memberof atomic.PlanExecutionQuery * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - NeighborsQuery.getTypeUrl = function(prefix) { + PlanExecutionQuery.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.NeighborsQuery"; + return prefix + "/atomic.PlanExecutionQuery"; }; - return NeighborsQuery; + return PlanExecutionQuery; })(); - atomic.CallersQuery = (function() { + atomic.RagAskQuery = (function() { /** - * Properties of a CallersQuery. - * @typedef {Object} atomic.CallersQuery.$Properties - * @property {string|null} [nodeId] CallersQuery nodeId + * 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 CallersQuery. + * Properties of a RagAskQuery. * @memberof atomic - * @interface ICallersQuery - * @augments atomic.CallersQuery.$Properties - * @deprecated Use atomic.CallersQuery.$Properties instead. + * @interface IRagAskQuery + * @augments atomic.RagAskQuery.$Properties + * @deprecated Use atomic.RagAskQuery.$Properties instead. */ /** - * Shape of a CallersQuery. - * @typedef {atomic.CallersQuery.$Properties} atomic.CallersQuery.$Shape + * Shape of a RagAskQuery. + * @typedef {atomic.RagAskQuery.$Properties} atomic.RagAskQuery.$Shape */ /** - * Constructs a new CallersQuery. + * Constructs a new RagAskQuery. * @memberof atomic - * @classdesc Represents a CallersQuery. + * @classdesc Represents a RagAskQuery. * @constructor - * @param {atomic.CallersQuery.$Properties=} [properties] Properties to set + * @param {atomic.RagAskQuery.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var CallersQuery = function (properties) { + 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__") @@ -32680,47 +46030,92 @@ $root.atomic = (function() { }; /** - * CallersQuery nodeId. - * @member {string} nodeId - * @memberof atomic.CallersQuery + * RagAskQuery question. + * @member {string} question + * @memberof atomic.RagAskQuery * @instance */ - CallersQuery.prototype.nodeId = ""; + RagAskQuery.prototype.question = ""; /** - * Creates a new CallersQuery instance using the specified properties. + * 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.CallersQuery + * @memberof atomic.RagAskQuery * @static - * @param {atomic.CallersQuery.$Properties=} [properties] Properties to set - * @returns {atomic.CallersQuery} CallersQuery instance + * @param {atomic.RagAskQuery.$Properties=} [properties] Properties to set + * @returns {atomic.RagAskQuery} RagAskQuery instance * @type {{ - * (properties: atomic.CallersQuery.$Shape): atomic.CallersQuery & atomic.CallersQuery.$Shape; - * (properties?: atomic.CallersQuery.$Properties): atomic.CallersQuery; + * (properties: atomic.RagAskQuery.$Shape): atomic.RagAskQuery & atomic.RagAskQuery.$Shape; + * (properties?: atomic.RagAskQuery.$Properties): atomic.RagAskQuery; * }} */ - CallersQuery.create = function(properties) { - return new CallersQuery(properties); + RagAskQuery.create = function(properties) { + return new RagAskQuery(properties); }; /** - * Encodes the specified CallersQuery message. Does not implicitly {@link atomic.CallersQuery.verify|verify} messages. + * Encodes the specified RagAskQuery message. Does not implicitly {@link atomic.RagAskQuery.verify|verify} messages. * @function encode - * @memberof atomic.CallersQuery + * @memberof atomic.RagAskQuery * @static - * @param {atomic.CallersQuery.$Properties} message CallersQuery message or plain object to encode + * @param {atomic.RagAskQuery.$Properties} message RagAskQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CallersQuery.encode = function (message, writer, _depth) { + 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.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId") && message.nodeId !== "") - writer.uint32(/* id 1, wireType 2 =*/10).string(message.nodeId); + 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]); @@ -32728,30 +46123,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified CallersQuery message, length delimited. Does not implicitly {@link atomic.CallersQuery.verify|verify} messages. + * Encodes the specified RagAskQuery message, length delimited. Does not implicitly {@link atomic.RagAskQuery.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.CallersQuery + * @memberof atomic.RagAskQuery * @static - * @param {atomic.CallersQuery.$Properties} message CallersQuery message or plain object to encode + * @param {atomic.RagAskQuery.$Properties} message RagAskQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CallersQuery.encodeDelimited = function(message, writer) { + RagAskQuery.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a CallersQuery message from the specified reader or buffer. + * Decodes a RagAskQuery message from the specified reader or buffer. * @function decode - * @memberof atomic.CallersQuery + * @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.CallersQuery & atomic.CallersQuery.$Shape} CallersQuery + * @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 */ - CallersQuery.decode = function (reader, length, _end, _depth, _target) { + RagAskQuery.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -32768,7 +46163,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.CallersQuery(); + message = _target || new $root.atomic.RagAskQuery(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -32782,9 +46177,32 @@ $root.atomic = (function() { if (wireType !== 2) break; if ((value = reader.stringVerify()).length) - message.nodeId = value; + message.question = value; else - delete message.nodeId; + 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; } } @@ -32805,76 +46223,97 @@ $root.atomic = (function() { }; /** - * Decodes a CallersQuery message from the specified reader or buffer, length delimited. + * Decodes a RagAskQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.CallersQuery + * @memberof atomic.RagAskQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.CallersQuery & atomic.CallersQuery.$Shape} CallersQuery + * @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 */ - CallersQuery.decodeDelimited = function(reader) { + RagAskQuery.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a CallersQuery message. + * Verifies a RagAskQuery message. * @function verify - * @memberof atomic.CallersQuery + * @memberof atomic.RagAskQuery * @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) { + 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"; - if (message.nodeId != null && $Object.hasOwnProperty.call(message, "nodeId")) - if (!$util.isString(message.nodeId)) - return "nodeId: string expected"; + 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 CallersQuery message from a plain object. Also converts values to their respective internal types. + * Creates a RagAskQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.CallersQuery + * @memberof atomic.RagAskQuery * @static * @param {Object.} object Plain object - * @returns {atomic.CallersQuery} CallersQuery + * @returns {atomic.RagAskQuery} RagAskQuery */ - CallersQuery.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.CallersQuery) + RagAskQuery.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.RagAskQuery) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.CallersQuery: object expected"); + 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.CallersQuery(); - if (object.nodeId != null) - if (typeof object.nodeId !== "string" || object.nodeId.length) - message.nodeId = $String(object.nodeId); + 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 CallersQuery message. Also converts values to other types if specified. + * Creates a plain object from a RagAskQuery message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.CallersQuery + * @memberof atomic.RagAskQuery * @static - * @param {atomic.CallersQuery} message CallersQuery + * @param {atomic.RagAskQuery} message RagAskQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CallersQuery.toObject = function (message, options, _depth) { + RagAskQuery.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -32882,80 +46321,96 @@ $root.atomic = (function() { 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 (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 CallersQuery to JSON. + * Converts this RagAskQuery to JSON. * @function toJSON - * @memberof atomic.CallersQuery + * @memberof atomic.RagAskQuery * @instance * @returns {Object.} JSON object */ - CallersQuery.prototype.toJSON = function() { - return CallersQuery.toObject(this, $protobuf.util.toJSONOptions); + RagAskQuery.prototype.toJSON = function() { + return RagAskQuery.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for CallersQuery + * Gets the type url for RagAskQuery * @function getTypeUrl - * @memberof atomic.CallersQuery + * @memberof atomic.RagAskQuery * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - CallersQuery.getTypeUrl = function(prefix) { + RagAskQuery.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.CallersQuery"; + return prefix + "/atomic.RagAskQuery"; }; - return CallersQuery; + return RagAskQuery; })(); - atomic.GraphSliceQuery = (function() { + atomic.QueryGraphResponse = (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 + * 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 {atomic.ContentSearchResult.$Properties|null} [contentResult] QueryGraphResponse contentResult * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ /** - * Properties of a GraphSliceQuery. + * Properties of a QueryGraphResponse. * @memberof atomic - * @interface IGraphSliceQuery - * @augments atomic.GraphSliceQuery.$Properties - * @deprecated Use atomic.GraphSliceQuery.$Properties instead. + * @interface IQueryGraphResponse + * @augments atomic.QueryGraphResponse.$Properties + * @deprecated Use atomic.QueryGraphResponse.$Properties instead. */ /** - * Shape of a GraphSliceQuery. - * @typedef {atomic.GraphSliceQuery.$Properties} atomic.GraphSliceQuery.$Shape + * Shape of a QueryGraphResponse. + * @typedef {atomic.QueryGraphResponse.$Properties} atomic.QueryGraphResponse.$Shape */ /** - * Constructs a new GraphSliceQuery. + * Constructs a new QueryGraphResponse. * @memberof atomic - * @classdesc Represents a GraphSliceQuery. + * @classdesc Represents a QueryGraphResponse. * @constructor - * @param {atomic.GraphSliceQuery.$Properties=} [properties] Properties to set + * @param {atomic.QueryGraphResponse.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var GraphSliceQuery = function (properties) { - this.nodeIds = []; + 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__") @@ -32963,163 +46418,204 @@ $root.atomic = (function() { }; /** - * GraphSliceQuery nodeIds. - * @member {Array.} nodeIds - * @memberof atomic.GraphSliceQuery + * QueryGraphResponse nodes. + * @member {Array.} nodes + * @memberof atomic.QueryGraphResponse * @instance */ - GraphSliceQuery.prototype.nodeIds = $util.emptyArray; + QueryGraphResponse.prototype.nodes = $util.emptyArray; /** - * GraphSliceQuery maxDepth. - * @member {number|null|undefined} maxDepth - * @memberof atomic.GraphSliceQuery + * QueryGraphResponse edges. + * @member {Array.} edges + * @memberof atomic.QueryGraphResponse * @instance */ - GraphSliceQuery.prototype.maxDepth = null; + QueryGraphResponse.prototype.edges = $util.emptyArray; /** - * GraphSliceQuery query. - * @member {string|null|undefined} query - * @memberof atomic.GraphSliceQuery + * QueryGraphResponse hits. + * @member {Array.} hits + * @memberof atomic.QueryGraphResponse * @instance */ - GraphSliceQuery.prototype.query = null; + QueryGraphResponse.prototype.hits = $util.emptyArray; /** - * GraphSliceQuery seedLimit. - * @member {number|null|undefined} seedLimit - * @memberof atomic.GraphSliceQuery + * QueryGraphResponse answer. + * @member {string|null|undefined} answer + * @memberof atomic.QueryGraphResponse * @instance */ - GraphSliceQuery.prototype.seedLimit = null; + QueryGraphResponse.prototype.answer = null; /** - * GraphSliceQuery depth. - * @member {number|null|undefined} depth - * @memberof atomic.GraphSliceQuery + * QueryGraphResponse planResult. + * @member {Uint8Array|null|undefined} planResult + * @memberof atomic.QueryGraphResponse * @instance */ - GraphSliceQuery.prototype.depth = null; + QueryGraphResponse.prototype.planResult = null; /** - * GraphSliceQuery kinds. - * @member {string|null|undefined} kinds - * @memberof atomic.GraphSliceQuery + * QueryGraphResponse snapshot. + * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot + * @memberof atomic.QueryGraphResponse * @instance */ - GraphSliceQuery.prototype.kinds = null; + QueryGraphResponse.prototype.snapshot = null; /** - * GraphSliceQuery changesPerSeed. - * @member {number|null|undefined} changesPerSeed - * @memberof atomic.GraphSliceQuery + * QueryGraphResponse graphCollected. + * @member {number|null|undefined} graphCollected + * @memberof atomic.QueryGraphResponse * @instance */ - GraphSliceQuery.prototype.changesPerSeed = null; + QueryGraphResponse.prototype.graphCollected = null; /** - * GraphSliceQuery maxNodes. - * @member {number|null|undefined} maxNodes - * @memberof atomic.GraphSliceQuery + * QueryGraphResponse callsPresent. + * @member {boolean} callsPresent + * @memberof atomic.QueryGraphResponse * @instance */ - GraphSliceQuery.prototype.maxNodes = null; + QueryGraphResponse.prototype.callsPresent = false; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * QueryGraphResponse askResult. + * @member {atomic.VersionedBytes.$Properties|null|undefined} askResult + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.askResult = null; - // Virtual OneOf for proto3 optional field - $Object.defineProperty(GraphSliceQuery.prototype, "_max_depth", { - get: $util.oneOfGetter($oneOfFields = ["maxDepth"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * QueryGraphResponse askElapsedMs. + * @member {number|Long|null|undefined} askElapsedMs + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.askElapsedMs = null; - // Virtual OneOf for proto3 optional field - $Object.defineProperty(GraphSliceQuery.prototype, "_query", { - get: $util.oneOfGetter($oneOfFields = ["query"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * 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; + + /** + * QueryGraphResponse contentResult. + * @member {atomic.ContentSearchResult.$Properties|null|undefined} contentResult + * @memberof atomic.QueryGraphResponse + * @instance + */ + QueryGraphResponse.prototype.contentResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; // Virtual OneOf for proto3 optional field - $Object.defineProperty(GraphSliceQuery.prototype, "_seed_limit", { - get: $util.oneOfGetter($oneOfFields = ["seedLimit"]), + $Object.defineProperty(QueryGraphResponse.prototype, "_answer", { + get: $util.oneOfGetter($oneOfFields = ["answer"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(GraphSliceQuery.prototype, "_depth", { - get: $util.oneOfGetter($oneOfFields = ["depth"]), + $Object.defineProperty(QueryGraphResponse.prototype, "_plan_result", { + get: $util.oneOfGetter($oneOfFields = ["planResult"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(GraphSliceQuery.prototype, "_kinds", { - get: $util.oneOfGetter($oneOfFields = ["kinds"]), + $Object.defineProperty(QueryGraphResponse.prototype, "_graph_collected", { + get: $util.oneOfGetter($oneOfFields = ["graphCollected"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(GraphSliceQuery.prototype, "_changes_per_seed", { - get: $util.oneOfGetter($oneOfFields = ["changesPerSeed"]), + $Object.defineProperty(QueryGraphResponse.prototype, "_ask_result", { + get: $util.oneOfGetter($oneOfFields = ["askResult"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(GraphSliceQuery.prototype, "_max_nodes", { - get: $util.oneOfGetter($oneOfFields = ["maxNodes"]), + $Object.defineProperty(QueryGraphResponse.prototype, "_ask_elapsed_ms", { + get: $util.oneOfGetter($oneOfFields = ["askElapsedMs"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new GraphSliceQuery instance using the specified properties. + * Creates a new QueryGraphResponse instance using the specified properties. * @function create - * @memberof atomic.GraphSliceQuery + * @memberof atomic.QueryGraphResponse * @static - * @param {atomic.GraphSliceQuery.$Properties=} [properties] Properties to set - * @returns {atomic.GraphSliceQuery} GraphSliceQuery instance + * @param {atomic.QueryGraphResponse.$Properties=} [properties] Properties to set + * @returns {atomic.QueryGraphResponse} QueryGraphResponse instance * @type {{ - * (properties: atomic.GraphSliceQuery.$Shape): atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape; - * (properties?: atomic.GraphSliceQuery.$Properties): atomic.GraphSliceQuery; + * (properties: atomic.QueryGraphResponse.$Shape): atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape; + * (properties?: atomic.QueryGraphResponse.$Properties): atomic.QueryGraphResponse; * }} */ - GraphSliceQuery.create = function(properties) { - return new GraphSliceQuery(properties); + QueryGraphResponse.create = function(properties) { + return new QueryGraphResponse(properties); }; /** - * Encodes the specified GraphSliceQuery message. Does not implicitly {@link atomic.GraphSliceQuery.verify|verify} messages. + * Encodes the specified QueryGraphResponse message. Does not implicitly {@link atomic.QueryGraphResponse.verify|verify} messages. * @function encode - * @memberof atomic.GraphSliceQuery + * @memberof atomic.QueryGraphResponse * @static - * @param {atomic.GraphSliceQuery.$Properties} message GraphSliceQuery message or plain object to encode + * @param {atomic.QueryGraphResponse.$Properties} message QueryGraphResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GraphSliceQuery.encode = function (message, writer, _depth) { + 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.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.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.contentResult != null && $Object.hasOwnProperty.call(message, "contentResult")) + $root.atomic.ContentSearchResult.encode(message.contentResult, 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]); @@ -33127,37 +46623,37 @@ $root.atomic = (function() { }; /** - * Encodes the specified GraphSliceQuery message, length delimited. Does not implicitly {@link atomic.GraphSliceQuery.verify|verify} messages. + * Encodes the specified QueryGraphResponse message, length delimited. Does not implicitly {@link atomic.QueryGraphResponse.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.GraphSliceQuery + * @memberof atomic.QueryGraphResponse * @static - * @param {atomic.GraphSliceQuery.$Properties} message GraphSliceQuery message or plain object to encode + * @param {atomic.QueryGraphResponse.$Properties} message QueryGraphResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GraphSliceQuery.encodeDelimited = function(message, writer) { + QueryGraphResponse.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a GraphSliceQuery message from the specified reader or buffer. + * Decodes a QueryGraphResponse message from the specified reader or buffer. * @function decode - * @memberof atomic.GraphSliceQuery + * @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.GraphSliceQuery & atomic.GraphSliceQuery.$Shape} GraphSliceQuery + * @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 */ - GraphSliceQuery.decode = function (reader, length, _end, _depth, _target) { + 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; + var end, message, value; if (length === $undefined) end = reader.len; else { @@ -33167,7 +46663,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.GraphSliceQuery(); + message = _target || new $root.atomic.QueryGraphResponse(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -33180,58 +46676,98 @@ $root.atomic = (function() { case 1: { if (wireType !== 2) break; - if (!(message.nodeIds && message.nodeIds.length)) - message.nodeIds = []; - message.nodeIds.push(reader.stringVerify()); + 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 !== 0) + if (wireType !== 2) break; - message.maxDepth = reader.int32(); - message._max_depth = "maxDepth"; + 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; - message.query = reader.stringVerify(); - message._query = "query"; + 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 !== 0) + if (wireType !== 2) break; - message.seedLimit = reader.uint32(); - message._seed_limit = "seedLimit"; + message.answer = reader.stringVerify(); + message._answer = "answer"; continue; } case 5: { - if (wireType !== 0) + if (wireType !== 2) break; - message.depth = reader.uint32(); - message._depth = "depth"; + message.planResult = reader.bytes(); + message._plan_result = "planResult"; continue; } case 6: { if (wireType !== 2) break; - message.kinds = reader.stringVerify(); - message._kinds = "kinds"; + message.snapshot = $root.atomic.ViewSnapshot.decode(reader, reader.size(), $undefined, _depth + 1, message.snapshot); continue; } case 7: { if (wireType !== 0) break; - message.changesPerSeed = reader.uint32(); - message._changes_per_seed = "changesPerSeed"; + message.graphCollected = reader.uint32(); + message._graph_collected = "graphCollected"; continue; } case 8: { if (wireType !== 0) break; - message.maxNodes = reader.uint32(); - message._max_nodes = "maxNodes"; + 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; + } + case 13: { + if (wireType !== 2) + break; + message.contentResult = $root.atomic.ContentSearchResult.decode(reader, reader.size(), $undefined, _depth + 1, message.contentResult); continue; } } @@ -33252,30 +46788,30 @@ $root.atomic = (function() { }; /** - * Decodes a GraphSliceQuery message from the specified reader or buffer, length delimited. + * Decodes a QueryGraphResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.GraphSliceQuery + * @memberof atomic.QueryGraphResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.GraphSliceQuery & atomic.GraphSliceQuery.$Shape} GraphSliceQuery + * @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 */ - GraphSliceQuery.decodeDelimited = function(reader) { + QueryGraphResponse.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a GraphSliceQuery message. + * Verifies a QueryGraphResponse message. * @function verify - * @memberof atomic.GraphSliceQuery + * @memberof atomic.QueryGraphResponse * @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) { + QueryGraphResponse.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -33283,103 +46819,199 @@ $root.atomic = (function() { 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.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.maxDepth != null && $Object.hasOwnProperty.call(message, "maxDepth")) { - properties._max_depth = 1; - if (!$util.isInteger(message.maxDepth)) - return "maxDepth: integer expected"; + 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.query != null && $Object.hasOwnProperty.call(message, "query")) { - properties._query = 1; - if (!$util.isString(message.query)) - return "query: string expected"; + 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.seedLimit != null && $Object.hasOwnProperty.call(message, "seedLimit")) { - properties._seed_limit = 1; - if (!$util.isInteger(message.seedLimit)) - return "seedLimit: integer expected"; + if (message.answer != null && $Object.hasOwnProperty.call(message, "answer")) { + properties._answer = 1; + if (!$util.isString(message.answer)) + return "answer: string expected"; } - if (message.depth != null && $Object.hasOwnProperty.call(message, "depth")) { - properties._depth = 1; - if (!$util.isInteger(message.depth)) - return "depth: integer 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.kinds != null && $Object.hasOwnProperty.call(message, "kinds")) { - properties._kinds = 1; - if (!$util.isString(message.kinds)) - return "kinds: string 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.changesPerSeed != null && $Object.hasOwnProperty.call(message, "changesPerSeed")) { - properties._changes_per_seed = 1; - if (!$util.isInteger(message.changesPerSeed)) - return "changesPerSeed: integer expected"; + if (message.graphCollected != null && $Object.hasOwnProperty.call(message, "graphCollected")) { + properties._graph_collected = 1; + if (!$util.isInteger(message.graphCollected)) + return "graphCollected: integer expected"; } - if (message.maxNodes != null && $Object.hasOwnProperty.call(message, "maxNodes")) { - properties._max_nodes = 1; - if (!$util.isInteger(message.maxNodes)) - return "maxNodes: 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; + } + } + if (message.contentResult != null && $Object.hasOwnProperty.call(message, "contentResult")) { + var error = $root.atomic.ContentSearchResult.verify(message.contentResult, _depth + 1); + if (error) + return "contentResult." + error; } return null; }; /** - * Creates a GraphSliceQuery message from a plain object. Also converts values to their respective internal types. + * Creates a QueryGraphResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.GraphSliceQuery + * @memberof atomic.QueryGraphResponse * @static * @param {Object.} object Plain object - * @returns {atomic.GraphSliceQuery} GraphSliceQuery + * @returns {atomic.QueryGraphResponse} QueryGraphResponse */ - GraphSliceQuery.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.GraphSliceQuery) + QueryGraphResponse.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.QueryGraphResponse) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.GraphSliceQuery: object expected"); + 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.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]); + 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); + } + } + if (object.contentResult != null) { + if (!$util.isObject(object.contentResult)) + throw $TypeError(".atomic.QueryGraphResponse.contentResult: object expected"); + message.contentResult = $root.atomic.ContentSearchResult.fromObject(object.contentResult, _depth + 1); } - 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. + * Creates a plain object from a QueryGraphResponse message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.GraphSliceQuery + * @memberof atomic.QueryGraphResponse * @static - * @param {atomic.GraphSliceQuery} message GraphSliceQuery + * @param {atomic.QueryGraphResponse} message QueryGraphResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GraphSliceQuery.toObject = function (message, options, _depth) { + QueryGraphResponse.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -33387,89 +47019,130 @@ $root.atomic = (function() { 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 (options.arrays || options.defaults) { + object.nodes = []; + object.edges = []; + object.hits = []; + object.callers = []; } - 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; + if (options.defaults) { + object.snapshot = null; + object.callsPresent = false; + object.apiVersion = 0; + object.contentResult = null; + } + 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); + } + if (message.contentResult != null && $Object.hasOwnProperty.call(message, "contentResult")) + object.contentResult = $root.atomic.ContentSearchResult.toObject(message.contentResult, options, _depth + 1); return object; }; /** - * Converts this GraphSliceQuery to JSON. + * Converts this QueryGraphResponse to JSON. * @function toJSON - * @memberof atomic.GraphSliceQuery + * @memberof atomic.QueryGraphResponse * @instance * @returns {Object.} JSON object */ - GraphSliceQuery.prototype.toJSON = function() { - return GraphSliceQuery.toObject(this, $protobuf.util.toJSONOptions); + QueryGraphResponse.prototype.toJSON = function() { + return QueryGraphResponse.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for GraphSliceQuery + * Gets the type url for QueryGraphResponse * @function getTypeUrl - * @memberof atomic.GraphSliceQuery + * @memberof atomic.QueryGraphResponse * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - GraphSliceQuery.getTypeUrl = function(prefix) { + QueryGraphResponse.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.GraphSliceQuery"; + return prefix + "/atomic.QueryGraphResponse"; }; - return GraphSliceQuery; + return QueryGraphResponse; })(); - atomic.PlanExecutionQuery = (function() { + atomic.KGNode = (function() { /** - * Properties of a PlanExecutionQuery. - * @typedef {Object} atomic.PlanExecutionQuery.$Properties - * @property {Uint8Array|null} [planJson] PlanExecutionQuery planJson + * 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 PlanExecutionQuery. + * Properties of a KGNode. * @memberof atomic - * @interface IPlanExecutionQuery - * @augments atomic.PlanExecutionQuery.$Properties - * @deprecated Use atomic.PlanExecutionQuery.$Properties instead. + * @interface IKGNode + * @augments atomic.KGNode.$Properties + * @deprecated Use atomic.KGNode.$Properties instead. */ /** - * Shape of a PlanExecutionQuery. - * @typedef {atomic.PlanExecutionQuery.$Properties} atomic.PlanExecutionQuery.$Shape + * Shape of a KGNode. + * @typedef {atomic.KGNode.$Properties} atomic.KGNode.$Shape */ /** - * Constructs a new PlanExecutionQuery. + * Constructs a new KGNode. * @memberof atomic - * @classdesc Represents a PlanExecutionQuery. + * @classdesc Represents a KGNode. * @constructor - * @param {atomic.PlanExecutionQuery.$Properties=} [properties] Properties to set + * @param {atomic.KGNode.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var PlanExecutionQuery = function (properties) { + 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__") @@ -33477,47 +47150,141 @@ $root.atomic = (function() { }; /** - * PlanExecutionQuery planJson. - * @member {Uint8Array} planJson - * @memberof atomic.PlanExecutionQuery + * KGNode id. + * @member {string} id + * @memberof atomic.KGNode * @instance */ - PlanExecutionQuery.prototype.planJson = $util.newBuffer([]); + KGNode.prototype.id = ""; /** - * Creates a new PlanExecutionQuery instance using the specified properties. + * 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.PlanExecutionQuery + * @memberof atomic.KGNode * @static - * @param {atomic.PlanExecutionQuery.$Properties=} [properties] Properties to set - * @returns {atomic.PlanExecutionQuery} PlanExecutionQuery instance + * @param {atomic.KGNode.$Properties=} [properties] Properties to set + * @returns {atomic.KGNode} KGNode instance * @type {{ - * (properties: atomic.PlanExecutionQuery.$Shape): atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape; - * (properties?: atomic.PlanExecutionQuery.$Properties): atomic.PlanExecutionQuery; + * (properties: atomic.KGNode.$Shape): atomic.KGNode & atomic.KGNode.$Shape; + * (properties?: atomic.KGNode.$Properties): atomic.KGNode; * }} */ - PlanExecutionQuery.create = function(properties) { - return new PlanExecutionQuery(properties); + KGNode.create = function(properties) { + return new KGNode(properties); }; /** - * Encodes the specified PlanExecutionQuery message. Does not implicitly {@link atomic.PlanExecutionQuery.verify|verify} messages. + * Encodes the specified KGNode message. Does not implicitly {@link atomic.KGNode.verify|verify} messages. * @function encode - * @memberof atomic.PlanExecutionQuery + * @memberof atomic.KGNode * @static - * @param {atomic.PlanExecutionQuery.$Properties} message PlanExecutionQuery message or plain object to encode + * @param {atomic.KGNode.$Properties} message KGNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlanExecutionQuery.encode = function (message, writer, _depth) { + 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.planJson != null && $Object.hasOwnProperty.call(message, "planJson") && message.planJson.length) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.planJson); + 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]); @@ -33525,30 +47292,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified PlanExecutionQuery message, length delimited. Does not implicitly {@link atomic.PlanExecutionQuery.verify|verify} messages. + * Encodes the specified KGNode message, length delimited. Does not implicitly {@link atomic.KGNode.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.PlanExecutionQuery + * @memberof atomic.KGNode * @static - * @param {atomic.PlanExecutionQuery.$Properties} message PlanExecutionQuery message or plain object to encode + * @param {atomic.KGNode.$Properties} message KGNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlanExecutionQuery.encodeDelimited = function(message, writer) { + KGNode.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a PlanExecutionQuery message from the specified reader or buffer. + * Decodes a KGNode message from the specified reader or buffer. * @function decode - * @memberof atomic.PlanExecutionQuery + * @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.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape} PlanExecutionQuery + * @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 */ - PlanExecutionQuery.decode = function (reader, length, _end, _depth, _target) { + KGNode.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -33565,7 +47332,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.PlanExecutionQuery(); + message = _target || new $root.atomic.KGNode(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -33578,10 +47345,53 @@ $root.atomic = (function() { case 1: { if (wireType !== 2) break; - if ((value = reader.bytes()).length) - message.planJson = value; - else - delete message.planJson; + 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; } } @@ -33602,79 +47412,132 @@ $root.atomic = (function() { }; /** - * Decodes a PlanExecutionQuery message from the specified reader or buffer, length delimited. + * Decodes a KGNode message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.PlanExecutionQuery + * @memberof atomic.KGNode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.PlanExecutionQuery & atomic.PlanExecutionQuery.$Shape} PlanExecutionQuery + * @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 */ - PlanExecutionQuery.decodeDelimited = function(reader) { + KGNode.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a PlanExecutionQuery message. + * Verifies a KGNode message. * @function verify - * @memberof atomic.PlanExecutionQuery + * @memberof atomic.KGNode * @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) { + 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"; - 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"; + 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 PlanExecutionQuery message from a plain object. Also converts values to their respective internal types. + * Creates a KGNode message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.PlanExecutionQuery + * @memberof atomic.KGNode * @static * @param {Object.} object Plain object - * @returns {atomic.PlanExecutionQuery} PlanExecutionQuery + * @returns {atomic.KGNode} KGNode */ - PlanExecutionQuery.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.PlanExecutionQuery) + KGNode.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.KGNode) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.PlanExecutionQuery: object expected"); + 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.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; + 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 PlanExecutionQuery message. Also converts values to other types if specified. + * Creates a plain object from a KGNode message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.PlanExecutionQuery + * @memberof atomic.KGNode * @static - * @param {atomic.PlanExecutionQuery} message PlanExecutionQuery + * @param {atomic.KGNode} message KGNode * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlanExecutionQuery.toObject = function (message, options, _depth) { + KGNode.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -33682,81 +47545,92 @@ $root.atomic = (function() { if (_depth > $util.recursionLimit) throw $Error("max depth exceeded"); var object = {}; + if (options.arrays || options.defaults) + object.types = []; 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; + 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 PlanExecutionQuery to JSON. + * Converts this KGNode to JSON. * @function toJSON - * @memberof atomic.PlanExecutionQuery + * @memberof atomic.KGNode * @instance * @returns {Object.} JSON object */ - PlanExecutionQuery.prototype.toJSON = function() { - return PlanExecutionQuery.toObject(this, $protobuf.util.toJSONOptions); + KGNode.prototype.toJSON = function() { + return KGNode.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for PlanExecutionQuery + * Gets the type url for KGNode * @function getTypeUrl - * @memberof atomic.PlanExecutionQuery + * @memberof atomic.KGNode * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - PlanExecutionQuery.getTypeUrl = function(prefix) { + KGNode.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.PlanExecutionQuery"; + return prefix + "/atomic.KGNode"; }; - return PlanExecutionQuery; + return KGNode; })(); - atomic.RagAskQuery = (function() { + atomic.KGEdge = (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 + * 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 RagAskQuery. + * Properties of a KGEdge. * @memberof atomic - * @interface IRagAskQuery - * @augments atomic.RagAskQuery.$Properties - * @deprecated Use atomic.RagAskQuery.$Properties instead. + * @interface IKGEdge + * @augments atomic.KGEdge.$Properties + * @deprecated Use atomic.KGEdge.$Properties instead. */ /** - * Shape of a RagAskQuery. - * @typedef {atomic.RagAskQuery.$Properties} atomic.RagAskQuery.$Shape + * Shape of a KGEdge. + * @typedef {atomic.KGEdge.$Properties} atomic.KGEdge.$Shape */ /** - * Constructs a new RagAskQuery. + * Constructs a new KGEdge. * @memberof atomic - * @classdesc Represents a RagAskQuery. + * @classdesc Represents a KGEdge. * @constructor - * @param {atomic.RagAskQuery.$Properties=} [properties] Properties to set + * @param {atomic.KGEdge.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var RagAskQuery = function (properties) { + 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__") @@ -33764,92 +47638,86 @@ $root.atomic = (function() { }; /** - * RagAskQuery question. - * @member {string} question - * @memberof atomic.RagAskQuery + * KGEdge source. + * @member {string} source + * @memberof atomic.KGEdge * @instance */ - RagAskQuery.prototype.question = ""; + KGEdge.prototype.source = ""; /** - * RagAskQuery topK. - * @member {number} topK - * @memberof atomic.RagAskQuery + * KGEdge target. + * @member {string} target + * @memberof atomic.KGEdge * @instance */ - RagAskQuery.prototype.topK = 0; + KGEdge.prototype.target = ""; /** - * RagAskQuery maxTurns. - * @member {number|null|undefined} maxTurns - * @memberof atomic.RagAskQuery + * KGEdge relation. + * @member {string} relation + * @memberof atomic.KGEdge * @instance */ - RagAskQuery.prototype.maxTurns = null; + KGEdge.prototype.relation = ""; /** - * RagAskQuery verbose. - * @member {boolean|null|undefined} verbose - * @memberof atomic.RagAskQuery + * KGEdge metadata. + * @member {Uint8Array|null|undefined} metadata + * @memberof atomic.KGEdge * @instance */ - RagAskQuery.prototype.verbose = null; + KGEdge.prototype.metadata = 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"]), + $Object.defineProperty(KGEdge.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new RagAskQuery instance using the specified properties. + * Creates a new KGEdge instance using the specified properties. * @function create - * @memberof atomic.RagAskQuery + * @memberof atomic.KGEdge * @static - * @param {atomic.RagAskQuery.$Properties=} [properties] Properties to set - * @returns {atomic.RagAskQuery} RagAskQuery instance + * @param {atomic.KGEdge.$Properties=} [properties] Properties to set + * @returns {atomic.KGEdge} KGEdge instance * @type {{ - * (properties: atomic.RagAskQuery.$Shape): atomic.RagAskQuery & atomic.RagAskQuery.$Shape; - * (properties?: atomic.RagAskQuery.$Properties): atomic.RagAskQuery; + * (properties: atomic.KGEdge.$Shape): atomic.KGEdge & atomic.KGEdge.$Shape; + * (properties?: atomic.KGEdge.$Properties): atomic.KGEdge; * }} */ - RagAskQuery.create = function(properties) { - return new RagAskQuery(properties); + KGEdge.create = function(properties) { + return new KGEdge(properties); }; /** - * Encodes the specified RagAskQuery message. Does not implicitly {@link atomic.RagAskQuery.verify|verify} messages. + * Encodes the specified KGEdge message. Does not implicitly {@link atomic.KGEdge.verify|verify} messages. * @function encode - * @memberof atomic.RagAskQuery + * @memberof atomic.KGEdge * @static - * @param {atomic.RagAskQuery.$Properties} message RagAskQuery message or plain object to encode + * @param {atomic.KGEdge.$Properties} message KGEdge message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RagAskQuery.encode = function (message, writer, _depth) { + 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.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.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]); @@ -33857,30 +47725,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified RagAskQuery message, length delimited. Does not implicitly {@link atomic.RagAskQuery.verify|verify} messages. + * Encodes the specified KGEdge message, length delimited. Does not implicitly {@link atomic.KGEdge.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.RagAskQuery + * @memberof atomic.KGEdge * @static - * @param {atomic.RagAskQuery.$Properties} message RagAskQuery message or plain object to encode + * @param {atomic.KGEdge.$Properties} message KGEdge message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RagAskQuery.encodeDelimited = function(message, writer) { + KGEdge.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a RagAskQuery message from the specified reader or buffer. + * Decodes a KGEdge message from the specified reader or buffer. * @function decode - * @memberof atomic.RagAskQuery + * @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.RagAskQuery & atomic.RagAskQuery.$Shape} RagAskQuery + * @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 */ - RagAskQuery.decode = function (reader, length, _end, _depth, _target) { + KGEdge.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -33897,7 +47765,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.RagAskQuery(); + message = _target || new $root.atomic.KGEdge(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -33911,32 +47779,34 @@ $root.atomic = (function() { if (wireType !== 2) break; if ((value = reader.stringVerify()).length) - message.question = value; + message.source = value; else - delete message.question; + delete message.source; continue; } case 2: { - if (wireType !== 0) + if (wireType !== 2) break; - if (value = reader.uint32()) - message.topK = value; + if ((value = reader.stringVerify()).length) + message.target = value; else - delete message.topK; + delete message.target; continue; } case 3: { - if (wireType !== 0) + if (wireType !== 2) break; - message.maxTurns = reader.uint32(); - message._max_turns = "maxTurns"; + if ((value = reader.stringVerify()).length) + message.relation = value; + else + delete message.relation; continue; } case 4: { - if (wireType !== 0) + if (wireType !== 2) break; - message.verbose = reader.bool(); - message._verbose = "verbose"; + message.metadata = reader.bytes(); + message._metadata = "metadata"; continue; } } @@ -33957,30 +47827,30 @@ $root.atomic = (function() { }; /** - * Decodes a RagAskQuery message from the specified reader or buffer, length delimited. + * Decodes a KGEdge message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.RagAskQuery + * @memberof atomic.KGEdge * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.RagAskQuery & atomic.RagAskQuery.$Shape} RagAskQuery + * @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 */ - RagAskQuery.decodeDelimited = function(reader) { + KGEdge.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a RagAskQuery message. + * Verifies a KGEdge message. * @function verify - * @memberof atomic.RagAskQuery + * @memberof atomic.KGEdge * @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) { + KGEdge.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -33988,66 +47858,68 @@ $root.atomic = (function() { 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"; + 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 RagAskQuery message from a plain object. Also converts values to their respective internal types. + * Creates a KGEdge message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.RagAskQuery + * @memberof atomic.KGEdge * @static * @param {Object.} object Plain object - * @returns {atomic.RagAskQuery} RagAskQuery + * @returns {atomic.KGEdge} KGEdge */ - RagAskQuery.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.RagAskQuery) + KGEdge.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.KGEdge) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.RagAskQuery: object expected"); + 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.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); + 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 RagAskQuery message. Also converts values to other types if specified. + * Creates a plain object from a KGEdge message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.RagAskQuery + * @memberof atomic.KGEdge * @static - * @param {atomic.RagAskQuery} message RagAskQuery + * @param {atomic.KGEdge} message KGEdge * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RagAskQuery.toObject = function (message, options, _depth) { + KGEdge.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -34056,289 +47928,176 @@ $root.atomic = (function() { 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]]; + 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; }; /** - * QueryGraphResponse nodes. - * @member {Array.} nodes - * @memberof atomic.QueryGraphResponse + * Converts this KGEdge to JSON. + * @function toJSON + * @memberof atomic.KGEdge * @instance + * @returns {Object.} JSON object */ - QueryGraphResponse.prototype.nodes = $util.emptyArray; + KGEdge.prototype.toJSON = function() { + return KGEdge.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * QueryGraphResponse edges. - * @member {Array.} edges - * @memberof atomic.QueryGraphResponse - * @instance + * 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 */ - QueryGraphResponse.prototype.edges = $util.emptyArray; + KGEdge.getTypeUrl = function(prefix) { + if (prefix === $undefined) + prefix = "type.googleapis.com"; + return prefix + "/atomic.KGEdge"; + }; - /** - * QueryGraphResponse hits. - * @member {Array.} hits - * @memberof atomic.QueryGraphResponse - * @instance - */ - QueryGraphResponse.prototype.hits = $util.emptyArray; + return KGEdge; + })(); - /** - * QueryGraphResponse answer. - * @member {string|null|undefined} answer - * @memberof atomic.QueryGraphResponse - * @instance - */ - QueryGraphResponse.prototype.answer = null; + atomic.ContentHit = (function() { /** - * QueryGraphResponse planResult. - * @member {Uint8Array|null|undefined} planResult - * @memberof atomic.QueryGraphResponse - * @instance + * 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 */ - QueryGraphResponse.prototype.planResult = null; /** - * QueryGraphResponse snapshot. - * @member {atomic.ViewSnapshot.$Properties|null|undefined} snapshot - * @memberof atomic.QueryGraphResponse - * @instance + * Properties of a ContentHit. + * @memberof atomic + * @interface IContentHit + * @augments atomic.ContentHit.$Properties + * @deprecated Use atomic.ContentHit.$Properties instead. */ - QueryGraphResponse.prototype.snapshot = null; /** - * QueryGraphResponse graphCollected. - * @member {number|null|undefined} graphCollected - * @memberof atomic.QueryGraphResponse - * @instance + * Shape of a ContentHit. + * @typedef {atomic.ContentHit.$Properties} atomic.ContentHit.$Shape */ - QueryGraphResponse.prototype.graphCollected = null; /** - * QueryGraphResponse callsPresent. - * @member {boolean} callsPresent - * @memberof atomic.QueryGraphResponse - * @instance + * 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 */ - QueryGraphResponse.prototype.callsPresent = false; + 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]]; + }; /** - * QueryGraphResponse askResult. - * @member {atomic.VersionedBytes.$Properties|null|undefined} askResult - * @memberof atomic.QueryGraphResponse + * ContentHit path. + * @member {string} path + * @memberof atomic.ContentHit * @instance */ - QueryGraphResponse.prototype.askResult = null; + ContentHit.prototype.path = ""; /** - * QueryGraphResponse askElapsedMs. - * @member {number|Long|null|undefined} askElapsedMs - * @memberof atomic.QueryGraphResponse + * ContentHit snippet. + * @member {string} snippet + * @memberof atomic.ContentHit * @instance */ - QueryGraphResponse.prototype.askElapsedMs = null; + ContentHit.prototype.snippet = ""; /** - * QueryGraphResponse apiVersion. - * @member {number} apiVersion - * @memberof atomic.QueryGraphResponse + * ContentHit line. + * @member {number|Long|null|undefined} line + * @memberof atomic.ContentHit * @instance */ - QueryGraphResponse.prototype.apiVersion = 0; + ContentHit.prototype.line = null; /** - * QueryGraphResponse callers. - * @member {Array.} callers - * @memberof atomic.QueryGraphResponse + * ContentHit score. + * @member {number|null|undefined} score + * @memberof atomic.ContentHit * @instance */ - QueryGraphResponse.prototype.callers = $util.emptyArray; + ContentHit.prototype.score = null; // 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"]), + $Object.defineProperty(ContentHit.prototype, "_line", { + get: $util.oneOfGetter($oneOfFields = ["line"]), set: $util.oneOfSetter($oneOfFields) }); // Virtual OneOf for proto3 optional field - $Object.defineProperty(QueryGraphResponse.prototype, "_ask_elapsed_ms", { - get: $util.oneOfGetter($oneOfFields = ["askElapsedMs"]), + $Object.defineProperty(ContentHit.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new QueryGraphResponse instance using the specified properties. + * Creates a new ContentHit instance using the specified properties. * @function create - * @memberof atomic.QueryGraphResponse + * @memberof atomic.ContentHit * @static - * @param {atomic.QueryGraphResponse.$Properties=} [properties] Properties to set - * @returns {atomic.QueryGraphResponse} QueryGraphResponse instance + * @param {atomic.ContentHit.$Properties=} [properties] Properties to set + * @returns {atomic.ContentHit} ContentHit instance * @type {{ - * (properties: atomic.QueryGraphResponse.$Shape): atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape; - * (properties?: atomic.QueryGraphResponse.$Properties): atomic.QueryGraphResponse; + * (properties: atomic.ContentHit.$Shape): atomic.ContentHit & atomic.ContentHit.$Shape; + * (properties?: atomic.ContentHit.$Properties): atomic.ContentHit; * }} */ - QueryGraphResponse.create = function(properties) { - return new QueryGraphResponse(properties); + ContentHit.create = function(properties) { + return new ContentHit(properties); }; /** - * Encodes the specified QueryGraphResponse message. Does not implicitly {@link atomic.QueryGraphResponse.verify|verify} messages. + * Encodes the specified ContentHit message. Does not implicitly {@link atomic.ContentHit.verify|verify} messages. * @function encode - * @memberof atomic.QueryGraphResponse + * @memberof atomic.ContentHit * @static - * @param {atomic.QueryGraphResponse.$Properties} message QueryGraphResponse message or plain object to encode + * @param {atomic.ContentHit.$Properties} message ContentHit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryGraphResponse.encode = function (message, writer, _depth) { + 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.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.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]); @@ -34346,30 +48105,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified QueryGraphResponse message, length delimited. Does not implicitly {@link atomic.QueryGraphResponse.verify|verify} messages. + * Encodes the specified ContentHit message, length delimited. Does not implicitly {@link atomic.ContentHit.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.QueryGraphResponse + * @memberof atomic.ContentHit * @static - * @param {atomic.QueryGraphResponse.$Properties} message QueryGraphResponse message or plain object to encode + * @param {atomic.ContentHit.$Properties} message ContentHit message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryGraphResponse.encodeDelimited = function(message, writer) { + ContentHit.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a QueryGraphResponse message from the specified reader or buffer. + * Decodes a ContentHit message from the specified reader or buffer. * @function decode - * @memberof atomic.QueryGraphResponse + * @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.QueryGraphResponse & atomic.QueryGraphResponse.$Shape} QueryGraphResponse + * @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 */ - QueryGraphResponse.decode = function (reader, length, _end, _depth, _target) { + ContentHit.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -34386,7 +48145,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.QueryGraphResponse(); + message = _target || new $root.atomic.ContentHit(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -34399,92 +48158,33 @@ $root.atomic = (function() { 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)); + if ((value = reader.stringVerify()).length) + message.path = value; + else + delete message.path; 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; + if ((value = reader.stringVerify()).length) + message.snippet = 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"; + delete message.snippet; continue; } - case 11: { + case 3: { if (wireType !== 0) break; - if (value = reader.uint32()) - message.apiVersion = value; - else - delete message.apiVersion; + message.line = reader.uint64(); + message._line = "line"; continue; } - case 12: { - if (wireType !== 2) + case 4: { + if (wireType !== 1) break; - if (!(message.callers && message.callers.length)) - message.callers = []; - message.callers.push($root.atomic.CodeCaller.decode(reader, reader.size(), $undefined, _depth + 1)); + message.score = reader.double(); + message._score = "score"; continue; } } @@ -34505,30 +48205,30 @@ $root.atomic = (function() { }; /** - * Decodes a QueryGraphResponse message from the specified reader or buffer, length delimited. + * Decodes a ContentHit message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.QueryGraphResponse + * @memberof atomic.ContentHit * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.QueryGraphResponse & atomic.QueryGraphResponse.$Shape} QueryGraphResponse + * @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 */ - QueryGraphResponse.decodeDelimited = function(reader) { + ContentHit.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a QueryGraphResponse message. + * Verifies a ContentHit message. * @function verify - * @memberof atomic.QueryGraphResponse + * @memberof atomic.ContentHit * @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) { + ContentHit.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -34536,189 +48236,73 @@ $root.atomic = (function() { 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.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.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; - } + 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 QueryGraphResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ContentHit message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.QueryGraphResponse + * @memberof atomic.ContentHit * @static * @param {Object.} object Plain object - * @returns {atomic.QueryGraphResponse} QueryGraphResponse + * @returns {atomic.ContentHit} ContentHit */ - QueryGraphResponse.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.QueryGraphResponse) + ContentHit.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ContentHit) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.QueryGraphResponse: object expected"); + 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.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); - } - } + 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 QueryGraphResponse message. Also converts values to other types if specified. + * Creates a plain object from a ContentHit message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.QueryGraphResponse + * @memberof atomic.ContentHit * @static - * @param {atomic.QueryGraphResponse} message QueryGraphResponse + * @param {atomic.ContentHit} message ContentHit * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryGraphResponse.toObject = function (message, options, _depth) { + ContentHit.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -34726,127 +48310,88 @@ $root.atomic = (function() { 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); + object.path = ""; + object.snippet = ""; } - 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 (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.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; + 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.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); - } + 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 QueryGraphResponse to JSON. + * Converts this ContentHit to JSON. * @function toJSON - * @memberof atomic.QueryGraphResponse + * @memberof atomic.ContentHit * @instance * @returns {Object.} JSON object */ - QueryGraphResponse.prototype.toJSON = function() { - return QueryGraphResponse.toObject(this, $protobuf.util.toJSONOptions); + ContentHit.prototype.toJSON = function() { + return ContentHit.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for QueryGraphResponse + * Gets the type url for ContentHit * @function getTypeUrl - * @memberof atomic.QueryGraphResponse + * @memberof atomic.ContentHit * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - QueryGraphResponse.getTypeUrl = function(prefix) { + ContentHit.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.QueryGraphResponse"; + return prefix + "/atomic.ContentHit"; }; - return QueryGraphResponse; + return ContentHit; })(); - atomic.KGNode = (function() { + atomic.CodeCaller = (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 + * 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 KGNode. + * Properties of a CodeCaller. * @memberof atomic - * @interface IKGNode - * @augments atomic.KGNode.$Properties - * @deprecated Use atomic.KGNode.$Properties instead. + * @interface ICodeCaller + * @augments atomic.CodeCaller.$Properties + * @deprecated Use atomic.CodeCaller.$Properties instead. */ /** - * Shape of a KGNode. - * @typedef {atomic.KGNode.$Properties} atomic.KGNode.$Shape + * Shape of a CodeCaller. + * @typedef {atomic.CodeCaller.$Properties} atomic.CodeCaller.$Shape */ /** - * Constructs a new KGNode. + * Constructs a new CodeCaller. * @memberof atomic - * @classdesc Represents a KGNode. + * @classdesc Represents a CodeCaller. * @constructor - * @param {atomic.KGNode.$Properties=} [properties] Properties to set + * @param {atomic.CodeCaller.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var KGNode = function (properties) { - this.types = []; + 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__") @@ -34854,141 +48399,86 @@ $root.atomic = (function() { }; /** - * 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 + * CodeCaller path. + * @member {string} path + * @memberof atomic.CodeCaller * @instance */ - KGNode.prototype.data = null; + CodeCaller.prototype.path = ""; /** - * KGNode score. - * @member {number|null|undefined} score - * @memberof atomic.KGNode + * CodeCaller name. + * @member {string} name + * @memberof atomic.CodeCaller * @instance */ - KGNode.prototype.score = null; + CodeCaller.prototype.name = ""; /** - * KGNode source. - * @member {string|null|undefined} source - * @memberof atomic.KGNode + * CodeCaller line. + * @member {number} line + * @memberof atomic.CodeCaller * @instance */ - KGNode.prototype.source = null; + CodeCaller.prototype.line = 0; /** - * KGNode metadata. - * @member {Uint8Array|null|undefined} metadata - * @memberof atomic.KGNode + * CodeCaller summary. + * @member {string|null|undefined} summary + * @memberof atomic.CodeCaller * @instance */ - KGNode.prototype.metadata = null; + CodeCaller.prototype.summary = 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"]), + $Object.defineProperty(CodeCaller.prototype, "_summary", { + get: $util.oneOfGetter($oneOfFields = ["summary"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new KGNode instance using the specified properties. + * Creates a new CodeCaller instance using the specified properties. * @function create - * @memberof atomic.KGNode + * @memberof atomic.CodeCaller * @static - * @param {atomic.KGNode.$Properties=} [properties] Properties to set - * @returns {atomic.KGNode} KGNode instance + * @param {atomic.CodeCaller.$Properties=} [properties] Properties to set + * @returns {atomic.CodeCaller} CodeCaller instance * @type {{ - * (properties: atomic.KGNode.$Shape): atomic.KGNode & atomic.KGNode.$Shape; - * (properties?: atomic.KGNode.$Properties): atomic.KGNode; + * (properties: atomic.CodeCaller.$Shape): atomic.CodeCaller & atomic.CodeCaller.$Shape; + * (properties?: atomic.CodeCaller.$Properties): atomic.CodeCaller; * }} */ - KGNode.create = function(properties) { - return new KGNode(properties); + CodeCaller.create = function(properties) { + return new CodeCaller(properties); }; /** - * Encodes the specified KGNode message. Does not implicitly {@link atomic.KGNode.verify|verify} messages. + * Encodes the specified CodeCaller message. Does not implicitly {@link atomic.CodeCaller.verify|verify} messages. * @function encode - * @memberof atomic.KGNode + * @memberof atomic.CodeCaller * @static - * @param {atomic.KGNode.$Properties} message KGNode message or plain object to encode + * @param {atomic.CodeCaller.$Properties} message CodeCaller message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KGNode.encode = function (message, writer, _depth) { + 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.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.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]); @@ -34996,30 +48486,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified KGNode message, length delimited. Does not implicitly {@link atomic.KGNode.verify|verify} messages. + * Encodes the specified CodeCaller message, length delimited. Does not implicitly {@link atomic.CodeCaller.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.KGNode + * @memberof atomic.CodeCaller * @static - * @param {atomic.KGNode.$Properties} message KGNode message or plain object to encode + * @param {atomic.CodeCaller.$Properties} message CodeCaller message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KGNode.encodeDelimited = function(message, writer) { + CodeCaller.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a KGNode message from the specified reader or buffer. + * Decodes a CodeCaller message from the specified reader or buffer. * @function decode - * @memberof atomic.KGNode + * @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.KGNode & atomic.KGNode.$Shape} KGNode + * @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 */ - KGNode.decode = function (reader, length, _end, _depth, _target) { + CodeCaller.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -35036,7 +48526,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.KGNode(); + message = _target || new $root.atomic.CodeCaller(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -35050,52 +48540,34 @@ $root.atomic = (function() { if (wireType !== 2) break; if ((value = reader.stringVerify()).length) - message.id = value; + message.path = value; else - delete message.id; + delete message.path; continue; } case 2: { if (wireType !== 2) break; - if (!(message.types && message.types.length)) - message.types = []; - message.types.push(reader.stringVerify()); + if ((value = reader.stringVerify()).length) + message.name = value; + else + delete message.name; continue; } case 3: { - if (wireType !== 2) + if (wireType !== 0) break; - message.name = reader.stringVerify(); - message._name = "name"; + if (value = reader.uint32()) + message.line = value; + else + delete message.line; 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"; + message.summary = reader.stringVerify(); + message._summary = "summary"; continue; } } @@ -35116,30 +48588,30 @@ $root.atomic = (function() { }; /** - * Decodes a KGNode message from the specified reader or buffer, length delimited. + * Decodes a CodeCaller message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.KGNode + * @memberof atomic.CodeCaller * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.KGNode & atomic.KGNode.$Shape} KGNode + * @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 */ - KGNode.decodeDelimited = function(reader) { + CodeCaller.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a KGNode message. + * Verifies a CodeCaller message. * @function verify - * @memberof atomic.KGNode + * @memberof atomic.CodeCaller * @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) { + CodeCaller.verify = function (message, _depth) { if (typeof message !== "object" || message === null) return "object expected"; if (_depth === $undefined) @@ -35147,101 +48619,65 @@ $root.atomic = (function() { 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 (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.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"; + 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 KGNode message from a plain object. Also converts values to their respective internal types. + * Creates a CodeCaller message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.KGNode + * @memberof atomic.CodeCaller * @static * @param {Object.} object Plain object - * @returns {atomic.KGNode} KGNode + * @returns {atomic.CodeCaller} CodeCaller */ - KGNode.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.KGNode) + CodeCaller.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.CodeCaller) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.KGNode: object expected"); + 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.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]); - } + 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) - 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; + 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 KGNode message. Also converts values to other types if specified. + * Creates a plain object from a CodeCaller message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.KGNode + * @memberof atomic.CodeCaller * @static - * @param {atomic.KGNode} message KGNode + * @param {atomic.CodeCaller} message CodeCaller * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KGNode.toObject = function (message, options, _depth) { + CodeCaller.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -35249,92 +48685,85 @@ $root.atomic = (function() { 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 (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.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; + 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 KGNode to JSON. + * Converts this CodeCaller to JSON. * @function toJSON - * @memberof atomic.KGNode + * @memberof atomic.CodeCaller * @instance * @returns {Object.} JSON object */ - KGNode.prototype.toJSON = function() { - return KGNode.toObject(this, $protobuf.util.toJSONOptions); + CodeCaller.prototype.toJSON = function() { + return CodeCaller.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for KGNode + * Gets the type url for CodeCaller * @function getTypeUrl - * @memberof atomic.KGNode + * @memberof atomic.CodeCaller * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - KGNode.getTypeUrl = function(prefix) { + CodeCaller.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.KGNode"; + return prefix + "/atomic.CodeCaller"; }; - return KGNode; + return CodeCaller; })(); - atomic.KGEdge = (function() { + atomic.ContentSearchResult = (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 + * Properties of a ContentSearchResult. + * @typedef {Object} atomic.ContentSearchResult.$Properties + * @property {Array.|null} [matches] ContentSearchResult matches + * @property {number|Long|null} [totalMatches] ContentSearchResult totalMatches + * @property {Array.|null} [dirFacets] ContentSearchResult dirFacets * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ /** - * Properties of a KGEdge. + * Properties of a ContentSearchResult. * @memberof atomic - * @interface IKGEdge - * @augments atomic.KGEdge.$Properties - * @deprecated Use atomic.KGEdge.$Properties instead. + * @interface IContentSearchResult + * @augments atomic.ContentSearchResult.$Properties + * @deprecated Use atomic.ContentSearchResult.$Properties instead. */ /** - * Shape of a KGEdge. - * @typedef {atomic.KGEdge.$Properties} atomic.KGEdge.$Shape + * Shape of a ContentSearchResult. + * @typedef {atomic.ContentSearchResult.$Properties} atomic.ContentSearchResult.$Shape */ /** - * Constructs a new KGEdge. + * Constructs a new ContentSearchResult. * @memberof atomic - * @classdesc Represents a KGEdge. + * @classdesc Represents a ContentSearchResult. * @constructor - * @param {atomic.KGEdge.$Properties=} [properties] Properties to set + * @param {atomic.ContentSearchResult.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var KGEdge = function (properties) { + var ContentSearchResult = function (properties) { + this.matches = []; + this.dirFacets = []; if (properties) for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null && keys[i] !== "__proto__") @@ -35342,86 +48771,69 @@ $root.atomic = (function() { }; /** - * KGEdge source. - * @member {string} source - * @memberof atomic.KGEdge - * @instance - */ - KGEdge.prototype.source = ""; - - /** - * KGEdge target. - * @member {string} target - * @memberof atomic.KGEdge + * ContentSearchResult matches. + * @member {Array.} matches + * @memberof atomic.ContentSearchResult * @instance */ - KGEdge.prototype.target = ""; + ContentSearchResult.prototype.matches = $util.emptyArray; /** - * KGEdge relation. - * @member {string} relation - * @memberof atomic.KGEdge + * ContentSearchResult totalMatches. + * @member {number|Long} totalMatches + * @memberof atomic.ContentSearchResult * @instance */ - KGEdge.prototype.relation = ""; + ContentSearchResult.prototype.totalMatches = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * KGEdge metadata. - * @member {Uint8Array|null|undefined} metadata - * @memberof atomic.KGEdge + * ContentSearchResult dirFacets. + * @member {Array.} dirFacets + * @memberof atomic.ContentSearchResult * @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) - }); + ContentSearchResult.prototype.dirFacets = $util.emptyArray; /** - * Creates a new KGEdge instance using the specified properties. + * Creates a new ContentSearchResult instance using the specified properties. * @function create - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @static - * @param {atomic.KGEdge.$Properties=} [properties] Properties to set - * @returns {atomic.KGEdge} KGEdge instance + * @param {atomic.ContentSearchResult.$Properties=} [properties] Properties to set + * @returns {atomic.ContentSearchResult} ContentSearchResult instance * @type {{ - * (properties: atomic.KGEdge.$Shape): atomic.KGEdge & atomic.KGEdge.$Shape; - * (properties?: atomic.KGEdge.$Properties): atomic.KGEdge; + * (properties: atomic.ContentSearchResult.$Shape): atomic.ContentSearchResult & atomic.ContentSearchResult.$Shape; + * (properties?: atomic.ContentSearchResult.$Properties): atomic.ContentSearchResult; * }} */ - KGEdge.create = function(properties) { - return new KGEdge(properties); + ContentSearchResult.create = function(properties) { + return new ContentSearchResult(properties); }; /** - * Encodes the specified KGEdge message. Does not implicitly {@link atomic.KGEdge.verify|verify} messages. + * Encodes the specified ContentSearchResult message. Does not implicitly {@link atomic.ContentSearchResult.verify|verify} messages. * @function encode - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @static - * @param {atomic.KGEdge.$Properties} message KGEdge message or plain object to encode + * @param {atomic.ContentSearchResult.$Properties} message ContentSearchResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KGEdge.encode = function (message, writer, _depth) { + ContentSearchResult.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.matches != null && message.matches.length) + for (var i = 0; i < message.matches.length; ++i) + $root.atomic.ContentMatch.encode(message.matches[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), _depth + 1).ldelim(); + if (message.totalMatches != null && $Object.hasOwnProperty.call(message, "totalMatches") && (typeof message.totalMatches === "object" ? message.totalMatches.low || message.totalMatches.high : message.totalMatches !== 0)) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.totalMatches); + if (message.dirFacets != null && message.dirFacets.length) + for (var i = 0; i < message.dirFacets.length; ++i) + $root.atomic.ContentDirectoryFacet.encode(message.dirFacets[i], 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]); @@ -35429,30 +48841,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified KGEdge message, length delimited. Does not implicitly {@link atomic.KGEdge.verify|verify} messages. + * Encodes the specified ContentSearchResult message, length delimited. Does not implicitly {@link atomic.ContentSearchResult.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @static - * @param {atomic.KGEdge.$Properties} message KGEdge message or plain object to encode + * @param {atomic.ContentSearchResult.$Properties} message ContentSearchResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KGEdge.encodeDelimited = function(message, writer) { + ContentSearchResult.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a KGEdge message from the specified reader or buffer. + * Decodes a ContentSearchResult message from the specified reader or buffer. * @function decode - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @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 + * @returns {atomic.ContentSearchResult & atomic.ContentSearchResult.$Shape} ContentSearchResult * @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) { + ContentSearchResult.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -35469,7 +48881,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.KGEdge(); + message = _target || new $root.atomic.ContentSearchResult(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -35482,35 +48894,26 @@ $root.atomic = (function() { case 1: { if (wireType !== 2) break; - if ((value = reader.stringVerify()).length) - message.source = value; - else - delete message.source; + if (!(message.matches && message.matches.length)) + message.matches = []; + message.matches.push($root.atomic.ContentMatch.decode(reader, reader.size(), $undefined, _depth + 1)); continue; } case 2: { - if (wireType !== 2) + if (wireType !== 0) break; - if ((value = reader.stringVerify()).length) - message.target = value; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.totalMatches = value; else - delete message.target; + delete message.totalMatches; 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"; + if (!(message.dirFacets && message.dirFacets.length)) + message.dirFacets = []; + message.dirFacets.push($root.atomic.ContentDirectoryFacet.decode(reader, reader.size(), $undefined, _depth + 1)); continue; } } @@ -35531,99 +48934,121 @@ $root.atomic = (function() { }; /** - * Decodes a KGEdge message from the specified reader or buffer, length delimited. + * Decodes a ContentSearchResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.KGEdge & atomic.KGEdge.$Shape} KGEdge + * @returns {atomic.ContentSearchResult & atomic.ContentSearchResult.$Shape} ContentSearchResult * @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) { + ContentSearchResult.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a KGEdge message. + * Verifies a ContentSearchResult message. * @function verify - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @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) { + ContentSearchResult.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"; + if (message.matches != null && $Object.hasOwnProperty.call(message, "matches")) { + if (!$Array.isArray(message.matches)) + return "matches: array expected"; + for (var i = 0; i < message.matches.length; ++i) { + var error = $root.atomic.ContentMatch.verify(message.matches[i], _depth + 1); + if (error) + return "matches." + error; + } + } + if (message.totalMatches != null && $Object.hasOwnProperty.call(message, "totalMatches")) + if (!$util.isInteger(message.totalMatches) && !(message.totalMatches && $util.isInteger(message.totalMatches.low) && $util.isInteger(message.totalMatches.high))) + return "totalMatches: integer|Long expected"; + if (message.dirFacets != null && $Object.hasOwnProperty.call(message, "dirFacets")) { + if (!$Array.isArray(message.dirFacets)) + return "dirFacets: array expected"; + for (var i = 0; i < message.dirFacets.length; ++i) { + var error = $root.atomic.ContentDirectoryFacet.verify(message.dirFacets[i], _depth + 1); + if (error) + return "dirFacets." + error; + } } return null; }; /** - * Creates a KGEdge message from a plain object. Also converts values to their respective internal types. + * Creates a ContentSearchResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @static * @param {Object.} object Plain object - * @returns {atomic.KGEdge} KGEdge + * @returns {atomic.ContentSearchResult} ContentSearchResult */ - KGEdge.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.KGEdge) + ContentSearchResult.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ContentSearchResult) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.KGEdge: object expected"); + throw $TypeError(".atomic.ContentSearchResult: 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; + var message = new $root.atomic.ContentSearchResult(); + if (object.matches) { + if (!$Array.isArray(object.matches)) + throw $TypeError(".atomic.ContentSearchResult.matches: array expected"); + message.matches = $Array(object.matches.length); + for (var i = 0; i < object.matches.length; ++i) { + if (!$util.isObject(object.matches[i])) + throw $TypeError(".atomic.ContentSearchResult.matches: object expected"); + message.matches[i] = $root.atomic.ContentMatch.fromObject(object.matches[i], _depth + 1); + } + } + if (object.totalMatches != null) + if (typeof object.totalMatches === "object" ? object.totalMatches.low || object.totalMatches.high : $Number(object.totalMatches) !== 0) + if ($util.Long) + message.totalMatches = $util.Long.fromValue(object.totalMatches, true); + else if (typeof object.totalMatches === "string") + message.totalMatches = $parseInt(object.totalMatches, 10); + else if (typeof object.totalMatches === "number") + message.totalMatches = object.totalMatches; + else if (typeof object.totalMatches === "object") + message.totalMatches = new $util.LongBits(object.totalMatches.low >>> 0, object.totalMatches.high >>> 0).toNumber(true); + if (object.dirFacets) { + if (!$Array.isArray(object.dirFacets)) + throw $TypeError(".atomic.ContentSearchResult.dirFacets: array expected"); + message.dirFacets = $Array(object.dirFacets.length); + for (var i = 0; i < object.dirFacets.length; ++i) { + if (!$util.isObject(object.dirFacets[i])) + throw $TypeError(".atomic.ContentSearchResult.dirFacets: object expected"); + message.dirFacets[i] = $root.atomic.ContentDirectoryFacet.fromObject(object.dirFacets[i], _depth + 1); + } + } return message; }; /** - * Creates a plain object from a KGEdge message. Also converts values to other types if specified. + * Creates a plain object from a ContentSearchResult message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @static - * @param {atomic.KGEdge} message KGEdge + * @param {atomic.ContentSearchResult} message ContentSearchResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KGEdge.toObject = function (message, options, _depth) { + ContentSearchResult.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -35631,84 +49056,100 @@ $root.atomic = (function() { if (_depth > $util.recursionLimit) throw $Error("max depth exceeded"); var object = {}; - if (options.defaults) { - object.source = ""; - object.target = ""; - object.relation = ""; + if (options.arrays || options.defaults) { + object.matches = []; + object.dirFacets = []; + } + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.totalMatches = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.totalMatches = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; + if (message.matches && message.matches.length) { + object.matches = $Array(message.matches.length); + for (var j = 0; j < message.matches.length; ++j) + object.matches[j] = $root.atomic.ContentMatch.toObject(message.matches[j], options, _depth + 1); + } + if (message.totalMatches != null && $Object.hasOwnProperty.call(message, "totalMatches")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.totalMatches = typeof message.totalMatches === "number" ? $BigInt(message.totalMatches) : $util.Long.fromBits(message.totalMatches.low >>> 0, message.totalMatches.high >>> 0, true).toBigInt(); + else if (typeof message.totalMatches === "number") + object.totalMatches = options.longs === $String ? $String(message.totalMatches) : message.totalMatches; + else + object.totalMatches = options.longs === $String ? $util.Long.prototype.toString.call(message.totalMatches) : options.longs === $Number ? new $util.LongBits(message.totalMatches.low >>> 0, message.totalMatches.high >>> 0).toNumber(true) : message.totalMatches; + if (message.dirFacets && message.dirFacets.length) { + object.dirFacets = $Array(message.dirFacets.length); + for (var j = 0; j < message.dirFacets.length; ++j) + object.dirFacets[j] = $root.atomic.ContentDirectoryFacet.toObject(message.dirFacets[j], options, _depth + 1); } - 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. + * Converts this ContentSearchResult to JSON. * @function toJSON - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @instance * @returns {Object.} JSON object */ - KGEdge.prototype.toJSON = function() { - return KGEdge.toObject(this, $protobuf.util.toJSONOptions); + ContentSearchResult.prototype.toJSON = function() { + return ContentSearchResult.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for KGEdge + * Gets the type url for ContentSearchResult * @function getTypeUrl - * @memberof atomic.KGEdge + * @memberof atomic.ContentSearchResult * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - KGEdge.getTypeUrl = function(prefix) { + ContentSearchResult.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.KGEdge"; + return prefix + "/atomic.ContentSearchResult"; }; - return KGEdge; + return ContentSearchResult; })(); - atomic.ContentHit = (function() { + atomic.ContentMatch = (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 + * Properties of a ContentMatch. + * @typedef {Object} atomic.ContentMatch.$Properties + * @property {string|null} [path] ContentMatch path + * @property {number|null} [lineNumber] ContentMatch lineNumber + * @property {string|null} [lineContent] ContentMatch lineContent + * @property {number|Long|null} [byteOffset] ContentMatch byteOffset + * @property {number|Long|null} [submatchStart] ContentMatch submatchStart + * @property {number|Long|null} [submatchEnd] ContentMatch submatchEnd * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ /** - * Properties of a ContentHit. + * Properties of a ContentMatch. * @memberof atomic - * @interface IContentHit - * @augments atomic.ContentHit.$Properties - * @deprecated Use atomic.ContentHit.$Properties instead. + * @interface IContentMatch + * @augments atomic.ContentMatch.$Properties + * @deprecated Use atomic.ContentMatch.$Properties instead. */ /** - * Shape of a ContentHit. - * @typedef {atomic.ContentHit.$Properties} atomic.ContentHit.$Shape + * Shape of a ContentMatch. + * @typedef {atomic.ContentMatch.$Properties} atomic.ContentMatch.$Shape */ /** - * Constructs a new ContentHit. + * Constructs a new ContentMatch. * @memberof atomic - * @classdesc Represents a ContentHit. + * @classdesc Represents a ContentMatch. * @constructor - * @param {atomic.ContentHit.$Properties=} [properties] Properties to set + * @param {atomic.ContentMatch.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var ContentHit = function (properties) { + var ContentMatch = function (properties) { if (properties) for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null && keys[i] !== "__proto__") @@ -35716,78 +49157,79 @@ $root.atomic = (function() { }; /** - * ContentHit path. + * ContentMatch path. * @member {string} path - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @instance */ - ContentHit.prototype.path = ""; + ContentMatch.prototype.path = ""; /** - * ContentHit snippet. - * @member {string} snippet - * @memberof atomic.ContentHit + * ContentMatch lineNumber. + * @member {number} lineNumber + * @memberof atomic.ContentMatch * @instance */ - ContentHit.prototype.snippet = ""; + ContentMatch.prototype.lineNumber = 0; /** - * ContentHit line. - * @member {number|Long|null|undefined} line - * @memberof atomic.ContentHit + * ContentMatch lineContent. + * @member {string} lineContent + * @memberof atomic.ContentMatch * @instance */ - ContentHit.prototype.line = null; + ContentMatch.prototype.lineContent = ""; /** - * ContentHit score. - * @member {number|null|undefined} score - * @memberof atomic.ContentHit + * ContentMatch byteOffset. + * @member {number|Long} byteOffset + * @memberof atomic.ContentMatch * @instance */ - ContentHit.prototype.score = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ContentMatch.prototype.byteOffset = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - // Virtual OneOf for proto3 optional field - $Object.defineProperty(ContentHit.prototype, "_line", { - get: $util.oneOfGetter($oneOfFields = ["line"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ContentMatch submatchStart. + * @member {number|Long} submatchStart + * @memberof atomic.ContentMatch + * @instance + */ + ContentMatch.prototype.submatchStart = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - // Virtual OneOf for proto3 optional field - $Object.defineProperty(ContentHit.prototype, "_score", { - get: $util.oneOfGetter($oneOfFields = ["score"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ContentMatch submatchEnd. + * @member {number|Long} submatchEnd + * @memberof atomic.ContentMatch + * @instance + */ + ContentMatch.prototype.submatchEnd = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new ContentHit instance using the specified properties. + * Creates a new ContentMatch instance using the specified properties. * @function create - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @static - * @param {atomic.ContentHit.$Properties=} [properties] Properties to set - * @returns {atomic.ContentHit} ContentHit instance + * @param {atomic.ContentMatch.$Properties=} [properties] Properties to set + * @returns {atomic.ContentMatch} ContentMatch instance * @type {{ - * (properties: atomic.ContentHit.$Shape): atomic.ContentHit & atomic.ContentHit.$Shape; - * (properties?: atomic.ContentHit.$Properties): atomic.ContentHit; + * (properties: atomic.ContentMatch.$Shape): atomic.ContentMatch & atomic.ContentMatch.$Shape; + * (properties?: atomic.ContentMatch.$Properties): atomic.ContentMatch; * }} */ - ContentHit.create = function(properties) { - return new ContentHit(properties); + ContentMatch.create = function(properties) { + return new ContentMatch(properties); }; /** - * Encodes the specified ContentHit message. Does not implicitly {@link atomic.ContentHit.verify|verify} messages. + * Encodes the specified ContentMatch message. Does not implicitly {@link atomic.ContentMatch.verify|verify} messages. * @function encode - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @static - * @param {atomic.ContentHit.$Properties} message ContentHit message or plain object to encode + * @param {atomic.ContentMatch.$Properties} message ContentMatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContentHit.encode = function (message, writer, _depth) { + ContentMatch.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); if (_depth === $undefined) @@ -35796,12 +49238,16 @@ $root.atomic = (function() { 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.lineNumber != null && $Object.hasOwnProperty.call(message, "lineNumber") && message.lineNumber !== 0) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.lineNumber); + if (message.lineContent != null && $Object.hasOwnProperty.call(message, "lineContent") && message.lineContent !== "") + writer.uint32(/* id 3, wireType 2 =*/26).string(message.lineContent); + if (message.byteOffset != null && $Object.hasOwnProperty.call(message, "byteOffset") && (typeof message.byteOffset === "object" ? message.byteOffset.low || message.byteOffset.high : message.byteOffset !== 0)) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.byteOffset); + if (message.submatchStart != null && $Object.hasOwnProperty.call(message, "submatchStart") && (typeof message.submatchStart === "object" ? message.submatchStart.low || message.submatchStart.high : message.submatchStart !== 0)) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.submatchStart); + if (message.submatchEnd != null && $Object.hasOwnProperty.call(message, "submatchEnd") && (typeof message.submatchEnd === "object" ? message.submatchEnd.low || message.submatchEnd.high : message.submatchEnd !== 0)) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.submatchEnd); if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) for (var i = 0; i < message.$unknowns.length; ++i) writer.raw(message.$unknowns[i]); @@ -35809,30 +49255,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified ContentHit message, length delimited. Does not implicitly {@link atomic.ContentHit.verify|verify} messages. + * Encodes the specified ContentMatch message, length delimited. Does not implicitly {@link atomic.ContentMatch.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @static - * @param {atomic.ContentHit.$Properties} message ContentHit message or plain object to encode + * @param {atomic.ContentMatch.$Properties} message ContentMatch message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContentHit.encodeDelimited = function(message, writer) { + ContentMatch.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a ContentHit message from the specified reader or buffer. + * Decodes a ContentMatch message from the specified reader or buffer. * @function decode - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @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 + * @returns {atomic.ContentMatch & atomic.ContentMatch.$Shape} ContentMatch * @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) { + ContentMatch.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -35849,7 +49295,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.ContentHit(); + message = _target || new $root.atomic.ContentMatch(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -35869,26 +49315,48 @@ $root.atomic = (function() { continue; } case 2: { + if (wireType !== 0) + break; + if (value = reader.uint32()) + message.lineNumber = value; + else + delete message.lineNumber; + continue; + } + case 3: { if (wireType !== 2) break; if ((value = reader.stringVerify()).length) - message.snippet = value; + message.lineContent = value; else - delete message.snippet; + delete message.lineContent; continue; } - case 3: { + case 4: { if (wireType !== 0) break; - message.line = reader.uint64(); - message._line = "line"; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.byteOffset = value; + else + delete message.byteOffset; continue; } - case 4: { - if (wireType !== 1) + case 5: { + if (wireType !== 0) break; - message.score = reader.double(); - message._score = "score"; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.submatchStart = value; + else + delete message.submatchStart; + continue; + } + case 6: { + if (wireType !== 0) + break; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.submatchEnd = value; + else + delete message.submatchEnd; continue; } } @@ -35909,104 +49377,127 @@ $root.atomic = (function() { }; /** - * Decodes a ContentHit message from the specified reader or buffer, length delimited. + * Decodes a ContentMatch message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.ContentHit & atomic.ContentHit.$Shape} ContentHit + * @returns {atomic.ContentMatch & atomic.ContentMatch.$Shape} ContentMatch * @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) { + ContentMatch.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a ContentHit message. + * Verifies a ContentMatch message. * @function verify - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @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) { + ContentMatch.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"; - } + if (message.lineNumber != null && $Object.hasOwnProperty.call(message, "lineNumber")) + if (!$util.isInteger(message.lineNumber)) + return "lineNumber: integer expected"; + if (message.lineContent != null && $Object.hasOwnProperty.call(message, "lineContent")) + if (!$util.isString(message.lineContent)) + return "lineContent: string expected"; + if (message.byteOffset != null && $Object.hasOwnProperty.call(message, "byteOffset")) + if (!$util.isInteger(message.byteOffset) && !(message.byteOffset && $util.isInteger(message.byteOffset.low) && $util.isInteger(message.byteOffset.high))) + return "byteOffset: integer|Long expected"; + if (message.submatchStart != null && $Object.hasOwnProperty.call(message, "submatchStart")) + if (!$util.isInteger(message.submatchStart) && !(message.submatchStart && $util.isInteger(message.submatchStart.low) && $util.isInteger(message.submatchStart.high))) + return "submatchStart: integer|Long expected"; + if (message.submatchEnd != null && $Object.hasOwnProperty.call(message, "submatchEnd")) + if (!$util.isInteger(message.submatchEnd) && !(message.submatchEnd && $util.isInteger(message.submatchEnd.low) && $util.isInteger(message.submatchEnd.high))) + return "submatchEnd: integer|Long expected"; return null; }; /** - * Creates a ContentHit message from a plain object. Also converts values to their respective internal types. + * Creates a ContentMatch message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @static * @param {Object.} object Plain object - * @returns {atomic.ContentHit} ContentHit + * @returns {atomic.ContentMatch} ContentMatch */ - ContentHit.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.ContentHit) + ContentMatch.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ContentMatch) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.ContentHit: object expected"); + throw $TypeError(".atomic.ContentMatch: object expected"); if (_depth === $undefined) _depth = 0; if (_depth > $util.recursionLimit) throw $Error("max depth exceeded"); - var message = new $root.atomic.ContentHit(); + var message = new $root.atomic.ContentMatch(); 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); + if (object.lineNumber != null) + if ($Number(object.lineNumber) !== 0) + message.lineNumber = object.lineNumber >>> 0; + if (object.lineContent != null) + if (typeof object.lineContent !== "string" || object.lineContent.length) + message.lineContent = $String(object.lineContent); + if (object.byteOffset != null) + if (typeof object.byteOffset === "object" ? object.byteOffset.low || object.byteOffset.high : $Number(object.byteOffset) !== 0) + if ($util.Long) + message.byteOffset = $util.Long.fromValue(object.byteOffset, true); + else if (typeof object.byteOffset === "string") + message.byteOffset = $parseInt(object.byteOffset, 10); + else if (typeof object.byteOffset === "number") + message.byteOffset = object.byteOffset; + else if (typeof object.byteOffset === "object") + message.byteOffset = new $util.LongBits(object.byteOffset.low >>> 0, object.byteOffset.high >>> 0).toNumber(true); + if (object.submatchStart != null) + if (typeof object.submatchStart === "object" ? object.submatchStart.low || object.submatchStart.high : $Number(object.submatchStart) !== 0) + if ($util.Long) + message.submatchStart = $util.Long.fromValue(object.submatchStart, true); + else if (typeof object.submatchStart === "string") + message.submatchStart = $parseInt(object.submatchStart, 10); + else if (typeof object.submatchStart === "number") + message.submatchStart = object.submatchStart; + else if (typeof object.submatchStart === "object") + message.submatchStart = new $util.LongBits(object.submatchStart.low >>> 0, object.submatchStart.high >>> 0).toNumber(true); + if (object.submatchEnd != null) + if (typeof object.submatchEnd === "object" ? object.submatchEnd.low || object.submatchEnd.high : $Number(object.submatchEnd) !== 0) + if ($util.Long) + message.submatchEnd = $util.Long.fromValue(object.submatchEnd, true); + else if (typeof object.submatchEnd === "string") + message.submatchEnd = $parseInt(object.submatchEnd, 10); + else if (typeof object.submatchEnd === "number") + message.submatchEnd = object.submatchEnd; + else if (typeof object.submatchEnd === "object") + message.submatchEnd = new $util.LongBits(object.submatchEnd.low >>> 0, object.submatchEnd.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a ContentHit message. Also converts values to other types if specified. + * Creates a plain object from a ContentMatch message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @static - * @param {atomic.ContentHit} message ContentHit + * @param {atomic.ContentMatch} message ContentMatch * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContentHit.toObject = function (message, options, _depth) { + ContentMatch.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -36016,86 +49507,114 @@ $root.atomic = (function() { var object = {}; if (options.defaults) { object.path = ""; - object.snippet = ""; + object.lineNumber = 0; + object.lineContent = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.byteOffset = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.byteOffset = 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.submatchStart = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.submatchStart = 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.submatchEnd = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.submatchEnd = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 0; } 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 (message.lineNumber != null && $Object.hasOwnProperty.call(message, "lineNumber")) + object.lineNumber = message.lineNumber; + if (message.lineContent != null && $Object.hasOwnProperty.call(message, "lineContent")) + object.lineContent = message.lineContent; + if (message.byteOffset != null && $Object.hasOwnProperty.call(message, "byteOffset")) 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; + object.byteOffset = typeof message.byteOffset === "number" ? $BigInt(message.byteOffset) : $util.Long.fromBits(message.byteOffset.low >>> 0, message.byteOffset.high >>> 0, true).toBigInt(); + else if (typeof message.byteOffset === "number") + object.byteOffset = options.longs === $String ? $String(message.byteOffset) : message.byteOffset; 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; + object.byteOffset = options.longs === $String ? $util.Long.prototype.toString.call(message.byteOffset) : options.longs === $Number ? new $util.LongBits(message.byteOffset.low >>> 0, message.byteOffset.high >>> 0).toNumber(true) : message.byteOffset; + if (message.submatchStart != null && $Object.hasOwnProperty.call(message, "submatchStart")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.submatchStart = typeof message.submatchStart === "number" ? $BigInt(message.submatchStart) : $util.Long.fromBits(message.submatchStart.low >>> 0, message.submatchStart.high >>> 0, true).toBigInt(); + else if (typeof message.submatchStart === "number") + object.submatchStart = options.longs === $String ? $String(message.submatchStart) : message.submatchStart; + else + object.submatchStart = options.longs === $String ? $util.Long.prototype.toString.call(message.submatchStart) : options.longs === $Number ? new $util.LongBits(message.submatchStart.low >>> 0, message.submatchStart.high >>> 0).toNumber(true) : message.submatchStart; + if (message.submatchEnd != null && $Object.hasOwnProperty.call(message, "submatchEnd")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.submatchEnd = typeof message.submatchEnd === "number" ? $BigInt(message.submatchEnd) : $util.Long.fromBits(message.submatchEnd.low >>> 0, message.submatchEnd.high >>> 0, true).toBigInt(); + else if (typeof message.submatchEnd === "number") + object.submatchEnd = options.longs === $String ? $String(message.submatchEnd) : message.submatchEnd; + else + object.submatchEnd = options.longs === $String ? $util.Long.prototype.toString.call(message.submatchEnd) : options.longs === $Number ? new $util.LongBits(message.submatchEnd.low >>> 0, message.submatchEnd.high >>> 0).toNumber(true) : message.submatchEnd; return object; }; /** - * Converts this ContentHit to JSON. + * Converts this ContentMatch to JSON. * @function toJSON - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @instance * @returns {Object.} JSON object */ - ContentHit.prototype.toJSON = function() { - return ContentHit.toObject(this, $protobuf.util.toJSONOptions); + ContentMatch.prototype.toJSON = function() { + return ContentMatch.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for ContentHit + * Gets the type url for ContentMatch * @function getTypeUrl - * @memberof atomic.ContentHit + * @memberof atomic.ContentMatch * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - ContentHit.getTypeUrl = function(prefix) { + ContentMatch.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.ContentHit"; + return prefix + "/atomic.ContentMatch"; }; - return ContentHit; + return ContentMatch; })(); - atomic.CodeCaller = (function() { + atomic.ContentDirectoryFacet = (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 + * Properties of a ContentDirectoryFacet. + * @typedef {Object} atomic.ContentDirectoryFacet.$Properties + * @property {string|null} [path] ContentDirectoryFacet path + * @property {number|Long|null} [count] ContentDirectoryFacet count * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ /** - * Properties of a CodeCaller. + * Properties of a ContentDirectoryFacet. * @memberof atomic - * @interface ICodeCaller - * @augments atomic.CodeCaller.$Properties - * @deprecated Use atomic.CodeCaller.$Properties instead. + * @interface IContentDirectoryFacet + * @augments atomic.ContentDirectoryFacet.$Properties + * @deprecated Use atomic.ContentDirectoryFacet.$Properties instead. */ /** - * Shape of a CodeCaller. - * @typedef {atomic.CodeCaller.$Properties} atomic.CodeCaller.$Shape + * Shape of a ContentDirectoryFacet. + * @typedef {atomic.ContentDirectoryFacet.$Properties} atomic.ContentDirectoryFacet.$Shape */ /** - * Constructs a new CodeCaller. + * Constructs a new ContentDirectoryFacet. * @memberof atomic - * @classdesc Represents a CodeCaller. + * @classdesc Represents a ContentDirectoryFacet. * @constructor - * @param {atomic.CodeCaller.$Properties=} [properties] Properties to set + * @param {atomic.ContentDirectoryFacet.$Properties=} [properties] Properties to set * @property {Array.} [$unknowns] Unknown fields preserved while decoding when enabled */ - var CodeCaller = function (properties) { + var ContentDirectoryFacet = function (properties) { if (properties) for (var keys = $Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null && keys[i] !== "__proto__") @@ -36103,72 +49622,47 @@ $root.atomic = (function() { }; /** - * CodeCaller path. + * ContentDirectoryFacet 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 + * @memberof atomic.ContentDirectoryFacet * @instance */ - CodeCaller.prototype.line = 0; + ContentDirectoryFacet.prototype.path = ""; /** - * CodeCaller summary. - * @member {string|null|undefined} summary - * @memberof atomic.CodeCaller + * ContentDirectoryFacet count. + * @member {number|Long} count + * @memberof atomic.ContentDirectoryFacet * @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) - }); + ContentDirectoryFacet.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new CodeCaller instance using the specified properties. + * Creates a new ContentDirectoryFacet instance using the specified properties. * @function create - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @static - * @param {atomic.CodeCaller.$Properties=} [properties] Properties to set - * @returns {atomic.CodeCaller} CodeCaller instance + * @param {atomic.ContentDirectoryFacet.$Properties=} [properties] Properties to set + * @returns {atomic.ContentDirectoryFacet} ContentDirectoryFacet instance * @type {{ - * (properties: atomic.CodeCaller.$Shape): atomic.CodeCaller & atomic.CodeCaller.$Shape; - * (properties?: atomic.CodeCaller.$Properties): atomic.CodeCaller; + * (properties: atomic.ContentDirectoryFacet.$Shape): atomic.ContentDirectoryFacet & atomic.ContentDirectoryFacet.$Shape; + * (properties?: atomic.ContentDirectoryFacet.$Properties): atomic.ContentDirectoryFacet; * }} */ - CodeCaller.create = function(properties) { - return new CodeCaller(properties); + ContentDirectoryFacet.create = function(properties) { + return new ContentDirectoryFacet(properties); }; /** - * Encodes the specified CodeCaller message. Does not implicitly {@link atomic.CodeCaller.verify|verify} messages. + * Encodes the specified ContentDirectoryFacet message. Does not implicitly {@link atomic.ContentDirectoryFacet.verify|verify} messages. * @function encode - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @static - * @param {atomic.CodeCaller.$Properties} message CodeCaller message or plain object to encode + * @param {atomic.ContentDirectoryFacet.$Properties} message ContentDirectoryFacet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CodeCaller.encode = function (message, writer, _depth) { + ContentDirectoryFacet.encode = function (message, writer, _depth) { if (!writer) writer = $Writer.create(); if (_depth === $undefined) @@ -36177,12 +49671,8 @@ $root.atomic = (function() { 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.count != null && $Object.hasOwnProperty.call(message, "count") && (typeof message.count === "object" ? message.count.low || message.count.high : message.count !== 0)) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.count); if (message.$unknowns != null && $Object.hasOwnProperty.call(message, "$unknowns")) for (var i = 0; i < message.$unknowns.length; ++i) writer.raw(message.$unknowns[i]); @@ -36190,30 +49680,30 @@ $root.atomic = (function() { }; /** - * Encodes the specified CodeCaller message, length delimited. Does not implicitly {@link atomic.CodeCaller.verify|verify} messages. + * Encodes the specified ContentDirectoryFacet message, length delimited. Does not implicitly {@link atomic.ContentDirectoryFacet.verify|verify} messages. * @function encodeDelimited - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @static - * @param {atomic.CodeCaller.$Properties} message CodeCaller message or plain object to encode + * @param {atomic.ContentDirectoryFacet.$Properties} message ContentDirectoryFacet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CodeCaller.encodeDelimited = function(message, writer) { + ContentDirectoryFacet.encodeDelimited = function(message, writer) { return this.encode(message, (writer || $Writer.create()).fork()).ldelim(); }; /** - * Decodes a CodeCaller message from the specified reader or buffer. + * Decodes a ContentDirectoryFacet message from the specified reader or buffer. * @function decode - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @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 + * @returns {atomic.ContentDirectoryFacet & atomic.ContentDirectoryFacet.$Shape} ContentDirectoryFacet * @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) { + ContentDirectoryFacet.decode = function (reader, length, _end, _depth, _target) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); if (_depth === $undefined) @@ -36230,7 +49720,7 @@ $root.atomic = (function() { length = reader.len; reader.len = end; } - message = _target || new $root.atomic.CodeCaller(); + message = _target || new $root.atomic.ContentDirectoryFacet(); while (reader.pos < end) { var start = reader.pos; var tag = reader.tag(); @@ -36250,28 +49740,12 @@ $root.atomic = (function() { 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; + if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0) + message.count = value; else - delete message.line; - continue; - } - case 4: { - if (wireType !== 2) - break; - message.summary = reader.stringVerify(); - message._summary = "summary"; + delete message.count; continue; } } @@ -36292,96 +49766,89 @@ $root.atomic = (function() { }; /** - * Decodes a CodeCaller message from the specified reader or buffer, length delimited. + * Decodes a ContentDirectoryFacet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {atomic.CodeCaller & atomic.CodeCaller.$Shape} CodeCaller + * @returns {atomic.ContentDirectoryFacet & atomic.ContentDirectoryFacet.$Shape} ContentDirectoryFacet * @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) { + ContentDirectoryFacet.decodeDelimited = function(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.size()); }; /** - * Verifies a CodeCaller message. + * Verifies a ContentDirectoryFacet message. * @function verify - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @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) { + ContentDirectoryFacet.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"; - } + if (message.count != null && $Object.hasOwnProperty.call(message, "count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; return null; }; /** - * Creates a CodeCaller message from a plain object. Also converts values to their respective internal types. + * Creates a ContentDirectoryFacet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @static * @param {Object.} object Plain object - * @returns {atomic.CodeCaller} CodeCaller + * @returns {atomic.ContentDirectoryFacet} ContentDirectoryFacet */ - CodeCaller.fromObject = function (object, _depth) { - if (object instanceof $root.atomic.CodeCaller) + ContentDirectoryFacet.fromObject = function (object, _depth) { + if (object instanceof $root.atomic.ContentDirectoryFacet) return object; if (!$util.isObject(object)) - throw $TypeError(".atomic.CodeCaller: object expected"); + throw $TypeError(".atomic.ContentDirectoryFacet: object expected"); if (_depth === $undefined) _depth = 0; if (_depth > $util.recursionLimit) throw $Error("max depth exceeded"); - var message = new $root.atomic.CodeCaller(); + var message = new $root.atomic.ContentDirectoryFacet(); 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); + if (object.count != null) + if (typeof object.count === "object" ? object.count.low || object.count.high : $Number(object.count) !== 0) + if ($util.Long) + message.count = $util.Long.fromValue(object.count, true); + else if (typeof object.count === "string") + message.count = $parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a CodeCaller message. Also converts values to other types if specified. + * Creates a plain object from a ContentDirectoryFacet message. Also converts values to other types if specified. * @function toObject - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @static - * @param {atomic.CodeCaller} message CodeCaller + * @param {atomic.ContentDirectoryFacet} message ContentDirectoryFacet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CodeCaller.toObject = function (message, options, _depth) { + ContentDirectoryFacet.toObject = function (message, options, _depth) { if (!options) options = {}; if (_depth === $undefined) @@ -36391,46 +49858,50 @@ $root.atomic = (function() { var object = {}; if (options.defaults) { object.path = ""; - object.name = ""; - object.line = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.count = options.longs === $String ? long.toString() : options.longs === $Number ? long.toNumber() : typeof $BigInt !== "undefined" && options.longs === $BigInt ? long.toBigInt() : long; + } else + object.count = options.longs === $String ? "0" : typeof $BigInt !== "undefined" && options.longs === $BigInt ? $BigInt("0") : 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; + if (message.count != null && $Object.hasOwnProperty.call(message, "count")) + if (typeof $BigInt !== "undefined" && options.longs === $BigInt) + object.count = typeof message.count === "number" ? $BigInt(message.count) : $util.Long.fromBits(message.count.low >>> 0, message.count.high >>> 0, true).toBigInt(); + else if (typeof message.count === "number") + object.count = options.longs === $String ? $String(message.count) : message.count; + else + object.count = options.longs === $String ? $util.Long.prototype.toString.call(message.count) : options.longs === $Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber(true) : message.count; return object; }; /** - * Converts this CodeCaller to JSON. + * Converts this ContentDirectoryFacet to JSON. * @function toJSON - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @instance * @returns {Object.} JSON object */ - CodeCaller.prototype.toJSON = function() { - return CodeCaller.toObject(this, $protobuf.util.toJSONOptions); + ContentDirectoryFacet.prototype.toJSON = function() { + return ContentDirectoryFacet.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the type url for CodeCaller + * Gets the type url for ContentDirectoryFacet * @function getTypeUrl - * @memberof atomic.CodeCaller + * @memberof atomic.ContentDirectoryFacet * @static * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns {string} The type url */ - CodeCaller.getTypeUrl = function(prefix) { + ContentDirectoryFacet.getTypeUrl = function(prefix) { if (prefix === $undefined) prefix = "type.googleapis.com"; - return prefix + "/atomic.CodeCaller"; + return prefix + "/atomic.ContentDirectoryFacet"; }; - return CodeCaller; + return ContentDirectoryFacet; })(); atomic.GetProjectIdentityRequest = (function() { diff --git a/vendor/nodeatomic/dist/generated/proto.d.cts b/vendor/nodeatomic/dist/generated/proto.d.cts index e470d27..6f69d10 100644 --- a/vendor/nodeatomic/dist/generated/proto.d.cts +++ b/vendor/nodeatomic/dist/generated/proto.d.cts @@ -1371,7 +1371,10 @@ export namespace atomic { FILE_STATUS_ADDED = 4, /** FILE_STATUS_CONFLICTED value */ - FILE_STATUS_CONFLICTED = 5 + FILE_STATUS_CONFLICTED = 5, + + /** FILE_STATUS_PENDING_UNTRACK value */ + FILE_STATUS_PENDING_UNTRACK = 6 } /** @@ -8117,432 +8120,4220 @@ export namespace atomic { } /** - * Properties of a GetVaultEntryRequest. - * @deprecated Use atomic.GetVaultEntryRequest.$Properties instead. + * Properties of a PushChangesRequest. + * @deprecated Use atomic.PushChangesRequest.$Properties instead. */ - interface IGetVaultEntryRequest extends atomic.GetVaultEntryRequest.$Properties { + interface IPushChangesRequest extends atomic.PushChangesRequest.$Properties { } - /** Represents a GetVaultEntryRequest. */ - class GetVaultEntryRequest { + /** Represents a PushChangesRequest. */ + class PushChangesRequest { /** - * Constructs a new GetVaultEntryRequest. + * Constructs a new PushChangesRequest. * @param [properties] Properties to set */ - constructor(properties?: atomic.GetVaultEntryRequest.$Properties); + constructor(properties?: atomic.PushChangesRequest.$Properties); /** Unknown fields preserved while decoding when enabled */ $unknowns?: Uint8Array[]; - /** GetVaultEntryRequest repository. */ + /** PushChangesRequest repository. */ repository?: (atomic.RepositoryRef.$Properties|null); - /** GetVaultEntryRequest kind. */ - kind: atomic.VaultEntityKind; + /** PushChangesRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); - /** GetVaultEntryRequest id. */ - id: string; + /** PushChangesRequest remote. */ + remote: string; - /** GetVaultEntryRequest path. */ - path?: (string|null); + /** PushChangesRequest views. */ + views: string[]; - /** GetVaultEntryRequest includeBundle. */ - includeBundle: boolean; + /** PushChangesRequest expected. */ + expected?: (atomic.ExpectedState.$Properties|null); - /** GetVaultEntryRequest view. */ - view?: (atomic.ViewRef.$Properties|null); + /** PushChangesRequest toView. */ + toView?: (string|null); + + /** PushChangesRequest fromView. */ + fromView?: (string|null); + + /** PushChangesRequest dryRun. */ + dryRun: boolean; + + /** PushChangesRequest force. */ + force: boolean; + + /** PushChangesRequest all. */ + all: boolean; + + /** PushChangesRequest insecure. */ + insecure: boolean; + + /** PushChangesRequest timeoutSecs. */ + timeoutSecs: (number|Long); + + /** PushChangesRequest authHeaders. */ + authHeaders: { [k: string]: string }; + + /** PushChangesRequest remoteUrl. */ + remoteUrl?: (string|null); + + /** PushChangesRequest identity. */ + identity?: (string|null); /** - * Creates a new GetVaultEntryRequest instance using the specified properties. + * Creates a new PushChangesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetVaultEntryRequest instance + * @returns PushChangesRequest instance */ - static create(properties: atomic.GetVaultEntryRequest.$Shape): atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape; - static create(properties?: atomic.GetVaultEntryRequest.$Properties): atomic.GetVaultEntryRequest; + static create(properties: atomic.PushChangesRequest.$Shape): atomic.PushChangesRequest & atomic.PushChangesRequest.$Shape; + static create(properties?: atomic.PushChangesRequest.$Properties): atomic.PushChangesRequest; /** - * Encodes the specified GetVaultEntryRequest message. Does not implicitly {@link atomic.GetVaultEntryRequest.verify|verify} messages. - * @param message GetVaultEntryRequest message or plain object to encode + * Encodes the specified PushChangesRequest message. Does not implicitly {@link atomic.PushChangesRequest.verify|verify} messages. + * @param message PushChangesRequest 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; + static encode(message: atomic.PushChangesRequest.$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 + * Encodes the specified PushChangesRequest message, length delimited. Does not implicitly {@link atomic.PushChangesRequest.verify|verify} messages. + * @param message PushChangesRequest 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; + static encodeDelimited(message: atomic.PushChangesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetVaultEntryRequest message from the specified reader or buffer. + * Decodes a PushChangesRequest 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 + * @returns {atomic.PushChangesRequest & atomic.PushChangesRequest.$Shape} PushChangesRequest * @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; + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.PushChangesRequest & atomic.PushChangesRequest.$Shape; /** - * Decodes a GetVaultEntryRequest message from the specified reader or buffer, length delimited. + * Decodes a PushChangesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns {atomic.GetVaultEntryRequest & atomic.GetVaultEntryRequest.$Shape} GetVaultEntryRequest + * @returns {atomic.PushChangesRequest & atomic.PushChangesRequest.$Shape} PushChangesRequest * @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; + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.PushChangesRequest & atomic.PushChangesRequest.$Shape; /** - * Verifies a GetVaultEntryRequest message. + * Verifies a PushChangesRequest 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. + * Creates a PushChangesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetVaultEntryRequest + * @returns PushChangesRequest */ - static fromObject(object: { [k: string]: any }): atomic.GetVaultEntryRequest; + static fromObject(object: { [k: string]: any }): atomic.PushChangesRequest; /** - * Creates a plain object from a GetVaultEntryRequest message. Also converts values to other types if specified. - * @param message GetVaultEntryRequest + * Creates a plain object from a PushChangesRequest message. Also converts values to other types if specified. + * @param message PushChangesRequest * @param [options] Conversion options * @returns Plain object */ - static toObject(message: atomic.GetVaultEntryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + static toObject(message: atomic.PushChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetVaultEntryRequest to JSON. + * Converts this PushChangesRequest to JSON. * @returns JSON object */ toJSON(): { [k: string]: any }; /** - * Gets the type url for GetVaultEntryRequest + * Gets the type url for PushChangesRequest * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns The type url */ static getTypeUrl(prefix?: string): string; } - namespace GetVaultEntryRequest { + namespace PushChangesRequest { - /** Properties of a GetVaultEntryRequest. */ + /** Properties of a PushChangesRequest. */ interface $Properties { - /** GetVaultEntryRequest repository */ + /** PushChangesRequest repository */ repository?: (atomic.RepositoryRef.$Properties|null); - /** GetVaultEntryRequest kind */ - kind?: (atomic.VaultEntityKind|null); + /** PushChangesRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); - /** GetVaultEntryRequest id */ - id?: (string|null); + /** PushChangesRequest remote */ + remote?: (string|null); - /** GetVaultEntryRequest path */ - path?: (string|null); + /** PushChangesRequest views */ + views?: (string[]|null); - /** GetVaultEntryRequest includeBundle */ - includeBundle?: (boolean|null); + /** PushChangesRequest expected */ + expected?: (atomic.ExpectedState.$Properties|null); - /** GetVaultEntryRequest view */ - view?: (atomic.ViewRef.$Properties|null); + /** PushChangesRequest toView */ + toView?: (string|null); - /** Unknown fields preserved while decoding when enabled */ - $unknowns?: Uint8Array[]; - } + /** PushChangesRequest fromView */ + fromView?: (string|null); - /** Shape of a GetVaultEntryRequest. */ - type $Shape = atomic.GetVaultEntryRequest.$Properties; - } + /** PushChangesRequest dryRun */ + dryRun?: (boolean|null); - /** VaultEntityKind enum. */ - enum VaultEntityKind { + /** PushChangesRequest force */ + force?: (boolean|null); - /** VAULT_ENTITY_KIND_UNSPECIFIED value */ - VAULT_ENTITY_KIND_UNSPECIFIED = 0, + /** PushChangesRequest all */ + all?: (boolean|null); - /** VAULT_ENTITY_KIND_INTENT value */ - VAULT_ENTITY_KIND_INTENT = 1, + /** PushChangesRequest insecure */ + insecure?: (boolean|null); - /** VAULT_ENTITY_KIND_MEMORY value */ - VAULT_ENTITY_KIND_MEMORY = 2, + /** PushChangesRequest timeoutSecs */ + timeoutSecs?: (number|Long|null); - /** VAULT_ENTITY_KIND_GOAL value */ - VAULT_ENTITY_KIND_GOAL = 3 + /** PushChangesRequest authHeaders */ + authHeaders?: ({ [k: string]: string }|null); + + /** PushChangesRequest remoteUrl */ + remoteUrl?: (string|null); + + /** PushChangesRequest identity */ + identity?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PushChangesRequest. */ + type $Shape = { + repository?: atomic.RepositoryRef.$Shape|null; + meta?: atomic.RequestMeta.$Shape|null; + remote?: string|null; + views?: string[]|null; + expected?: atomic.ExpectedState.$Shape|null; + toView?: string|null; + fromView?: string|null; + dryRun?: boolean|null; + force?: boolean|null; + all?: boolean|null; + insecure?: boolean|null; + timeoutSecs?: number|Long|null; + authHeaders?: { [k: string]: string }|null; + remoteUrl?: string|null; + identity?: string|null; + $unknowns?: Uint8Array[]; + }; } /** - * Properties of a GetVaultEntryResponse. - * @deprecated Use atomic.GetVaultEntryResponse.$Properties instead. + * Properties of a PushChangesResponse. + * @deprecated Use atomic.PushChangesResponse.$Properties instead. */ - interface IGetVaultEntryResponse extends atomic.GetVaultEntryResponse.$Properties { + interface IPushChangesResponse extends atomic.PushChangesResponse.$Properties { } - /** Represents a GetVaultEntryResponse. */ - class GetVaultEntryResponse { + /** Represents a PushChangesResponse. */ + class PushChangesResponse { /** - * Constructs a new GetVaultEntryResponse. + * Constructs a new PushChangesResponse. * @param [properties] Properties to set */ - constructor(properties?: atomic.GetVaultEntryResponse.$Properties); + constructor(properties?: atomic.PushChangesResponse.$Properties); /** Unknown fields preserved while decoding when enabled */ $unknowns?: Uint8Array[]; - /** GetVaultEntryResponse entry. */ - entry?: (atomic.VaultEntry.$Properties|null); + /** PushChangesResponse pushedChanges. */ + pushedChanges: (number|Long); - /** GetVaultEntryResponse snapshot. */ - snapshot?: (atomic.ViewSnapshot.$Properties|null); + /** PushChangesResponse manifests. */ + manifests: string[]; - /** GetVaultEntryResponse entryBundle. */ - entryBundle?: (atomic.VersionedBytes.$Properties|null); + /** PushChangesResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** PushChangesResponse report. */ + report?: (atomic.PushReport.$Properties|null); + + /** PushChangesResponse conflict. */ + conflict?: (atomic.PushConflict.$Properties|null); /** - * Creates a new GetVaultEntryResponse instance using the specified properties. + * Creates a new PushChangesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetVaultEntryResponse instance + * @returns PushChangesResponse instance */ - static create(properties: atomic.GetVaultEntryResponse.$Shape): atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape; - static create(properties?: atomic.GetVaultEntryResponse.$Properties): atomic.GetVaultEntryResponse; + static create(properties: atomic.PushChangesResponse.$Shape): atomic.PushChangesResponse & atomic.PushChangesResponse.$Shape; + static create(properties?: atomic.PushChangesResponse.$Properties): atomic.PushChangesResponse; /** - * Encodes the specified GetVaultEntryResponse message. Does not implicitly {@link atomic.GetVaultEntryResponse.verify|verify} messages. - * @param message GetVaultEntryResponse message or plain object to encode + * Encodes the specified PushChangesResponse message. Does not implicitly {@link atomic.PushChangesResponse.verify|verify} messages. + * @param message PushChangesResponse 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; + static encode(message: atomic.PushChangesResponse.$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 + * Encodes the specified PushChangesResponse message, length delimited. Does not implicitly {@link atomic.PushChangesResponse.verify|verify} messages. + * @param message PushChangesResponse 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; + static encodeDelimited(message: atomic.PushChangesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetVaultEntryResponse message from the specified reader or buffer. + * Decodes a PushChangesResponse 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 + * @returns {atomic.PushChangesResponse & atomic.PushChangesResponse.$Shape} PushChangesResponse * @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; + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.PushChangesResponse & atomic.PushChangesResponse.$Shape; /** - * Decodes a GetVaultEntryResponse message from the specified reader or buffer, length delimited. + * Decodes a PushChangesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns {atomic.GetVaultEntryResponse & atomic.GetVaultEntryResponse.$Shape} GetVaultEntryResponse + * @returns {atomic.PushChangesResponse & atomic.PushChangesResponse.$Shape} PushChangesResponse * @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; + static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): atomic.PushChangesResponse & atomic.PushChangesResponse.$Shape; /** - * Verifies a GetVaultEntryResponse message. + * Verifies a PushChangesResponse 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. + * Creates a PushChangesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetVaultEntryResponse + * @returns PushChangesResponse */ - static fromObject(object: { [k: string]: any }): atomic.GetVaultEntryResponse; + static fromObject(object: { [k: string]: any }): atomic.PushChangesResponse; /** - * Creates a plain object from a GetVaultEntryResponse message. Also converts values to other types if specified. - * @param message GetVaultEntryResponse + * Creates a plain object from a PushChangesResponse message. Also converts values to other types if specified. + * @param message PushChangesResponse * @param [options] Conversion options * @returns Plain object */ - static toObject(message: atomic.GetVaultEntryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + static toObject(message: atomic.PushChangesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetVaultEntryResponse to JSON. + * Converts this PushChangesResponse to JSON. * @returns JSON object */ toJSON(): { [k: string]: any }; /** - * Gets the type url for GetVaultEntryResponse + * Gets the type url for PushChangesResponse * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` * @returns The type url */ static getTypeUrl(prefix?: string): string; } - namespace GetVaultEntryResponse { + namespace PushChangesResponse { - /** Properties of a GetVaultEntryResponse. */ + /** Properties of a PushChangesResponse. */ interface $Properties { - /** GetVaultEntryResponse entry */ - entry?: (atomic.VaultEntry.$Properties|null); + /** PushChangesResponse pushedChanges */ + pushedChanges?: (number|Long|null); - /** GetVaultEntryResponse snapshot */ - snapshot?: (atomic.ViewSnapshot.$Properties|null); + /** PushChangesResponse manifests */ + manifests?: (string[]|null); - /** GetVaultEntryResponse entryBundle */ - entryBundle?: (atomic.VersionedBytes.$Properties|null); + /** PushChangesResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** PushChangesResponse report */ + report?: (atomic.PushReport.$Properties|null); + + /** PushChangesResponse conflict */ + conflict?: (atomic.PushConflict.$Properties|null); /** Unknown fields preserved while decoding when enabled */ $unknowns?: Uint8Array[]; } - /** Shape of a GetVaultEntryResponse. */ - type $Shape = atomic.GetVaultEntryResponse.$Properties; + /** Shape of a PushChangesResponse. */ + type $Shape = atomic.PushChangesResponse.$Properties; } /** - * Properties of a VaultEntry. - * @deprecated Use atomic.VaultEntry.$Properties instead. + * Properties of a PushReport. + * @deprecated Use atomic.PushReport.$Properties instead. */ - interface IVaultEntry extends atomic.VaultEntry.$Properties { + interface IPushReport extends atomic.PushReport.$Properties { } - /** Represents a VaultEntry. */ - class VaultEntry { + /** Represents a PushReport. */ + class PushReport { /** - * Constructs a new VaultEntry. + * Constructs a new PushReport. * @param [properties] Properties to set */ - constructor(properties?: atomic.VaultEntry.$Properties); + constructor(properties?: atomic.PushReport.$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); + /** PushReport remoteName. */ + remoteName: string; - /** VaultEntry entryType. */ - entryType?: (string|null); - - /** VaultEntry startedAt. */ - startedAt?: (string|null); + /** PushReport remoteUrl. */ + remoteUrl: string; - /** VaultEntry turns. */ - turns?: (number|null); + /** PushReport views. */ + views: atomic.PushViewReport.$Properties[]; - /** VaultEntry assignee. */ - assignee?: (string|null); + /** PushReport totalStored. */ + totalStored: (number|Long); - /** VaultEntry statusLabel. */ - statusLabel?: (string|null); + /** PushReport viewsDeclared. */ + viewsDeclared: (number|Long); - /** VaultEntry developer. */ - developer?: (string|null); + /** PushReport attestations. */ + attestations: atomic.PushSidecar.$Properties[]; - /** VaultEntry goalDir. */ - goalDir?: (string|null); + /** PushReport provenance. */ + provenance: atomic.PushSidecar.$Properties[]; - /** VaultEntry goalFile. */ - goalFile?: (string|null); + /** PushReport tags. */ + tags: atomic.PushTag.$Properties[]; /** - * Creates a new VaultEntry instance using the specified properties. + * Creates a new PushReport instance using the specified properties. * @param [properties] Properties to set - * @returns VaultEntry instance + * @returns PushReport instance */ - static create(properties: atomic.VaultEntry.$Shape): atomic.VaultEntry & atomic.VaultEntry.$Shape; - static create(properties?: atomic.VaultEntry.$Properties): atomic.VaultEntry; + static create(properties: atomic.PushReport.$Shape): atomic.PushReport & atomic.PushReport.$Shape; + static create(properties?: atomic.PushReport.$Properties): atomic.PushReport; /** - * Encodes the specified VaultEntry message. Does not implicitly {@link atomic.VaultEntry.verify|verify} messages. - * @param message VaultEntry message or plain object to encode + * Encodes the specified PushReport message. Does not implicitly {@link atomic.PushReport.verify|verify} messages. + * @param message PushReport 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; + static encode(message: atomic.PushReport.$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 + * Encodes the specified PushReport message, length delimited. Does not implicitly {@link atomic.PushReport.verify|verify} messages. + * @param message PushReport 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; + static encodeDelimited(message: atomic.PushReport.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VaultEntry message from the specified reader or buffer. + * Decodes a PushReport 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 + * @returns {atomic.PushReport & atomic.PushReport.$Shape} PushReport * @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; + static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): atomic.PushReport & atomic.PushReport.$Shape; /** - * Decodes a VaultEntry message from the specified reader or buffer, length delimited. + * Decodes a PushReport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns {atomic.VaultEntry & atomic.VaultEntry.$Shape} VaultEntry + * @returns {atomic.PushReport & atomic.PushReport.$Shape} PushReport + * @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.PushReport & atomic.PushReport.$Shape; + + /** + * Verifies a PushReport 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 PushReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushReport + */ + static fromObject(object: { [k: string]: any }): atomic.PushReport; + + /** + * Creates a plain object from a PushReport message. Also converts values to other types if specified. + * @param message PushReport + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PushReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushReport to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PushReport + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PushReport { + + /** Properties of a PushReport. */ + interface $Properties { + + /** PushReport remoteName */ + remoteName?: (string|null); + + /** PushReport remoteUrl */ + remoteUrl?: (string|null); + + /** PushReport views */ + views?: (atomic.PushViewReport.$Properties[]|null); + + /** PushReport totalStored */ + totalStored?: (number|Long|null); + + /** PushReport viewsDeclared */ + viewsDeclared?: (number|Long|null); + + /** PushReport attestations */ + attestations?: (atomic.PushSidecar.$Properties[]|null); + + /** PushReport provenance */ + provenance?: (atomic.PushSidecar.$Properties[]|null); + + /** PushReport tags */ + tags?: (atomic.PushTag.$Properties[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PushReport. */ + type $Shape = atomic.PushReport.$Properties; + } + + /** + * Properties of a PushViewReport. + * @deprecated Use atomic.PushViewReport.$Properties instead. + */ + interface IPushViewReport extends atomic.PushViewReport.$Properties { + } + + /** Represents a PushViewReport. */ + class PushViewReport { + + /** + * Constructs a new PushViewReport. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PushViewReport.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PushViewReport remoteName. */ + remoteName: string; + + /** PushViewReport scope. */ + scope: string; + + /** PushViewReport parent. */ + parent?: (string|null); + + /** PushViewReport existsOnRemote. */ + existsOnRemote: boolean; + + /** PushViewReport remoteChangeCount. */ + remoteChangeCount: (number|Long); + + /** PushViewReport noop. */ + noop: boolean; + + /** PushViewReport shrink. */ + shrink: boolean; + + /** PushViewReport forced. */ + forced: boolean; + + /** PushViewReport toStore. */ + toStore: atomic.PushChange.$Properties[]; + + /** PushViewReport logCount. */ + logCount: (number|Long); + + /** PushViewReport declared. */ + declared: boolean; + + /** + * Creates a new PushViewReport instance using the specified properties. + * @param [properties] Properties to set + * @returns PushViewReport instance + */ + static create(properties: atomic.PushViewReport.$Shape): atomic.PushViewReport & atomic.PushViewReport.$Shape; + static create(properties?: atomic.PushViewReport.$Properties): atomic.PushViewReport; + + /** + * Encodes the specified PushViewReport message. Does not implicitly {@link atomic.PushViewReport.verify|verify} messages. + * @param message PushViewReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PushViewReport.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushViewReport message, length delimited. Does not implicitly {@link atomic.PushViewReport.verify|verify} messages. + * @param message PushViewReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PushViewReport.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushViewReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PushViewReport & atomic.PushViewReport.$Shape} PushViewReport + * @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.PushViewReport & atomic.PushViewReport.$Shape; + + /** + * Decodes a PushViewReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PushViewReport & atomic.PushViewReport.$Shape} PushViewReport + * @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.PushViewReport & atomic.PushViewReport.$Shape; + + /** + * Verifies a PushViewReport 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 PushViewReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushViewReport + */ + static fromObject(object: { [k: string]: any }): atomic.PushViewReport; + + /** + * Creates a plain object from a PushViewReport message. Also converts values to other types if specified. + * @param message PushViewReport + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PushViewReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushViewReport to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PushViewReport + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PushViewReport { + + /** Properties of a PushViewReport. */ + interface $Properties { + + /** PushViewReport remoteName */ + remoteName?: (string|null); + + /** PushViewReport scope */ + scope?: (string|null); + + /** PushViewReport parent */ + parent?: (string|null); + + /** PushViewReport existsOnRemote */ + existsOnRemote?: (boolean|null); + + /** PushViewReport remoteChangeCount */ + remoteChangeCount?: (number|Long|null); + + /** PushViewReport noop */ + noop?: (boolean|null); + + /** PushViewReport shrink */ + shrink?: (boolean|null); + + /** PushViewReport forced */ + forced?: (boolean|null); + + /** PushViewReport toStore */ + toStore?: (atomic.PushChange.$Properties[]|null); + + /** PushViewReport logCount */ + logCount?: (number|Long|null); + + /** PushViewReport declared */ + declared?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PushViewReport. */ + type $Shape = atomic.PushViewReport.$Properties; + } + + /** + * Properties of a PushChange. + * @deprecated Use atomic.PushChange.$Properties instead. + */ + interface IPushChange extends atomic.PushChange.$Properties { + } + + /** Represents a PushChange. */ + class PushChange { + + /** + * Constructs a new PushChange. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PushChange.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PushChange hash. */ + hash?: (atomic.Hash.$Properties|null); + + /** PushChange message. */ + message?: (string|null); + + /** + * Creates a new PushChange instance using the specified properties. + * @param [properties] Properties to set + * @returns PushChange instance + */ + static create(properties: atomic.PushChange.$Shape): atomic.PushChange & atomic.PushChange.$Shape; + static create(properties?: atomic.PushChange.$Properties): atomic.PushChange; + + /** + * Encodes the specified PushChange message. Does not implicitly {@link atomic.PushChange.verify|verify} messages. + * @param message PushChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PushChange.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushChange message, length delimited. Does not implicitly {@link atomic.PushChange.verify|verify} messages. + * @param message PushChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PushChange.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PushChange & atomic.PushChange.$Shape} PushChange + * @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.PushChange & atomic.PushChange.$Shape; + + /** + * Decodes a PushChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PushChange & atomic.PushChange.$Shape} PushChange + * @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.PushChange & atomic.PushChange.$Shape; + + /** + * Verifies a PushChange 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 PushChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushChange + */ + static fromObject(object: { [k: string]: any }): atomic.PushChange; + + /** + * Creates a plain object from a PushChange message. Also converts values to other types if specified. + * @param message PushChange + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PushChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushChange to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PushChange + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PushChange { + + /** Properties of a PushChange. */ + interface $Properties { + + /** PushChange hash */ + hash?: (atomic.Hash.$Properties|null); + + /** PushChange message */ + message?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PushChange. */ + type $Shape = atomic.PushChange.$Properties; + } + + /** + * Properties of a PushSidecar. + * @deprecated Use atomic.PushSidecar.$Properties instead. + */ + interface IPushSidecar extends atomic.PushSidecar.$Properties { + } + + /** Represents a PushSidecar. */ + class PushSidecar { + + /** + * Constructs a new PushSidecar. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PushSidecar.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PushSidecar hash. */ + hash?: (atomic.Hash.$Properties|null); + + /** PushSidecar cost. */ + cost?: (string|null); + + /** PushSidecar covered. */ + covered: (number|Long); + + /** PushSidecar nodes. */ + nodes: (number|Long); + + /** PushSidecar explained. */ + explained: (number|Long); + + /** + * Creates a new PushSidecar instance using the specified properties. + * @param [properties] Properties to set + * @returns PushSidecar instance + */ + static create(properties: atomic.PushSidecar.$Shape): atomic.PushSidecar & atomic.PushSidecar.$Shape; + static create(properties?: atomic.PushSidecar.$Properties): atomic.PushSidecar; + + /** + * Encodes the specified PushSidecar message. Does not implicitly {@link atomic.PushSidecar.verify|verify} messages. + * @param message PushSidecar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PushSidecar.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushSidecar message, length delimited. Does not implicitly {@link atomic.PushSidecar.verify|verify} messages. + * @param message PushSidecar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PushSidecar.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushSidecar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PushSidecar & atomic.PushSidecar.$Shape} PushSidecar + * @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.PushSidecar & atomic.PushSidecar.$Shape; + + /** + * Decodes a PushSidecar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PushSidecar & atomic.PushSidecar.$Shape} PushSidecar + * @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.PushSidecar & atomic.PushSidecar.$Shape; + + /** + * Verifies a PushSidecar 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 PushSidecar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushSidecar + */ + static fromObject(object: { [k: string]: any }): atomic.PushSidecar; + + /** + * Creates a plain object from a PushSidecar message. Also converts values to other types if specified. + * @param message PushSidecar + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PushSidecar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushSidecar to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PushSidecar + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PushSidecar { + + /** Properties of a PushSidecar. */ + interface $Properties { + + /** PushSidecar hash */ + hash?: (atomic.Hash.$Properties|null); + + /** PushSidecar cost */ + cost?: (string|null); + + /** PushSidecar covered */ + covered?: (number|Long|null); + + /** PushSidecar nodes */ + nodes?: (number|Long|null); + + /** PushSidecar explained */ + explained?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PushSidecar. */ + type $Shape = atomic.PushSidecar.$Properties; + } + + /** + * Properties of a PushTag. + * @deprecated Use atomic.PushTag.$Properties instead. + */ + interface IPushTag extends atomic.PushTag.$Properties { + } + + /** Represents a PushTag. */ + class PushTag { + + /** + * Constructs a new PushTag. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PushTag.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PushTag hash. */ + hash?: (atomic.Hash.$Properties|null); + + /** PushTag name. */ + name: string; + + /** PushTag kind. */ + kind: string; + + /** + * Creates a new PushTag instance using the specified properties. + * @param [properties] Properties to set + * @returns PushTag instance + */ + static create(properties: atomic.PushTag.$Shape): atomic.PushTag & atomic.PushTag.$Shape; + static create(properties?: atomic.PushTag.$Properties): atomic.PushTag; + + /** + * Encodes the specified PushTag message. Does not implicitly {@link atomic.PushTag.verify|verify} messages. + * @param message PushTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PushTag.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushTag message, length delimited. Does not implicitly {@link atomic.PushTag.verify|verify} messages. + * @param message PushTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PushTag.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushTag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PushTag & atomic.PushTag.$Shape} PushTag + * @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.PushTag & atomic.PushTag.$Shape; + + /** + * Decodes a PushTag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PushTag & atomic.PushTag.$Shape} PushTag + * @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.PushTag & atomic.PushTag.$Shape; + + /** + * Verifies a PushTag 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 PushTag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushTag + */ + static fromObject(object: { [k: string]: any }): atomic.PushTag; + + /** + * Creates a plain object from a PushTag message. Also converts values to other types if specified. + * @param message PushTag + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PushTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushTag to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PushTag + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PushTag { + + /** Properties of a PushTag. */ + interface $Properties { + + /** PushTag hash */ + hash?: (atomic.Hash.$Properties|null); + + /** PushTag name */ + name?: (string|null); + + /** PushTag kind */ + kind?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PushTag. */ + type $Shape = atomic.PushTag.$Properties; + } + + /** + * Properties of a PushConflict. + * @deprecated Use atomic.PushConflict.$Properties instead. + */ + interface IPushConflict extends atomic.PushConflict.$Properties { + } + + /** Represents a PushConflict. */ + class PushConflict { + + /** + * Constructs a new PushConflict. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PushConflict.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PushConflict view. */ + view: string; + + /** PushConflict identityMismatch. */ + identityMismatch: boolean; + + /** PushConflict description. */ + description: string; + + /** PushConflict local. */ + local?: (atomic.ManifestState.$Properties|null); + + /** PushConflict remote. */ + remote?: (atomic.ManifestState.$Properties|null); + + /** + * Creates a new PushConflict instance using the specified properties. + * @param [properties] Properties to set + * @returns PushConflict instance + */ + static create(properties: atomic.PushConflict.$Shape): atomic.PushConflict & atomic.PushConflict.$Shape; + static create(properties?: atomic.PushConflict.$Properties): atomic.PushConflict; + + /** + * Encodes the specified PushConflict message. Does not implicitly {@link atomic.PushConflict.verify|verify} messages. + * @param message PushConflict message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PushConflict.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushConflict message, length delimited. Does not implicitly {@link atomic.PushConflict.verify|verify} messages. + * @param message PushConflict message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PushConflict.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushConflict message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PushConflict & atomic.PushConflict.$Shape} PushConflict + * @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.PushConflict & atomic.PushConflict.$Shape; + + /** + * Decodes a PushConflict message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PushConflict & atomic.PushConflict.$Shape} PushConflict + * @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.PushConflict & atomic.PushConflict.$Shape; + + /** + * Verifies a PushConflict 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 PushConflict message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushConflict + */ + static fromObject(object: { [k: string]: any }): atomic.PushConflict; + + /** + * Creates a plain object from a PushConflict message. Also converts values to other types if specified. + * @param message PushConflict + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PushConflict, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushConflict to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PushConflict + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PushConflict { + + /** Properties of a PushConflict. */ + interface $Properties { + + /** PushConflict view */ + view?: (string|null); + + /** PushConflict identityMismatch */ + identityMismatch?: (boolean|null); + + /** PushConflict description */ + description?: (string|null); + + /** PushConflict local */ + local?: (atomic.ManifestState.$Properties|null); + + /** PushConflict remote */ + remote?: (atomic.ManifestState.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PushConflict. */ + type $Shape = atomic.PushConflict.$Properties; + } + + /** + * Properties of a ManifestState. + * @deprecated Use atomic.ManifestState.$Properties instead. + */ + interface IManifestState extends atomic.ManifestState.$Properties { + } + + /** Represents a ManifestState. */ + class ManifestState { + + /** + * Constructs a new ManifestState. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ManifestState.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ManifestState view. */ + view: string; + + /** ManifestState state. */ + state: string; + + /** ManifestState changeCount. */ + changeCount: (number|Long); + + /** + * Creates a new ManifestState instance using the specified properties. + * @param [properties] Properties to set + * @returns ManifestState instance + */ + static create(properties: atomic.ManifestState.$Shape): atomic.ManifestState & atomic.ManifestState.$Shape; + static create(properties?: atomic.ManifestState.$Properties): atomic.ManifestState; + + /** + * Encodes the specified ManifestState message. Does not implicitly {@link atomic.ManifestState.verify|verify} messages. + * @param message ManifestState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ManifestState.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManifestState message, length delimited. Does not implicitly {@link atomic.ManifestState.verify|verify} messages. + * @param message ManifestState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ManifestState.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManifestState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ManifestState & atomic.ManifestState.$Shape} ManifestState + * @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.ManifestState & atomic.ManifestState.$Shape; + + /** + * Decodes a ManifestState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ManifestState & atomic.ManifestState.$Shape} ManifestState + * @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.ManifestState & atomic.ManifestState.$Shape; + + /** + * Verifies a ManifestState 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 ManifestState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManifestState + */ + static fromObject(object: { [k: string]: any }): atomic.ManifestState; + + /** + * Creates a plain object from a ManifestState message. Also converts values to other types if specified. + * @param message ManifestState + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ManifestState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManifestState to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ManifestState + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ManifestState { + + /** Properties of a ManifestState. */ + interface $Properties { + + /** ManifestState view */ + view?: (string|null); + + /** ManifestState state */ + state?: (string|null); + + /** ManifestState changeCount */ + changeCount?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ManifestState. */ + type $Shape = atomic.ManifestState.$Properties; + } + + /** + * Properties of a PullChangesRequest. + * @deprecated Use atomic.PullChangesRequest.$Properties instead. + */ + interface IPullChangesRequest extends atomic.PullChangesRequest.$Properties { + } + + /** Represents a PullChangesRequest. */ + class PullChangesRequest { + + /** + * Constructs a new PullChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PullChangesRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PullChangesRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** PullChangesRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** PullChangesRequest remote. */ + remote: string; + + /** PullChangesRequest importSidecars. */ + importSidecars: boolean; + + /** PullChangesRequest toView. */ + toView?: (string|null); + + /** PullChangesRequest fromView. */ + fromView?: (string|null); + + /** PullChangesRequest dryRun. */ + dryRun: boolean; + + /** PullChangesRequest all. */ + all: boolean; + + /** PullChangesRequest insecure. */ + insecure: boolean; + + /** PullChangesRequest timeoutSecs. */ + timeoutSecs: (number|Long); + + /** PullChangesRequest identity. */ + identity?: (string|null); + + /** PullChangesRequest downloadOnly. */ + downloadOnly: boolean; + + /** PullChangesRequest authHeaders. */ + authHeaders: { [k: string]: string }; + + /** PullChangesRequest remoteUrl. */ + remoteUrl?: (string|null); + + /** + * Creates a new PullChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PullChangesRequest instance + */ + static create(properties: atomic.PullChangesRequest.$Shape): atomic.PullChangesRequest & atomic.PullChangesRequest.$Shape; + static create(properties?: atomic.PullChangesRequest.$Properties): atomic.PullChangesRequest; + + /** + * Encodes the specified PullChangesRequest message. Does not implicitly {@link atomic.PullChangesRequest.verify|verify} messages. + * @param message PullChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PullChangesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullChangesRequest message, length delimited. Does not implicitly {@link atomic.PullChangesRequest.verify|verify} messages. + * @param message PullChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PullChangesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PullChangesRequest & atomic.PullChangesRequest.$Shape} PullChangesRequest + * @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.PullChangesRequest & atomic.PullChangesRequest.$Shape; + + /** + * Decodes a PullChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PullChangesRequest & atomic.PullChangesRequest.$Shape} PullChangesRequest + * @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.PullChangesRequest & atomic.PullChangesRequest.$Shape; + + /** + * Verifies a PullChangesRequest 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 PullChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullChangesRequest + */ + static fromObject(object: { [k: string]: any }): atomic.PullChangesRequest; + + /** + * Creates a plain object from a PullChangesRequest message. Also converts values to other types if specified. + * @param message PullChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PullChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullChangesRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PullChangesRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PullChangesRequest { + + /** Properties of a PullChangesRequest. */ + interface $Properties { + + /** PullChangesRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** PullChangesRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** PullChangesRequest remote */ + remote?: (string|null); + + /** PullChangesRequest importSidecars */ + importSidecars?: (boolean|null); + + /** PullChangesRequest toView */ + toView?: (string|null); + + /** PullChangesRequest fromView */ + fromView?: (string|null); + + /** PullChangesRequest dryRun */ + dryRun?: (boolean|null); + + /** PullChangesRequest all */ + all?: (boolean|null); + + /** PullChangesRequest insecure */ + insecure?: (boolean|null); + + /** PullChangesRequest timeoutSecs */ + timeoutSecs?: (number|Long|null); + + /** PullChangesRequest identity */ + identity?: (string|null); + + /** PullChangesRequest downloadOnly */ + downloadOnly?: (boolean|null); + + /** PullChangesRequest authHeaders */ + authHeaders?: ({ [k: string]: string }|null); + + /** PullChangesRequest remoteUrl */ + remoteUrl?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PullChangesRequest. */ + type $Shape = atomic.PullChangesRequest.$Properties; + } + + /** + * Properties of a PullChangesResponse. + * @deprecated Use atomic.PullChangesResponse.$Properties instead. + */ + interface IPullChangesResponse extends atomic.PullChangesResponse.$Properties { + } + + /** Represents a PullChangesResponse. */ + class PullChangesResponse { + + /** + * Constructs a new PullChangesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PullChangesResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PullChangesResponse appliedChanges. */ + appliedChanges: (number|Long); + + /** PullChangesResponse updatedViews. */ + updatedViews: string[]; + + /** PullChangesResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** PullChangesResponse report. */ + report?: (atomic.PullReport.$Properties|null); + + /** + * Creates a new PullChangesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PullChangesResponse instance + */ + static create(properties: atomic.PullChangesResponse.$Shape): atomic.PullChangesResponse & atomic.PullChangesResponse.$Shape; + static create(properties?: atomic.PullChangesResponse.$Properties): atomic.PullChangesResponse; + + /** + * Encodes the specified PullChangesResponse message. Does not implicitly {@link atomic.PullChangesResponse.verify|verify} messages. + * @param message PullChangesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PullChangesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullChangesResponse message, length delimited. Does not implicitly {@link atomic.PullChangesResponse.verify|verify} messages. + * @param message PullChangesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PullChangesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullChangesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PullChangesResponse & atomic.PullChangesResponse.$Shape} PullChangesResponse + * @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.PullChangesResponse & atomic.PullChangesResponse.$Shape; + + /** + * Decodes a PullChangesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PullChangesResponse & atomic.PullChangesResponse.$Shape} PullChangesResponse + * @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.PullChangesResponse & atomic.PullChangesResponse.$Shape; + + /** + * Verifies a PullChangesResponse 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 PullChangesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullChangesResponse + */ + static fromObject(object: { [k: string]: any }): atomic.PullChangesResponse; + + /** + * Creates a plain object from a PullChangesResponse message. Also converts values to other types if specified. + * @param message PullChangesResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PullChangesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullChangesResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PullChangesResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PullChangesResponse { + + /** Properties of a PullChangesResponse. */ + interface $Properties { + + /** PullChangesResponse appliedChanges */ + appliedChanges?: (number|Long|null); + + /** PullChangesResponse updatedViews */ + updatedViews?: (string[]|null); + + /** PullChangesResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** PullChangesResponse report */ + report?: (atomic.PullReport.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PullChangesResponse. */ + type $Shape = atomic.PullChangesResponse.$Properties; + } + + /** + * Properties of a PullReport. + * @deprecated Use atomic.PullReport.$Properties instead. + */ + interface IPullReport extends atomic.PullReport.$Properties { + } + + /** Represents a PullReport. */ + class PullReport { + + /** + * Constructs a new PullReport. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PullReport.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PullReport remoteName. */ + remoteName: string; + + /** PullReport remoteUrl. */ + remoteUrl: string; + + /** PullReport remoteView. */ + remoteView: string; + + /** PullReport localView. */ + localView: string; + + /** PullReport localViewChanges. */ + localViewChanges: (number|Long); + + /** PullReport graphObjects. */ + graphObjects: (number|Long); + + /** PullReport remoteChanges. */ + remoteChanges: (number|Long); + + /** PullReport remoteState. */ + remoteState?: (string|null); + + /** PullReport localOnly. */ + localOnly: string[]; + + /** PullReport downloads. */ + downloads: atomic.PullDownload.$Properties[]; + + /** PullReport changesDownloaded. */ + changesDownloaded: (number|Long); + + /** PullReport bytesTransferred. */ + bytesTransferred: (number|Long); + + /** PullReport applied. */ + applied: boolean; + + /** PullReport appliedChanges. */ + appliedChanges: (number|Long); + + /** PullReport applyErrors. */ + applyErrors: string[]; + + /** PullReport sidecars. */ + sidecars: atomic.PullSidecar.$Properties[]; + + /** PullReport setIdVerified. */ + setIdVerified: boolean; + + /** PullReport setIdWarning. */ + setIdWarning?: (string|null); + + /** PullReport materialized. */ + materialized: boolean; + + /** PullReport filesWritten. */ + filesWritten: (number|Long); + + /** PullReport materializeError. */ + materializeError?: (string|null); + + /** PullReport tags. */ + tags: atomic.PullTag.$Properties[]; + + /** PullReport warnings. */ + warnings: atomic.PullWarning.$Properties[]; + + /** PullReport localTip. */ + localTip?: (string|null); + + /** PullReport vaultBootstrapped. */ + vaultBootstrapped: boolean; + + /** PullReport reconciledViews. */ + reconciledViews: (number|Long); + + /** PullReport downloadOnly. */ + downloadOnly: boolean; + + /** PullReport changesFailed. */ + changesFailed: (number|Long); + + /** + * Creates a new PullReport instance using the specified properties. + * @param [properties] Properties to set + * @returns PullReport instance + */ + static create(properties: atomic.PullReport.$Shape): atomic.PullReport & atomic.PullReport.$Shape; + static create(properties?: atomic.PullReport.$Properties): atomic.PullReport; + + /** + * Encodes the specified PullReport message. Does not implicitly {@link atomic.PullReport.verify|verify} messages. + * @param message PullReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PullReport.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullReport message, length delimited. Does not implicitly {@link atomic.PullReport.verify|verify} messages. + * @param message PullReport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PullReport.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullReport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PullReport & atomic.PullReport.$Shape} PullReport + * @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.PullReport & atomic.PullReport.$Shape; + + /** + * Decodes a PullReport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PullReport & atomic.PullReport.$Shape} PullReport + * @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.PullReport & atomic.PullReport.$Shape; + + /** + * Verifies a PullReport 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 PullReport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullReport + */ + static fromObject(object: { [k: string]: any }): atomic.PullReport; + + /** + * Creates a plain object from a PullReport message. Also converts values to other types if specified. + * @param message PullReport + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PullReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullReport to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PullReport + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PullReport { + + /** Properties of a PullReport. */ + interface $Properties { + + /** PullReport remoteName */ + remoteName?: (string|null); + + /** PullReport remoteUrl */ + remoteUrl?: (string|null); + + /** PullReport remoteView */ + remoteView?: (string|null); + + /** PullReport localView */ + localView?: (string|null); + + /** PullReport localViewChanges */ + localViewChanges?: (number|Long|null); + + /** PullReport graphObjects */ + graphObjects?: (number|Long|null); + + /** PullReport remoteChanges */ + remoteChanges?: (number|Long|null); + + /** PullReport remoteState */ + remoteState?: (string|null); + + /** PullReport localOnly */ + localOnly?: (string[]|null); + + /** PullReport downloads */ + downloads?: (atomic.PullDownload.$Properties[]|null); + + /** PullReport changesDownloaded */ + changesDownloaded?: (number|Long|null); + + /** PullReport bytesTransferred */ + bytesTransferred?: (number|Long|null); + + /** PullReport applied */ + applied?: (boolean|null); + + /** PullReport appliedChanges */ + appliedChanges?: (number|Long|null); + + /** PullReport applyErrors */ + applyErrors?: (string[]|null); + + /** PullReport sidecars */ + sidecars?: (atomic.PullSidecar.$Properties[]|null); + + /** PullReport setIdVerified */ + setIdVerified?: (boolean|null); + + /** PullReport setIdWarning */ + setIdWarning?: (string|null); + + /** PullReport materialized */ + materialized?: (boolean|null); + + /** PullReport filesWritten */ + filesWritten?: (number|Long|null); + + /** PullReport materializeError */ + materializeError?: (string|null); + + /** PullReport tags */ + tags?: (atomic.PullTag.$Properties[]|null); + + /** PullReport warnings */ + warnings?: (atomic.PullWarning.$Properties[]|null); + + /** PullReport localTip */ + localTip?: (string|null); + + /** PullReport vaultBootstrapped */ + vaultBootstrapped?: (boolean|null); + + /** PullReport reconciledViews */ + reconciledViews?: (number|Long|null); + + /** PullReport downloadOnly */ + downloadOnly?: (boolean|null); + + /** PullReport changesFailed */ + changesFailed?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PullReport. */ + type $Shape = atomic.PullReport.$Properties; + } + + /** + * Properties of a PullDownload. + * @deprecated Use atomic.PullDownload.$Properties instead. + */ + interface IPullDownload extends atomic.PullDownload.$Properties { + } + + /** Represents a PullDownload. */ + class PullDownload { + + /** + * Constructs a new PullDownload. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PullDownload.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PullDownload hash. */ + hash?: (atomic.Hash.$Properties|null); + + /** PullDownload message. */ + message?: (string|null); + + /** PullDownload ok. */ + ok: boolean; + + /** PullDownload error. */ + error?: (string|null); + + /** PullDownload index. */ + index: (number|Long); + + /** PullDownload total. */ + total: (number|Long); + + /** + * Creates a new PullDownload instance using the specified properties. + * @param [properties] Properties to set + * @returns PullDownload instance + */ + static create(properties: atomic.PullDownload.$Shape): atomic.PullDownload & atomic.PullDownload.$Shape; + static create(properties?: atomic.PullDownload.$Properties): atomic.PullDownload; + + /** + * Encodes the specified PullDownload message. Does not implicitly {@link atomic.PullDownload.verify|verify} messages. + * @param message PullDownload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PullDownload.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullDownload message, length delimited. Does not implicitly {@link atomic.PullDownload.verify|verify} messages. + * @param message PullDownload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PullDownload.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullDownload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PullDownload & atomic.PullDownload.$Shape} PullDownload + * @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.PullDownload & atomic.PullDownload.$Shape; + + /** + * Decodes a PullDownload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PullDownload & atomic.PullDownload.$Shape} PullDownload + * @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.PullDownload & atomic.PullDownload.$Shape; + + /** + * Verifies a PullDownload 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 PullDownload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullDownload + */ + static fromObject(object: { [k: string]: any }): atomic.PullDownload; + + /** + * Creates a plain object from a PullDownload message. Also converts values to other types if specified. + * @param message PullDownload + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PullDownload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullDownload to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PullDownload + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PullDownload { + + /** Properties of a PullDownload. */ + interface $Properties { + + /** PullDownload hash */ + hash?: (atomic.Hash.$Properties|null); + + /** PullDownload message */ + message?: (string|null); + + /** PullDownload ok */ + ok?: (boolean|null); + + /** PullDownload error */ + error?: (string|null); + + /** PullDownload index */ + index?: (number|Long|null); + + /** PullDownload total */ + total?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PullDownload. */ + type $Shape = atomic.PullDownload.$Properties; + } + + /** + * Properties of a PullSidecar. + * @deprecated Use atomic.PullSidecar.$Properties instead. + */ + interface IPullSidecar extends atomic.PullSidecar.$Properties { + } + + /** Represents a PullSidecar. */ + class PullSidecar { + + /** + * Constructs a new PullSidecar. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PullSidecar.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PullSidecar kind. */ + kind: string; + + /** PullSidecar count. */ + count: (number|Long); + + /** PullSidecar detail. */ + detail?: (string|null); + + /** + * Creates a new PullSidecar instance using the specified properties. + * @param [properties] Properties to set + * @returns PullSidecar instance + */ + static create(properties: atomic.PullSidecar.$Shape): atomic.PullSidecar & atomic.PullSidecar.$Shape; + static create(properties?: atomic.PullSidecar.$Properties): atomic.PullSidecar; + + /** + * Encodes the specified PullSidecar message. Does not implicitly {@link atomic.PullSidecar.verify|verify} messages. + * @param message PullSidecar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PullSidecar.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullSidecar message, length delimited. Does not implicitly {@link atomic.PullSidecar.verify|verify} messages. + * @param message PullSidecar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PullSidecar.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullSidecar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PullSidecar & atomic.PullSidecar.$Shape} PullSidecar + * @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.PullSidecar & atomic.PullSidecar.$Shape; + + /** + * Decodes a PullSidecar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PullSidecar & atomic.PullSidecar.$Shape} PullSidecar + * @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.PullSidecar & atomic.PullSidecar.$Shape; + + /** + * Verifies a PullSidecar 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 PullSidecar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullSidecar + */ + static fromObject(object: { [k: string]: any }): atomic.PullSidecar; + + /** + * Creates a plain object from a PullSidecar message. Also converts values to other types if specified. + * @param message PullSidecar + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PullSidecar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullSidecar to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PullSidecar + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PullSidecar { + + /** Properties of a PullSidecar. */ + interface $Properties { + + /** PullSidecar kind */ + kind?: (string|null); + + /** PullSidecar count */ + count?: (number|Long|null); + + /** PullSidecar detail */ + detail?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PullSidecar. */ + type $Shape = atomic.PullSidecar.$Properties; + } + + /** + * Properties of a PullTag. + * @deprecated Use atomic.PullTag.$Properties instead. + */ + interface IPullTag extends atomic.PullTag.$Properties { + } + + /** Represents a PullTag. */ + class PullTag { + + /** + * Constructs a new PullTag. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PullTag.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PullTag name. */ + name: string; + + /** PullTag kind. */ + kind: string; + + /** + * Creates a new PullTag instance using the specified properties. + * @param [properties] Properties to set + * @returns PullTag instance + */ + static create(properties: atomic.PullTag.$Shape): atomic.PullTag & atomic.PullTag.$Shape; + static create(properties?: atomic.PullTag.$Properties): atomic.PullTag; + + /** + * Encodes the specified PullTag message. Does not implicitly {@link atomic.PullTag.verify|verify} messages. + * @param message PullTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PullTag.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullTag message, length delimited. Does not implicitly {@link atomic.PullTag.verify|verify} messages. + * @param message PullTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PullTag.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullTag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PullTag & atomic.PullTag.$Shape} PullTag + * @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.PullTag & atomic.PullTag.$Shape; + + /** + * Decodes a PullTag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PullTag & atomic.PullTag.$Shape} PullTag + * @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.PullTag & atomic.PullTag.$Shape; + + /** + * Verifies a PullTag 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 PullTag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullTag + */ + static fromObject(object: { [k: string]: any }): atomic.PullTag; + + /** + * Creates a plain object from a PullTag message. Also converts values to other types if specified. + * @param message PullTag + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PullTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullTag to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PullTag + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PullTag { + + /** Properties of a PullTag. */ + interface $Properties { + + /** PullTag name */ + name?: (string|null); + + /** PullTag kind */ + kind?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PullTag. */ + type $Shape = atomic.PullTag.$Properties; + } + + /** + * Properties of a PullWarning. + * @deprecated Use atomic.PullWarning.$Properties instead. + */ + interface IPullWarning extends atomic.PullWarning.$Properties { + } + + /** Represents a PullWarning. */ + class PullWarning { + + /** + * Constructs a new PullWarning. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PullWarning.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** PullWarning text. */ + text: string; + + /** + * Creates a new PullWarning instance using the specified properties. + * @param [properties] Properties to set + * @returns PullWarning instance + */ + static create(properties: atomic.PullWarning.$Shape): atomic.PullWarning & atomic.PullWarning.$Shape; + static create(properties?: atomic.PullWarning.$Properties): atomic.PullWarning; + + /** + * Encodes the specified PullWarning message. Does not implicitly {@link atomic.PullWarning.verify|verify} messages. + * @param message PullWarning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PullWarning.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullWarning message, length delimited. Does not implicitly {@link atomic.PullWarning.verify|verify} messages. + * @param message PullWarning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PullWarning.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullWarning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PullWarning & atomic.PullWarning.$Shape} PullWarning + * @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.PullWarning & atomic.PullWarning.$Shape; + + /** + * Decodes a PullWarning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PullWarning & atomic.PullWarning.$Shape} PullWarning + * @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.PullWarning & atomic.PullWarning.$Shape; + + /** + * Verifies a PullWarning 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 PullWarning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullWarning + */ + static fromObject(object: { [k: string]: any }): atomic.PullWarning; + + /** + * Creates a plain object from a PullWarning message. Also converts values to other types if specified. + * @param message PullWarning + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PullWarning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullWarning to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PullWarning + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PullWarning { + + /** Properties of a PullWarning. */ + interface $Properties { + + /** PullWarning text */ + text?: (string|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PullWarning. */ + type $Shape = atomic.PullWarning.$Properties; + } + + /** + * Properties of a ListRemotesRequest. + * @deprecated Use atomic.ListRemotesRequest.$Properties instead. + */ + interface IListRemotesRequest extends atomic.ListRemotesRequest.$Properties { + } + + /** Represents a ListRemotesRequest. */ + class ListRemotesRequest { + + /** + * Constructs a new ListRemotesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ListRemotesRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ListRemotesRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** + * Creates a new ListRemotesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRemotesRequest instance + */ + static create(properties: atomic.ListRemotesRequest.$Shape): atomic.ListRemotesRequest & atomic.ListRemotesRequest.$Shape; + static create(properties?: atomic.ListRemotesRequest.$Properties): atomic.ListRemotesRequest; + + /** + * Encodes the specified ListRemotesRequest message. Does not implicitly {@link atomic.ListRemotesRequest.verify|verify} messages. + * @param message ListRemotesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ListRemotesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRemotesRequest message, length delimited. Does not implicitly {@link atomic.ListRemotesRequest.verify|verify} messages. + * @param message ListRemotesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ListRemotesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRemotesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ListRemotesRequest & atomic.ListRemotesRequest.$Shape} ListRemotesRequest + * @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.ListRemotesRequest & atomic.ListRemotesRequest.$Shape; + + /** + * Decodes a ListRemotesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ListRemotesRequest & atomic.ListRemotesRequest.$Shape} ListRemotesRequest + * @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.ListRemotesRequest & atomic.ListRemotesRequest.$Shape; + + /** + * Verifies a ListRemotesRequest 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 ListRemotesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRemotesRequest + */ + static fromObject(object: { [k: string]: any }): atomic.ListRemotesRequest; + + /** + * Creates a plain object from a ListRemotesRequest message. Also converts values to other types if specified. + * @param message ListRemotesRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ListRemotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRemotesRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ListRemotesRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ListRemotesRequest { + + /** Properties of a ListRemotesRequest. */ + interface $Properties { + + /** ListRemotesRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ListRemotesRequest. */ + type $Shape = atomic.ListRemotesRequest.$Properties; + } + + /** + * Properties of a ListRemotesResponse. + * @deprecated Use atomic.ListRemotesResponse.$Properties instead. + */ + interface IListRemotesResponse extends atomic.ListRemotesResponse.$Properties { + } + + /** Represents a ListRemotesResponse. */ + class ListRemotesResponse { + + /** + * Constructs a new ListRemotesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ListRemotesResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ListRemotesResponse remotes. */ + remotes: atomic.RemoteInfo.$Properties[]; + + /** + * Creates a new ListRemotesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListRemotesResponse instance + */ + static create(properties: atomic.ListRemotesResponse.$Shape): atomic.ListRemotesResponse & atomic.ListRemotesResponse.$Shape; + static create(properties?: atomic.ListRemotesResponse.$Properties): atomic.ListRemotesResponse; + + /** + * Encodes the specified ListRemotesResponse message. Does not implicitly {@link atomic.ListRemotesResponse.verify|verify} messages. + * @param message ListRemotesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ListRemotesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListRemotesResponse message, length delimited. Does not implicitly {@link atomic.ListRemotesResponse.verify|verify} messages. + * @param message ListRemotesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ListRemotesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListRemotesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ListRemotesResponse & atomic.ListRemotesResponse.$Shape} ListRemotesResponse + * @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.ListRemotesResponse & atomic.ListRemotesResponse.$Shape; + + /** + * Decodes a ListRemotesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ListRemotesResponse & atomic.ListRemotesResponse.$Shape} ListRemotesResponse + * @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.ListRemotesResponse & atomic.ListRemotesResponse.$Shape; + + /** + * Verifies a ListRemotesResponse 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 ListRemotesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListRemotesResponse + */ + static fromObject(object: { [k: string]: any }): atomic.ListRemotesResponse; + + /** + * Creates a plain object from a ListRemotesResponse message. Also converts values to other types if specified. + * @param message ListRemotesResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ListRemotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListRemotesResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ListRemotesResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ListRemotesResponse { + + /** Properties of a ListRemotesResponse. */ + interface $Properties { + + /** ListRemotesResponse remotes */ + remotes?: (atomic.RemoteInfo.$Properties[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ListRemotesResponse. */ + type $Shape = atomic.ListRemotesResponse.$Properties; + } + + /** + * Properties of a RemoteInfo. + * @deprecated Use atomic.RemoteInfo.$Properties instead. + */ + interface IRemoteInfo extends atomic.RemoteInfo.$Properties { + } + + /** Represents a RemoteInfo. */ + class RemoteInfo { + + /** + * Constructs a new RemoteInfo. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.RemoteInfo.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** RemoteInfo name. */ + name: string; + + /** RemoteInfo url. */ + url: string; + + /** RemoteInfo default. */ + default: boolean; + + /** + * Creates a new RemoteInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoteInfo instance + */ + static create(properties: atomic.RemoteInfo.$Shape): atomic.RemoteInfo & atomic.RemoteInfo.$Shape; + static create(properties?: atomic.RemoteInfo.$Properties): atomic.RemoteInfo; + + /** + * Encodes the specified RemoteInfo message. Does not implicitly {@link atomic.RemoteInfo.verify|verify} messages. + * @param message RemoteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.RemoteInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoteInfo message, length delimited. Does not implicitly {@link atomic.RemoteInfo.verify|verify} messages. + * @param message RemoteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.RemoteInfo.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoteInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.RemoteInfo & atomic.RemoteInfo.$Shape} RemoteInfo + * @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.RemoteInfo & atomic.RemoteInfo.$Shape; + + /** + * Decodes a RemoteInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.RemoteInfo & atomic.RemoteInfo.$Shape} RemoteInfo + * @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.RemoteInfo & atomic.RemoteInfo.$Shape; + + /** + * Verifies a RemoteInfo 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 RemoteInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoteInfo + */ + static fromObject(object: { [k: string]: any }): atomic.RemoteInfo; + + /** + * Creates a plain object from a RemoteInfo message. Also converts values to other types if specified. + * @param message RemoteInfo + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.RemoteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoteInfo to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for RemoteInfo + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace RemoteInfo { + + /** Properties of a RemoteInfo. */ + interface $Properties { + + /** RemoteInfo name */ + name?: (string|null); + + /** RemoteInfo url */ + url?: (string|null); + + /** RemoteInfo default */ + "default"?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a RemoteInfo. */ + type $Shape = atomic.RemoteInfo.$Properties; + } + + /** + * Properties of a ManageRemotesRequest. + * @deprecated Use atomic.ManageRemotesRequest.$Properties instead. + */ + interface IManageRemotesRequest extends atomic.ManageRemotesRequest.$Properties { + } + + /** Represents a ManageRemotesRequest. */ + class ManageRemotesRequest { + + /** + * Constructs a new ManageRemotesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ManageRemotesRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ManageRemotesRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** ManageRemotesRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** ManageRemotesRequest action. */ + action: atomic.RemoteAction; + + /** ManageRemotesRequest name. */ + name?: (string|null); + + /** ManageRemotesRequest url. */ + url?: (string|null); + + /** ManageRemotesRequest newName. */ + newName?: (string|null); + + /** ManageRemotesRequest setDefault. */ + setDefault: boolean; + + /** + * Creates a new ManageRemotesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ManageRemotesRequest instance + */ + static create(properties: atomic.ManageRemotesRequest.$Shape): atomic.ManageRemotesRequest & atomic.ManageRemotesRequest.$Shape; + static create(properties?: atomic.ManageRemotesRequest.$Properties): atomic.ManageRemotesRequest; + + /** + * Encodes the specified ManageRemotesRequest message. Does not implicitly {@link atomic.ManageRemotesRequest.verify|verify} messages. + * @param message ManageRemotesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ManageRemotesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManageRemotesRequest message, length delimited. Does not implicitly {@link atomic.ManageRemotesRequest.verify|verify} messages. + * @param message ManageRemotesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ManageRemotesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManageRemotesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ManageRemotesRequest & atomic.ManageRemotesRequest.$Shape} ManageRemotesRequest + * @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.ManageRemotesRequest & atomic.ManageRemotesRequest.$Shape; + + /** + * Decodes a ManageRemotesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ManageRemotesRequest & atomic.ManageRemotesRequest.$Shape} ManageRemotesRequest + * @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.ManageRemotesRequest & atomic.ManageRemotesRequest.$Shape; + + /** + * Verifies a ManageRemotesRequest 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 ManageRemotesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManageRemotesRequest + */ + static fromObject(object: { [k: string]: any }): atomic.ManageRemotesRequest; + + /** + * Creates a plain object from a ManageRemotesRequest message. Also converts values to other types if specified. + * @param message ManageRemotesRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ManageRemotesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManageRemotesRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ManageRemotesRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ManageRemotesRequest { + + /** Properties of a ManageRemotesRequest. */ + interface $Properties { + + /** ManageRemotesRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** ManageRemotesRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** ManageRemotesRequest action */ + action?: (atomic.RemoteAction|null); + + /** ManageRemotesRequest name */ + name?: (string|null); + + /** ManageRemotesRequest url */ + url?: (string|null); + + /** ManageRemotesRequest newName */ + newName?: (string|null); + + /** ManageRemotesRequest setDefault */ + setDefault?: (boolean|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ManageRemotesRequest. */ + type $Shape = atomic.ManageRemotesRequest.$Properties; + } + + /** RemoteAction enum. */ + enum RemoteAction { + + /** REMOTE_ACTION_UNSPECIFIED value */ + REMOTE_ACTION_UNSPECIFIED = 0, + + /** REMOTE_ACTION_ADD value */ + REMOTE_ACTION_ADD = 1, + + /** REMOTE_ACTION_REMOVE value */ + REMOTE_ACTION_REMOVE = 2, + + /** REMOTE_ACTION_RENAME value */ + REMOTE_ACTION_RENAME = 3, + + /** REMOTE_ACTION_SET_URL value */ + REMOTE_ACTION_SET_URL = 4, + + /** REMOTE_ACTION_SET_DEFAULT value */ + REMOTE_ACTION_SET_DEFAULT = 5 + } + + /** + * Properties of a ManageRemotesResponse. + * @deprecated Use atomic.ManageRemotesResponse.$Properties instead. + */ + interface IManageRemotesResponse extends atomic.ManageRemotesResponse.$Properties { + } + + /** Represents a ManageRemotesResponse. */ + class ManageRemotesResponse { + + /** + * Constructs a new ManageRemotesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ManageRemotesResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ManageRemotesResponse remotes. */ + remotes: atomic.RemoteInfo.$Properties[]; + + /** ManageRemotesResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** + * Creates a new ManageRemotesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ManageRemotesResponse instance + */ + static create(properties: atomic.ManageRemotesResponse.$Shape): atomic.ManageRemotesResponse & atomic.ManageRemotesResponse.$Shape; + static create(properties?: atomic.ManageRemotesResponse.$Properties): atomic.ManageRemotesResponse; + + /** + * Encodes the specified ManageRemotesResponse message. Does not implicitly {@link atomic.ManageRemotesResponse.verify|verify} messages. + * @param message ManageRemotesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ManageRemotesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManageRemotesResponse message, length delimited. Does not implicitly {@link atomic.ManageRemotesResponse.verify|verify} messages. + * @param message ManageRemotesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ManageRemotesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManageRemotesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ManageRemotesResponse & atomic.ManageRemotesResponse.$Shape} ManageRemotesResponse + * @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.ManageRemotesResponse & atomic.ManageRemotesResponse.$Shape; + + /** + * Decodes a ManageRemotesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ManageRemotesResponse & atomic.ManageRemotesResponse.$Shape} ManageRemotesResponse + * @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.ManageRemotesResponse & atomic.ManageRemotesResponse.$Shape; + + /** + * Verifies a ManageRemotesResponse 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 ManageRemotesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManageRemotesResponse + */ + static fromObject(object: { [k: string]: any }): atomic.ManageRemotesResponse; + + /** + * Creates a plain object from a ManageRemotesResponse message. Also converts values to other types if specified. + * @param message ManageRemotesResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ManageRemotesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManageRemotesResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ManageRemotesResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ManageRemotesResponse { + + /** Properties of a ManageRemotesResponse. */ + interface $Properties { + + /** ManageRemotesResponse remotes */ + remotes?: (atomic.RemoteInfo.$Properties[]|null); + + /** ManageRemotesResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ManageRemotesResponse. */ + type $Shape = atomic.ManageRemotesResponse.$Properties; + } + + /** + * Properties of an InsertChangesRequest. + * @deprecated Use atomic.InsertChangesRequest.$Properties instead. + */ + interface IInsertChangesRequest extends atomic.InsertChangesRequest.$Properties { + } + + /** Represents an InsertChangesRequest. */ + class InsertChangesRequest { + + /** + * Constructs a new InsertChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.InsertChangesRequest.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** InsertChangesRequest repository. */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** InsertChangesRequest meta. */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** InsertChangesRequest singleChange. */ + singleChange?: (atomic.Hash.$Properties|null); + + /** InsertChangesRequest fromView. */ + fromView?: (string|null); + + /** InsertChangesRequest upToTag. */ + upToTag?: (string|null); + + /** InsertChangesRequest promoteCurrentView. */ + promoteCurrentView?: (atomic.PromoteCurrentView.$Properties|null); + + /** InsertChangesRequest changeSet. */ + changeSet?: (atomic.ChangeSet.$Properties|null); + + /** InsertChangesRequest singleRef. */ + singleRef?: (string|null); + + /** InsertChangesRequest targetView. */ + targetView?: (string|null); + + /** InsertChangesRequest allowConflicts. */ + allowConflicts: boolean; + + /** InsertChangesRequest target. */ + target?: (atomic.ViewRef.$Properties|null); + + /** InsertChangesRequest expectedSnapshot. */ + expectedSnapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** InsertChangesRequest sourceSnapshot. */ + sourceSnapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** InsertChangesRequest applyDependencies. */ + applyDependencies?: (boolean|null); + + /** InsertChangesRequest dryRun. */ + dryRun?: (boolean|null); + + /** InsertChangesRequest tagFromView. */ + tagFromView?: (string|null); + + /** InsertChangesRequest source. */ + source?: ("singleChange"|"fromView"|"upToTag"|"promoteCurrentView"|"changeSet"|"singleRef"); + + /** + * Creates a new InsertChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InsertChangesRequest instance + */ + static create(properties: atomic.InsertChangesRequest.$Shape): atomic.InsertChangesRequest & atomic.InsertChangesRequest.$Shape; + static create(properties?: atomic.InsertChangesRequest.$Properties): atomic.InsertChangesRequest; + + /** + * Encodes the specified InsertChangesRequest message. Does not implicitly {@link atomic.InsertChangesRequest.verify|verify} messages. + * @param message InsertChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.InsertChangesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InsertChangesRequest message, length delimited. Does not implicitly {@link atomic.InsertChangesRequest.verify|verify} messages. + * @param message InsertChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.InsertChangesRequest.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InsertChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.InsertChangesRequest & atomic.InsertChangesRequest.$Shape} InsertChangesRequest + * @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.InsertChangesRequest & atomic.InsertChangesRequest.$Shape; + + /** + * Decodes an InsertChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.InsertChangesRequest & atomic.InsertChangesRequest.$Shape} InsertChangesRequest + * @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.InsertChangesRequest & atomic.InsertChangesRequest.$Shape; + + /** + * Verifies an InsertChangesRequest 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 InsertChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InsertChangesRequest + */ + static fromObject(object: { [k: string]: any }): atomic.InsertChangesRequest; + + /** + * Creates a plain object from an InsertChangesRequest message. Also converts values to other types if specified. + * @param message InsertChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.InsertChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InsertChangesRequest to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for InsertChangesRequest + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace InsertChangesRequest { + + /** Properties of an InsertChangesRequest. */ + interface $Properties { + + /** InsertChangesRequest repository */ + repository?: (atomic.RepositoryRef.$Properties|null); + + /** InsertChangesRequest meta */ + meta?: (atomic.RequestMeta.$Properties|null); + + /** InsertChangesRequest singleChange */ + singleChange?: (atomic.Hash.$Properties|null); + + /** InsertChangesRequest fromView */ + fromView?: (string|null); + + /** InsertChangesRequest upToTag */ + upToTag?: (string|null); + + /** InsertChangesRequest promoteCurrentView */ + promoteCurrentView?: (atomic.PromoteCurrentView.$Properties|null); + + /** InsertChangesRequest changeSet */ + changeSet?: (atomic.ChangeSet.$Properties|null); + + /** InsertChangesRequest singleRef */ + singleRef?: (string|null); + + /** InsertChangesRequest targetView */ + targetView?: (string|null); + + /** InsertChangesRequest allowConflicts */ + allowConflicts?: (boolean|null); + + /** InsertChangesRequest target */ + target?: (atomic.ViewRef.$Properties|null); + + /** InsertChangesRequest expectedSnapshot */ + expectedSnapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** InsertChangesRequest sourceSnapshot */ + sourceSnapshot?: (atomic.ViewSnapshot.$Properties|null); + + /** InsertChangesRequest applyDependencies */ + applyDependencies?: (boolean|null); + + /** InsertChangesRequest dryRun */ + dryRun?: (boolean|null); + + /** InsertChangesRequest tagFromView */ + tagFromView?: (string|null); + + /** InsertChangesRequest source */ + source?: ("singleChange"|"fromView"|"upToTag"|"promoteCurrentView"|"changeSet"|"singleRef"); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Narrowed shape of an InsertChangesRequest. */ + type $Shape = { + repository?: atomic.RepositoryRef.$Shape|null; + meta?: atomic.RequestMeta.$Shape|null; + singleChange?: atomic.Hash.$Shape|null; + fromView?: string|null; + upToTag?: string|null; + promoteCurrentView?: atomic.PromoteCurrentView.$Shape|null; + changeSet?: atomic.ChangeSet.$Shape|null; + singleRef?: string|null; + targetView?: string|null; + allowConflicts?: boolean|null; + target?: atomic.ViewRef.$Shape|null; + expectedSnapshot?: atomic.ViewSnapshot.$Shape|null; + sourceSnapshot?: atomic.ViewSnapshot.$Shape|null; + applyDependencies?: boolean|null; + dryRun?: boolean|null; + tagFromView?: string|null; + $unknowns?: Uint8Array[]; + } & ( + ({ source?: undefined; singleChange?: null; fromView?: null; upToTag?: null; promoteCurrentView?: null; changeSet?: null; singleRef?: null }|{ source?: "singleChange"; singleChange: atomic.Hash.$Shape; fromView?: null; upToTag?: null; promoteCurrentView?: null; changeSet?: null; singleRef?: null }|{ source?: "fromView"; singleChange?: null; fromView: string; upToTag?: null; promoteCurrentView?: null; changeSet?: null; singleRef?: null }|{ source?: "upToTag"; singleChange?: null; fromView?: null; upToTag: string; promoteCurrentView?: null; changeSet?: null; singleRef?: null }|{ source?: "promoteCurrentView"; singleChange?: null; fromView?: null; upToTag?: null; promoteCurrentView: atomic.PromoteCurrentView.$Shape; changeSet?: null; singleRef?: null }|{ source?: "changeSet"; singleChange?: null; fromView?: null; upToTag?: null; promoteCurrentView?: null; changeSet: atomic.ChangeSet.$Shape; singleRef?: null }|{ source?: "singleRef"; singleChange?: null; fromView?: null; upToTag?: null; promoteCurrentView?: null; changeSet?: null; singleRef: string }) + ); + } + + /** + * Properties of a PromoteCurrentView. + * @deprecated Use atomic.PromoteCurrentView.$Properties instead. + */ + interface IPromoteCurrentView extends atomic.PromoteCurrentView.$Properties { + } + + /** Represents a PromoteCurrentView. */ + class PromoteCurrentView { + + /** + * Constructs a new PromoteCurrentView. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.PromoteCurrentView.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** + * Creates a new PromoteCurrentView instance using the specified properties. + * @param [properties] Properties to set + * @returns PromoteCurrentView instance + */ + static create(properties: atomic.PromoteCurrentView.$Shape): atomic.PromoteCurrentView & atomic.PromoteCurrentView.$Shape; + static create(properties?: atomic.PromoteCurrentView.$Properties): atomic.PromoteCurrentView; + + /** + * Encodes the specified PromoteCurrentView message. Does not implicitly {@link atomic.PromoteCurrentView.verify|verify} messages. + * @param message PromoteCurrentView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.PromoteCurrentView.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PromoteCurrentView message, length delimited. Does not implicitly {@link atomic.PromoteCurrentView.verify|verify} messages. + * @param message PromoteCurrentView message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.PromoteCurrentView.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PromoteCurrentView message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.PromoteCurrentView & atomic.PromoteCurrentView.$Shape} PromoteCurrentView + * @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.PromoteCurrentView & atomic.PromoteCurrentView.$Shape; + + /** + * Decodes a PromoteCurrentView message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.PromoteCurrentView & atomic.PromoteCurrentView.$Shape} PromoteCurrentView + * @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.PromoteCurrentView & atomic.PromoteCurrentView.$Shape; + + /** + * Verifies a PromoteCurrentView 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 PromoteCurrentView message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PromoteCurrentView + */ + static fromObject(object: { [k: string]: any }): atomic.PromoteCurrentView; + + /** + * Creates a plain object from a PromoteCurrentView message. Also converts values to other types if specified. + * @param message PromoteCurrentView + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.PromoteCurrentView, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PromoteCurrentView to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for PromoteCurrentView + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace PromoteCurrentView { + + /** Properties of a PromoteCurrentView. */ + interface $Properties { + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a PromoteCurrentView. */ + type $Shape = atomic.PromoteCurrentView.$Properties; + } + + /** + * Properties of a ChangeSet. + * @deprecated Use atomic.ChangeSet.$Properties instead. + */ + interface IChangeSet extends atomic.ChangeSet.$Properties { + } + + /** Represents a ChangeSet. */ + class ChangeSet { + + /** + * Constructs a new ChangeSet. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ChangeSet.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ChangeSet changes. */ + changes: string[]; + + /** + * Creates a new ChangeSet instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeSet instance + */ + static create(properties: atomic.ChangeSet.$Shape): atomic.ChangeSet & atomic.ChangeSet.$Shape; + static create(properties?: atomic.ChangeSet.$Properties): atomic.ChangeSet; + + /** + * Encodes the specified ChangeSet message. Does not implicitly {@link atomic.ChangeSet.verify|verify} messages. + * @param message ChangeSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ChangeSet.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeSet message, length delimited. Does not implicitly {@link atomic.ChangeSet.verify|verify} messages. + * @param message ChangeSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ChangeSet.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ChangeSet & atomic.ChangeSet.$Shape} ChangeSet + * @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.ChangeSet & atomic.ChangeSet.$Shape; + + /** + * Decodes a ChangeSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ChangeSet & atomic.ChangeSet.$Shape} ChangeSet + * @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.ChangeSet & atomic.ChangeSet.$Shape; + + /** + * Verifies a ChangeSet 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 ChangeSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeSet + */ + static fromObject(object: { [k: string]: any }): atomic.ChangeSet; + + /** + * Creates a plain object from a ChangeSet message. Also converts values to other types if specified. + * @param message ChangeSet + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ChangeSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeSet to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ChangeSet + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ChangeSet { + + /** Properties of a ChangeSet. */ + interface $Properties { + + /** ChangeSet changes */ + changes?: (string[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ChangeSet. */ + type $Shape = atomic.ChangeSet.$Properties; + } + + /** + * Properties of an InsertChangesResponse. + * @deprecated Use atomic.InsertChangesResponse.$Properties instead. + */ + interface IInsertChangesResponse extends atomic.InsertChangesResponse.$Properties { + } + + /** Represents an InsertChangesResponse. */ + class InsertChangesResponse { + + /** + * Constructs a new InsertChangesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.InsertChangesResponse.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** InsertChangesResponse inserted. */ + inserted: atomic.ChangeInfo.$Properties[]; + + /** InsertChangesResponse conflicts. */ + conflicts: atomic.ConflictInfo.$Properties[]; + + /** InsertChangesResponse resolvedSourceView. */ + resolvedSourceView?: (string|null); + + /** InsertChangesResponse resolvedTargetView. */ + resolvedTargetView?: (string|null); + + /** InsertChangesResponse bothViewsShared. */ + bothViewsShared?: (boolean|null); + + /** InsertChangesResponse resolvedChange. */ + resolvedChange?: (atomic.Hash.$Properties|null); + + /** InsertChangesResponse newState. */ + newState?: (atomic.Hash.$Properties|null); + + /** InsertChangesResponse skippedCount. */ + skippedCount: number; + + /** InsertChangesResponse filesUpdated. */ + filesUpdated?: (number|Long|null); + + /** InsertChangesResponse directoriesCreated. */ + directoriesCreated?: (number|Long|null); + + /** InsertChangesResponse hasConflicts. */ + hasConflicts: boolean; + + /** InsertChangesResponse meta. */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** + * Creates a new InsertChangesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InsertChangesResponse instance + */ + static create(properties: atomic.InsertChangesResponse.$Shape): atomic.InsertChangesResponse & atomic.InsertChangesResponse.$Shape; + static create(properties?: atomic.InsertChangesResponse.$Properties): atomic.InsertChangesResponse; + + /** + * Encodes the specified InsertChangesResponse message. Does not implicitly {@link atomic.InsertChangesResponse.verify|verify} messages. + * @param message InsertChangesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.InsertChangesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InsertChangesResponse message, length delimited. Does not implicitly {@link atomic.InsertChangesResponse.verify|verify} messages. + * @param message InsertChangesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.InsertChangesResponse.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InsertChangesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.InsertChangesResponse & atomic.InsertChangesResponse.$Shape} InsertChangesResponse + * @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.InsertChangesResponse & atomic.InsertChangesResponse.$Shape; + + /** + * Decodes an InsertChangesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.InsertChangesResponse & atomic.InsertChangesResponse.$Shape} InsertChangesResponse + * @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.InsertChangesResponse & atomic.InsertChangesResponse.$Shape; + + /** + * Verifies an InsertChangesResponse 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 InsertChangesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InsertChangesResponse + */ + static fromObject(object: { [k: string]: any }): atomic.InsertChangesResponse; + + /** + * Creates a plain object from an InsertChangesResponse message. Also converts values to other types if specified. + * @param message InsertChangesResponse + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.InsertChangesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InsertChangesResponse to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for InsertChangesResponse + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace InsertChangesResponse { + + /** Properties of an InsertChangesResponse. */ + interface $Properties { + + /** InsertChangesResponse inserted */ + inserted?: (atomic.ChangeInfo.$Properties[]|null); + + /** InsertChangesResponse conflicts */ + conflicts?: (atomic.ConflictInfo.$Properties[]|null); + + /** InsertChangesResponse resolvedSourceView */ + resolvedSourceView?: (string|null); + + /** InsertChangesResponse resolvedTargetView */ + resolvedTargetView?: (string|null); + + /** InsertChangesResponse bothViewsShared */ + bothViewsShared?: (boolean|null); + + /** InsertChangesResponse resolvedChange */ + resolvedChange?: (atomic.Hash.$Properties|null); + + /** InsertChangesResponse newState */ + newState?: (atomic.Hash.$Properties|null); + + /** InsertChangesResponse skippedCount */ + skippedCount?: (number|null); + + /** InsertChangesResponse filesUpdated */ + filesUpdated?: (number|Long|null); + + /** InsertChangesResponse directoriesCreated */ + directoriesCreated?: (number|Long|null); + + /** InsertChangesResponse hasConflicts */ + hasConflicts?: (boolean|null); + + /** InsertChangesResponse meta */ + meta?: (atomic.ResponseMeta.$Properties|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of an InsertChangesResponse. */ + type $Shape = atomic.InsertChangesResponse.$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 */ @@ -8764,6 +12555,12 @@ export namespace atomic { /** ListVaultEntriesRequest toolResultPreviews. */ toolResultPreviews: boolean; + /** ListVaultEntriesRequest sort. */ + sort?: (atomic.VaultListSort|null); + + /** ListVaultEntriesRequest reverse. */ + reverse: boolean; + /** ListVaultEntriesRequest view. */ view?: (atomic.ViewRef.$Properties|null); @@ -8884,6 +12681,12 @@ export namespace atomic { /** ListVaultEntriesRequest toolResultPreviews */ toolResultPreviews?: (boolean|null); + /** ListVaultEntriesRequest sort */ + sort?: (atomic.VaultListSort|null); + + /** ListVaultEntriesRequest reverse */ + reverse?: (boolean|null); + /** ListVaultEntriesRequest view */ view?: (atomic.ViewRef.$Properties|null); @@ -8895,6 +12698,37 @@ export namespace atomic { type $Shape = atomic.ListVaultEntriesRequest.$Properties; } + /** VaultListSort enum. */ + enum VaultListSort { + + /** VAULT_LIST_SORT_UNSPECIFIED value */ + VAULT_LIST_SORT_UNSPECIFIED = 0, + + /** VAULT_LIST_SORT_ID value */ + VAULT_LIST_SORT_ID = 1, + + /** VAULT_LIST_SORT_UPDATED value */ + VAULT_LIST_SORT_UPDATED = 2, + + /** VAULT_LIST_SORT_TITLE value */ + VAULT_LIST_SORT_TITLE = 3, + + /** VAULT_LIST_SORT_STATUS value */ + VAULT_LIST_SORT_STATUS = 4, + + /** VAULT_LIST_SORT_KIND value */ + VAULT_LIST_SORT_KIND = 5, + + /** VAULT_LIST_SORT_ABOUT value */ + VAULT_LIST_SORT_ABOUT = 6, + + /** VAULT_LIST_SORT_ATTESTED value */ + VAULT_LIST_SORT_ATTESTED = 7, + + /** VAULT_LIST_SORT_VERIFIES value */ + VAULT_LIST_SORT_VERIFIES = 8 + } + /** * Properties of a ListVaultEntriesResponse. * @deprecated Use atomic.ListVaultEntriesResponse.$Properties instead. @@ -10354,6 +14188,21 @@ export namespace atomic { /** ContentSearchQuery paths. */ paths: string[]; + /** ContentSearchQuery pathFilter. */ + pathFilter?: (string|null); + + /** ContentSearchQuery fileType. */ + fileType?: (string|null); + + /** ContentSearchQuery excludeType. */ + excludeType?: (string|null); + + /** ContentSearchQuery caseInsensitive. */ + caseInsensitive: boolean; + + /** ContentSearchQuery maxResults. */ + maxResults?: (number|null); + /** * Creates a new ContentSearchQuery instance using the specified properties. * @param [properties] Properties to set @@ -10441,8 +14290,23 @@ export namespace atomic { /** ContentSearchQuery query */ query?: (string|null); - /** ContentSearchQuery paths */ - paths?: (string[]|null); + /** ContentSearchQuery paths */ + paths?: (string[]|null); + + /** ContentSearchQuery pathFilter */ + pathFilter?: (string|null); + + /** ContentSearchQuery fileType */ + fileType?: (string|null); + + /** ContentSearchQuery excludeType */ + excludeType?: (string|null); + + /** ContentSearchQuery caseInsensitive */ + caseInsensitive?: (boolean|null); + + /** ContentSearchQuery maxResults */ + maxResults?: (number|null); /** Unknown fields preserved while decoding when enabled */ $unknowns?: Uint8Array[]; @@ -11410,6 +15274,9 @@ export namespace atomic { /** QueryGraphResponse callers. */ callers: atomic.CodeCaller.$Properties[]; + /** QueryGraphResponse contentResult. */ + contentResult?: (atomic.ContentSearchResult.$Properties|null); + /** * Creates a new QueryGraphResponse instance using the specified properties. * @param [properties] Properties to set @@ -11530,6 +15397,9 @@ export namespace atomic { /** QueryGraphResponse callers */ callers?: (atomic.CodeCaller.$Properties[]|null); + /** QueryGraphResponse contentResult */ + contentResult?: (atomic.ContentSearchResult.$Properties|null); + /** Unknown fields preserved while decoding when enabled */ $unknowns?: Uint8Array[]; } @@ -12096,6 +15966,405 @@ export namespace atomic { type $Shape = atomic.CodeCaller.$Properties; } + /** + * Properties of a ContentSearchResult. + * @deprecated Use atomic.ContentSearchResult.$Properties instead. + */ + interface IContentSearchResult extends atomic.ContentSearchResult.$Properties { + } + + /** Represents a ContentSearchResult. */ + class ContentSearchResult { + + /** + * Constructs a new ContentSearchResult. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ContentSearchResult.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ContentSearchResult matches. */ + matches: atomic.ContentMatch.$Properties[]; + + /** ContentSearchResult totalMatches. */ + totalMatches: (number|Long); + + /** ContentSearchResult dirFacets. */ + dirFacets: atomic.ContentDirectoryFacet.$Properties[]; + + /** + * Creates a new ContentSearchResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentSearchResult instance + */ + static create(properties: atomic.ContentSearchResult.$Shape): atomic.ContentSearchResult & atomic.ContentSearchResult.$Shape; + static create(properties?: atomic.ContentSearchResult.$Properties): atomic.ContentSearchResult; + + /** + * Encodes the specified ContentSearchResult message. Does not implicitly {@link atomic.ContentSearchResult.verify|verify} messages. + * @param message ContentSearchResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ContentSearchResult.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentSearchResult message, length delimited. Does not implicitly {@link atomic.ContentSearchResult.verify|verify} messages. + * @param message ContentSearchResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ContentSearchResult.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentSearchResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ContentSearchResult & atomic.ContentSearchResult.$Shape} ContentSearchResult + * @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.ContentSearchResult & atomic.ContentSearchResult.$Shape; + + /** + * Decodes a ContentSearchResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ContentSearchResult & atomic.ContentSearchResult.$Shape} ContentSearchResult + * @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.ContentSearchResult & atomic.ContentSearchResult.$Shape; + + /** + * Verifies a ContentSearchResult 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 ContentSearchResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentSearchResult + */ + static fromObject(object: { [k: string]: any }): atomic.ContentSearchResult; + + /** + * Creates a plain object from a ContentSearchResult message. Also converts values to other types if specified. + * @param message ContentSearchResult + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ContentSearchResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentSearchResult to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ContentSearchResult + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ContentSearchResult { + + /** Properties of a ContentSearchResult. */ + interface $Properties { + + /** ContentSearchResult matches */ + matches?: (atomic.ContentMatch.$Properties[]|null); + + /** ContentSearchResult totalMatches */ + totalMatches?: (number|Long|null); + + /** ContentSearchResult dirFacets */ + dirFacets?: (atomic.ContentDirectoryFacet.$Properties[]|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ContentSearchResult. */ + type $Shape = atomic.ContentSearchResult.$Properties; + } + + /** + * Properties of a ContentMatch. + * @deprecated Use atomic.ContentMatch.$Properties instead. + */ + interface IContentMatch extends atomic.ContentMatch.$Properties { + } + + /** Represents a ContentMatch. */ + class ContentMatch { + + /** + * Constructs a new ContentMatch. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ContentMatch.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ContentMatch path. */ + path: string; + + /** ContentMatch lineNumber. */ + lineNumber: number; + + /** ContentMatch lineContent. */ + lineContent: string; + + /** ContentMatch byteOffset. */ + byteOffset: (number|Long); + + /** ContentMatch submatchStart. */ + submatchStart: (number|Long); + + /** ContentMatch submatchEnd. */ + submatchEnd: (number|Long); + + /** + * Creates a new ContentMatch instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentMatch instance + */ + static create(properties: atomic.ContentMatch.$Shape): atomic.ContentMatch & atomic.ContentMatch.$Shape; + static create(properties?: atomic.ContentMatch.$Properties): atomic.ContentMatch; + + /** + * Encodes the specified ContentMatch message. Does not implicitly {@link atomic.ContentMatch.verify|verify} messages. + * @param message ContentMatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ContentMatch.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentMatch message, length delimited. Does not implicitly {@link atomic.ContentMatch.verify|verify} messages. + * @param message ContentMatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ContentMatch.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentMatch message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ContentMatch & atomic.ContentMatch.$Shape} ContentMatch + * @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.ContentMatch & atomic.ContentMatch.$Shape; + + /** + * Decodes a ContentMatch message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ContentMatch & atomic.ContentMatch.$Shape} ContentMatch + * @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.ContentMatch & atomic.ContentMatch.$Shape; + + /** + * Verifies a ContentMatch 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 ContentMatch message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentMatch + */ + static fromObject(object: { [k: string]: any }): atomic.ContentMatch; + + /** + * Creates a plain object from a ContentMatch message. Also converts values to other types if specified. + * @param message ContentMatch + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ContentMatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentMatch to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ContentMatch + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ContentMatch { + + /** Properties of a ContentMatch. */ + interface $Properties { + + /** ContentMatch path */ + path?: (string|null); + + /** ContentMatch lineNumber */ + lineNumber?: (number|null); + + /** ContentMatch lineContent */ + lineContent?: (string|null); + + /** ContentMatch byteOffset */ + byteOffset?: (number|Long|null); + + /** ContentMatch submatchStart */ + submatchStart?: (number|Long|null); + + /** ContentMatch submatchEnd */ + submatchEnd?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ContentMatch. */ + type $Shape = atomic.ContentMatch.$Properties; + } + + /** + * Properties of a ContentDirectoryFacet. + * @deprecated Use atomic.ContentDirectoryFacet.$Properties instead. + */ + interface IContentDirectoryFacet extends atomic.ContentDirectoryFacet.$Properties { + } + + /** Represents a ContentDirectoryFacet. */ + class ContentDirectoryFacet { + + /** + * Constructs a new ContentDirectoryFacet. + * @param [properties] Properties to set + */ + constructor(properties?: atomic.ContentDirectoryFacet.$Properties); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + + /** ContentDirectoryFacet path. */ + path: string; + + /** ContentDirectoryFacet count. */ + count: (number|Long); + + /** + * Creates a new ContentDirectoryFacet instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentDirectoryFacet instance + */ + static create(properties: atomic.ContentDirectoryFacet.$Shape): atomic.ContentDirectoryFacet & atomic.ContentDirectoryFacet.$Shape; + static create(properties?: atomic.ContentDirectoryFacet.$Properties): atomic.ContentDirectoryFacet; + + /** + * Encodes the specified ContentDirectoryFacet message. Does not implicitly {@link atomic.ContentDirectoryFacet.verify|verify} messages. + * @param message ContentDirectoryFacet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encode(message: atomic.ContentDirectoryFacet.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentDirectoryFacet message, length delimited. Does not implicitly {@link atomic.ContentDirectoryFacet.verify|verify} messages. + * @param message ContentDirectoryFacet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + static encodeDelimited(message: atomic.ContentDirectoryFacet.$Properties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentDirectoryFacet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns {atomic.ContentDirectoryFacet & atomic.ContentDirectoryFacet.$Shape} ContentDirectoryFacet + * @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.ContentDirectoryFacet & atomic.ContentDirectoryFacet.$Shape; + + /** + * Decodes a ContentDirectoryFacet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns {atomic.ContentDirectoryFacet & atomic.ContentDirectoryFacet.$Shape} ContentDirectoryFacet + * @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.ContentDirectoryFacet & atomic.ContentDirectoryFacet.$Shape; + + /** + * Verifies a ContentDirectoryFacet 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 ContentDirectoryFacet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentDirectoryFacet + */ + static fromObject(object: { [k: string]: any }): atomic.ContentDirectoryFacet; + + /** + * Creates a plain object from a ContentDirectoryFacet message. Also converts values to other types if specified. + * @param message ContentDirectoryFacet + * @param [options] Conversion options + * @returns Plain object + */ + static toObject(message: atomic.ContentDirectoryFacet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentDirectoryFacet to JSON. + * @returns JSON object + */ + toJSON(): { [k: string]: any }; + + /** + * Gets the type url for ContentDirectoryFacet + * @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"` + * @returns The type url + */ + static getTypeUrl(prefix?: string): string; + } + + namespace ContentDirectoryFacet { + + /** Properties of a ContentDirectoryFacet. */ + interface $Properties { + + /** ContentDirectoryFacet path */ + path?: (string|null); + + /** ContentDirectoryFacet count */ + count?: (number|Long|null); + + /** Unknown fields preserved while decoding when enabled */ + $unknowns?: Uint8Array[]; + } + + /** Shape of a ContentDirectoryFacet. */ + type $Shape = atomic.ContentDirectoryFacet.$Properties; + } + /** * Properties of a GetProjectIdentityRequest. * @deprecated Use atomic.GetProjectIdentityRequest.$Properties instead. diff --git a/vendor/nodeatomic/dist/generated/runtime-contract.d.ts b/vendor/nodeatomic/dist/generated/runtime-contract.d.ts index 4f7cf06..bd77b90 100644 --- a/vendor/nodeatomic/dist/generated/runtime-contract.d.ts +++ b/vendor/nodeatomic/dist/generated/runtime-contract.d.ts @@ -1 +1 @@ -export declare const descriptorSha256 = "8e034a5fd37a1891d99b29d26a5839111c0081c587534876b2144db71d88cce2"; +export declare const descriptorSha256 = "fe17b755b35dc5f5955ca2d476204ba465dead0b0a07f0eb12bceb11a0b48a94"; diff --git a/vendor/nodeatomic/dist/generated/runtime-contract.js b/vendor/nodeatomic/dist/generated/runtime-contract.js index ebc223a..d81bd3e 100644 --- a/vendor/nodeatomic/dist/generated/runtime-contract.js +++ b/vendor/nodeatomic/dist/generated/runtime-contract.js @@ -1,2 +1,2 @@ // Generated from the producer's full embedded descriptor. -export const descriptorSha256 = '8e034a5fd37a1891d99b29d26a5839111c0081c587534876b2144db71d88cce2'; +export const descriptorSha256 = 'fe17b755b35dc5f5955ca2d476204ba465dead0b0a07f0eb12bceb11a0b48a94'; diff --git a/vendor/nodeatomic/dist/index.d.ts b/vendor/nodeatomic/dist/index.d.ts index 6329e02..1bddc0f 100644 --- a/vendor/nodeatomic/dist/index.d.ts +++ b/vendor/nodeatomic/dist/index.d.ts @@ -3,7 +3,7 @@ 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 { GetVaultOptions, ListVaultOptions, VaultContextOptions, VerificationOptions, AddOptions, RecordOptions, LogOptions, ChangeOptions, ChangeReference, StatusOptions, ListViewsOptions, CreateViewOptions, SwitchViewOptions, DeleteViewOptions, PushOptions, PullOptions, AddRemoteOptions, InsertViewOptions, PushResponse, PullResponse, InsertViewResponse, 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 & { diff --git a/vendor/nodeatomic/dist/repository.d.ts b/vendor/nodeatomic/dist/repository.d.ts index 72444a7..30e67aa 100644 --- a/vendor/nodeatomic/dist/repository.d.ts +++ b/vendor/nodeatomic/dist/repository.d.ts @@ -24,6 +24,13 @@ export type ListViewsOptions = Omit; export type SwitchViewOptions = Omit; export type DeleteViewOptions = Omit; +export type PushOptions = Omit; +export type PullOptions = Omit; +export type AddRemoteOptions = Pick; +export type InsertViewOptions = Pick; +export type PushResponse = Contract.PushChangesResponse; +export type PullResponse = Contract.PullChangesResponse; +export type InsertViewResponse = Contract.InsertChangesResponse; /** A full binary hash, an unambiguous base32 prefix, or a view-log sequence. */ export type ChangeReference = { hash: Uint8Array; @@ -61,11 +68,21 @@ export declare class AtomicRepository { content?: Uint8Array; view?: string; }>; + /** Synchronize through native canonical sync; native code resolves credentials. */ + push(options?: PushOptions): Promise; + /** Synchronize graph/view state and report any native materialization outcome. */ + pull(options?: PullOptions): Promise; + readonly remotes: { + list: () => Promise; + add: (name: string, url: string, options?: AddRemoteOptions) => Promise; + }; readonly views: { list: (options?: ListViewsOptions) => Promise; create: (name: string, options?: CreateViewOptions) => Promise; switch: (name: string, options?: SwitchViewOptions) => Promise; delete: (name: string, options?: DeleteViewOptions) => Promise; + /** Insert source membership/dependencies into target, never promote scope. */ + insert: (source: string, target: string, options?: InsertViewOptions) => Promise; }; readonly vault: { /** Equivalent stored-entry lookup to vault show / intent show / memory show. */ diff --git a/vendor/nodeatomic/dist/repository.js b/vendor/nodeatomic/dist/repository.js index f5563ca..d3d9067 100644 --- a/vendor/nodeatomic/dist/repository.js +++ b/vendor/nodeatomic/dist/repository.js @@ -77,6 +77,29 @@ export class AtomicRepository { 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 }; } + /** Synchronize through native canonical sync; native code resolves credentials. */ + async push(options = {}) { + const { repository: _repository, authHeaders: _headers, remoteUrl: _url, ...request } = options; + return proto.PushChangesResponse.decode(await call('/atomic.SyncService/PushChanges', proto.PushChangesRequest.encode({ ...request, timeoutSecs: options.timeoutSecs ?? 300, + repository: this.reference }).finish())); + } + /** Synchronize graph/view state and report any native materialization outcome. */ + async pull(options = {}) { + const { repository: _repository, authHeaders: _headers, remoteUrl: _url, ...request } = options; + return proto.PullChangesResponse.decode(await call('/atomic.SyncService/PullChanges', proto.PullChangesRequest.encode({ ...request, timeoutSecs: options.timeoutSecs ?? 300, + importSidecars: options.importSidecars ?? true, repository: this.reference }).finish())); + } + remotes = { + list: async () => proto.ListRemotesResponse.decode(await call('/atomic.SyncService/ListRemotes', proto.ListRemotesRequest.encode({ repository: this.reference }).finish())), + add: async (name, url, options = {}) => { + if (typeof name !== 'string' || !name.trim()) + throw new TypeError('a non-empty remote name is required'); + if (typeof url !== 'string' || !url.trim()) + throw new TypeError('a non-empty remote URL is required'); + return proto.ManageRemotesResponse.decode(await call('/atomic.SyncService/ManageRemotes', proto.ManageRemotesRequest.encode({ setDefault: options.setDefault, name, url, + action: proto.RemoteAction.REMOTE_ACTION_ADD, repository: this.reference }).finish())); + }, + }; views = { list: async (options = {}) => proto.ListViewsResponse.decode(await call('/atomic.ViewService/ListViews', proto.ListViewsRequest.encode({ ...options, repository: this.reference }).finish())), create: async (name, options = {}) => { @@ -94,6 +117,21 @@ export class AtomicRepository { requireName(name); return proto.DeleteViewResponse.decode(await call('/atomic.ViewService/DeleteView', proto.DeleteViewRequest.encode({ ...options, view: name, repository: this.reference }).finish())); }, + /** Insert source membership/dependencies into target, never promote scope. */ + insert: async (source, target, options = {}) => { + requireName(source); + requireName(target); + if (source === target) + throw new TypeError('source and target views must differ'); + const views = await this.views.list(); + const targetRef = views.views.find((view) => view.name === target)?.ref; + if (!targetRef) + throw new Error(`target view not found: ${target}`); + return proto.InsertChangesResponse.decode(await call('/atomic.RepositoryMutationService/InsertChanges', proto.InsertChangesRequest.encode({ meta: options.meta, allowConflicts: options.allowConflicts, + expectedSnapshot: options.expectedSnapshot, sourceSnapshot: options.sourceSnapshot, + applyDependencies: options.applyDependencies, dryRun: options.dryRun, + fromView: source, targetView: target, target: targetRef, repository: this.reference }).finish())); + }, }; vault = { /** Equivalent stored-entry lookup to vault show / intent show / memory show. */ From 9aca78aa16ba2bb33f154154db617aa5048ff1a7 Mon Sep 17 00:00:00 2001 From: Bradley Hilton Date: Mon, 9 Nov 2026 10:03:59 -0600 Subject: [PATCH 2/2] Refresh native runtime fingerprint after Atomic dev merge --- CHANGELOG.md | 1 + vendor/nodeatomic/NOTICE | 1 + vendor/nodeatomic/dist/generated/runtime-contract.d.ts | 2 +- vendor/nodeatomic/dist/generated/runtime-contract.js | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f526a27..67c83b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - 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. - Route Atomic push, pull, insert-view, and remote registration through nodeatomic and the in-process native service; remove the CLI subprocess bridge. Share Rust authentication with the CLI, surface structured failure reports, and protect unsaved current-view buffers. +- Refresh the native descriptor fingerprint after integrating Atomic dev's vault-evidence replay contract, retaining strict runtime compatibility checks. - 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. diff --git a/vendor/nodeatomic/NOTICE b/vendor/nodeatomic/NOTICE index 93b8a50..227c4c8 100644 --- a/vendor/nodeatomic/NOTICE +++ b/vendor/nodeatomic/NOTICE @@ -3,6 +3,7 @@ Vendored nodeatomic JavaScript consumer and generated protobuf codecs. Source: https://github.com/atomicdotdev/nodeatomic Source revision: ac76e68d3d7facd8aefe26ef04baf3350509b115 Generated codecs/fingerprint use the matching libatomic descriptor. +Native producer revision: cbca73955d3a5a9cac217dc80b4e3b449b8cca8e License: MIT OR Apache-2.0 The vendored files are distributed under the MIT license in the repository diff --git a/vendor/nodeatomic/dist/generated/runtime-contract.d.ts b/vendor/nodeatomic/dist/generated/runtime-contract.d.ts index bd77b90..8db7bd9 100644 --- a/vendor/nodeatomic/dist/generated/runtime-contract.d.ts +++ b/vendor/nodeatomic/dist/generated/runtime-contract.d.ts @@ -1 +1 @@ -export declare const descriptorSha256 = "fe17b755b35dc5f5955ca2d476204ba465dead0b0a07f0eb12bceb11a0b48a94"; +export declare const descriptorSha256 = "6649fc0c17d66d7af594914854609ebbcfbfb81f8303e45e62794e955e4ee8a5"; diff --git a/vendor/nodeatomic/dist/generated/runtime-contract.js b/vendor/nodeatomic/dist/generated/runtime-contract.js index d81bd3e..0ea11e3 100644 --- a/vendor/nodeatomic/dist/generated/runtime-contract.js +++ b/vendor/nodeatomic/dist/generated/runtime-contract.js @@ -1,2 +1,2 @@ // Generated from the producer's full embedded descriptor. -export const descriptorSha256 = 'fe17b755b35dc5f5955ca2d476204ba465dead0b0a07f0eb12bceb11a0b48a94'; +export const descriptorSha256 = '6649fc0c17d66d7af594914854609ebbcfbfb81f8303e45e62794e955e4ee8a5';